Example #1
0
 public BitcoinDWaiters(
     AddressPoolServiceAccessor addressPool,
     NBXplorerNetworkProvider networkProvider,
     ChainProvider chains,
     RepositoryProvider repositoryProvider,
     ExplorerConfiguration config,
     RPCClientProvider rpcProvider,
     EventAggregator eventAggregator)
 {
     _Waiters = networkProvider
                .GetAll()
                .Select(s => (Repository: repositoryProvider.GetRepository(s),
                              RPCClient: rpcProvider.GetRPCClient(s),
                              Chain: chains.GetChain(s),
                              Network: s))
                .Where(s => s.Repository != null && s.RPCClient != null && s.Chain != null)
                .Select(s => new BitcoinDWaiter(s.RPCClient,
                                                config,
                                                networkProvider.GetFromCryptoCode(s.Network.CryptoCode),
                                                s.Chain,
                                                s.Repository,
                                                addressPool.Instance,
                                                eventAggregator))
                .ToDictionary(s => s.Network.CryptoCode, s => s);
     this.repositoryProvider = repositoryProvider;
 }
Example #2
0
 public ScanUTXOSetService(ScanUTXOSetServiceAccessor accessor,
                           RPCClientProvider rpcClients,
                           RepositoryProvider repositories)
 {
     accessor.Instance = this;
     RpcClients        = rpcClients;
     Repositories      = repositories;
 }
Example #3
0
 public RebroadcasterHostedService(RepositoryProvider repositories, BitcoinDWaiters waiters, EventAggregator eventAggregator)
 {
     _Repositories   = repositories;
     _Waiters        = waiters;
     EventAggregator = eventAggregator;
     _BroadcastedTransactionsByCryptoCode = repositories.GetAll()
                                            .Select(r => new RebroadcastedTransactions()
     {
         Network = r.Network
     }).ToDictionary(t => t.Network);
 }
 public RebroadcasterHostedService(
     NBXplorerNetworkProvider networkProvider,
     ExplorerConfiguration configuration,
     RepositoryProvider repositories, BitcoinDWaiters waiters, EventAggregator eventAggregator)
 {
     _Repositories   = repositories;
     _Waiters        = waiters;
     EventAggregator = eventAggregator;
     _BroadcastedTransactionsByCryptoCode = configuration.ChainConfigurations
                                            .Select(r => new RebroadcastedTransactions()
     {
         Network = networkProvider.GetFromCryptoCode(r.CryptoCode)
     }).ToDictionary(t => t.Network);
 }
Example #5
0
 public BitcoinDWaiters(
     AddressPoolService addressPool,
     NBXplorerNetworkProvider networkProvider,
     ChainProvider chains,
     RepositoryProvider repositoryProvider,
     ExplorerConfiguration config,
     RPCClientProvider rpcProvider,
     EventAggregator eventAggregator)
 {
     this.addressPool        = addressPool;
     this.networkProvider    = networkProvider;
     this.chains             = chains;
     this.repositoryProvider = repositoryProvider;
     this.config             = config;
     this.rpcProvider        = rpcProvider;
     this.eventAggregator    = eventAggregator;
 }
Example #6
0
 public AddressPoolService(NBXplorerNetworkProvider networks, RepositoryProvider repositoryProvider, KeyPathTemplates keyPathTemplates, AddressPoolServiceAccessor accessor)
 {
     accessor.Instance     = this;
     _AddressPoolByNetwork = networks.GetAll().ToDictionary(o => o, o => new AddressPool(repositoryProvider.GetRepository(o)));
     this.keyPathTemplates = keyPathTemplates;
 }
Example #7
0
 public AddressPoolService(NBXplorerNetworkProvider networks, RepositoryProvider repositoryProvider, KeyPathTemplates keyPathTemplates)
 {
     this.networks           = networks;
     this.repositoryProvider = repositoryProvider;
     this.keyPathTemplates   = keyPathTemplates;
 }
Example #8
0
 public AddressPoolService(RepositoryProvider repositoryProvider, AddressPoolServiceAccessor accessor)
 {
     accessor.Instance   = this;
     _RepositoryProvider = repositoryProvider;
 }