message: * Splitted API parts in different structures
diff: @@ -6,15 +6,28 @@ mod services;
  use commands::{Command, CommandExecutor};
  use std::error;
  +use std::sync::Arc;
  -pub struct SovrinClient {
  - command_executor: CommandExecutor
  +struct AnoncredsAPI {
  + command_executor: Arc<CommandExecutor>,
  }
  -impl SovrinClient {
  - pub fn new() -> SovrinClient {
  - SovrinClient {
  - command_executor: CommandExecutor::new()
  +impl AnoncredsAPI {
  + pub fn new(command_executor: Arc<CommandExecutor>) -> AnoncredsAPI {
  + AnoncredsAPI { command_executor: command_executor }
  + }
  +
  + fn dummy() {}
  +}
  +
  +struct SovrinAPI {
  + command_executor: Arc<CommandExecutor>,
  +}
  +
  +impl SovrinAPI {
  + pub fn new(command_executor: Arc<CommandExecutor>) -> SovrinAPI {
  + SovrinAPI {
  + command_executor: command_executor
  }
  }
  @@ -23,6 +36,22 @@ impl SovrinClient {
  }
  }
  +
  +pub struct SovrinClient {
  + sovrin: SovrinAPI,
  + anoncreds: AnoncredsAPI
  +}
  +
  +impl SovrinClient {
  + pub fn new() -> SovrinClient {
  + let command_executor = Arc::new(CommandExecutor::new());
  + SovrinClient {
  + anoncreds: AnoncredsAPI::new(command_executor.clone()),
  + sovrin: SovrinAPI::new(command_executor.clone())
  + }
  + }
  +}
  +
  #[cfg(test)]
  mod tests {
  use super::*;
  @@ -56,7 +85,7 @@ mod tests {
  });
  let sovrin_client = SovrinClient::new();
  - sovrin_client.set_did("DID0".to_string(), cb);
  + sovrin_client.sovrin.set_did("DID0".to_string(), cb);
  match receiver.recv() {
  Ok(result) => {
  