Exemple #1
0
 public AccountSignerTransactionManager(IClient rpcClient, INeoRestService restService, IAccount account)
 {
     Account      = account ?? throw new ArgumentNullException(nameof(account));
     Client       = rpcClient;
     _restService = restService;
     if (account.PrivateKey != null)
     {
         _accountKey = new KeyPair(account.PrivateKey);                             //if account is watch only, it does not have private key
     }
 }
 public WalletManager(Wallet wallet, INeoRestService restService = null, IClient client = null)
 {
     _wallet = wallet;
     if (restService == null || client == null)
     {
         InitializeDefaultServices();
     }
     else
     {
         _restService = restService;
         _client      = client;
     }
 }
 private void InitializeDefaultServices()
 {
     _restService = new NeoScanRestService(NeoScanNet.MainNet);
     _client      = new RpcClient(new Uri("http://seed2.neo.org:10332")); //todo change this logic
 }