Example #1
0
 public LtcAddressNormalizer(
     IBlockchainsProvider blockchainsProvider,
     LtcSettings settings)
 {
     _liteCoin = blockchainsProvider.GetLiteCoin();
     _network  = Network.GetNetwork(settings.Network);
 }
Example #2
0
 public BtcAddressNormalizer(
     IBlockchainsProvider blockchainsProvider,
     BtcSettings settings)
 {
     _bitcoin = blockchainsProvider.GetBitcoin();
     _network = Network.GetNetwork(settings.Network);
 }
Example #3
0
        public void Setup()
        {
            BCash.Instance.EnsureRegistered();
            Litecoin.Instance.EnsureRegistered();

            _logFactory = LogFactory.Create().AddUnbufferedConsole();
            var assetsClient = new AssetsClient(_logFactory, new AssetsClientSettings());

            _blockchainProvider = new BlockchainsProvider(assetsClient);
            _addressNormalizer  = new AddressNormalizer
                                  (
                _logFactory,
                new IAddressNormalizer[]
            {
                new GeneralAddressNormalizer(),
                new BtcAddressNormalizer(_blockchainProvider, new BtcSettings {
                    Network = "mainnet"
                }),
                new BchAddressNormalizer(_blockchainProvider, new BchSettings {
                    Network = "mainnet"
                }),
                new LtcAddressNormalizer(_blockchainProvider, new LtcSettings {
                    Network = "ltc-main"
                }),
                new EthAddressNormalizer(_blockchainProvider),
                new XrpAddressNormalizer(_blockchainProvider)
            }
                                  );
        }
Example #4
0
 public BtcDepositsHistoryProvider(
     IBlockchainsProvider blockchainsProvider,
     BtcSettings settings)
 {
     _bitcoin = blockchainsProvider.GetBitcoin();
     _client  = new CustomQBitNinjaClient(new Uri(settings.NinjaUrl), Network.GetNetwork(settings.Network));
 }
 public BchAddressNormalizer(
     IBlockchainsProvider blockchainsProvider,
     BchSettings settings)
 {
     _bitcoinCash = blockchainsProvider.GetBitcoinCash();
     _btcNetwork  = Network.GetNetwork(settings.Network);
     _bchNetwork  = _btcNetwork == Network.Main ? BCash.Instance.Mainnet : BCash.Instance.Regtest;
 }
 public EthDepositsHistoryProvider(
     IBlockchainsProvider blockchainsProvider,
     EthSettings settings,
     AddressNormalizer addressNormalizer)
 {
     _addressNormalizer = addressNormalizer;
     _samuraiClient     = new SamuraiClient(settings.SamuraiUrl);
     _ethereum          = blockchainsProvider.GetEthereum();
 }
 public LtcDepositsHistoryProvider(
     ILogFactory logFactory,
     LtcSettings settings,
     IBlockchainsProvider blockchainsProvider,
     AddressNormalizer addressNormalizer)
 {
     _log = logFactory.CreateLog(this);
     _addressNormalizer = addressNormalizer;
     _insightApi        = new InsightApiClient(settings.InsightApiUrl);
     _liteCoin          = blockchainsProvider.GetLiteCoin();
 }
        public WalletCredentialsDepositWalletsProvider(
            IBlockchainsProvider blockchainsProvider,
            AzureStorageSettings azureStorageSettings)
        {
            _blockchainsProvider = blockchainsProvider;

            var azureAccount = CloudStorageAccount.Parse(azureStorageSettings.ClientPersonalInfoConnString);
            var azureClient  = azureAccount.CreateCloudTableClient();

            _table = azureClient.GetTableReference("WalletCredentials");
        }
 public BchDepositsHistoryProvider(
     ILogFactory logFactory,
     BchSettings settings,
     IBlockchainsProvider blockchainsProvider,
     AddressNormalizer addressNormalizer)
 {
     _log = logFactory.CreateLog(this);
     _addressNormalizer = addressNormalizer;
     _insightApi        = new InsightApiClient(settings.InsightApiUrl);
     _bitcoinCash       = blockchainsProvider.GetBitcoinCash();
 }
        public BilMongoDepositWalletsProvider(
            IBlockchainsProvider blockchainsProvider,
            MongoStorageSettings settings)
        {
            _blockchainsProvider = blockchainsProvider;

            var client = new MongoClient(settings.BlockchainWalletsConnString);
            var db     = client.GetDatabase(settings.BlockchainWalletsDbName);

            _collection = db.GetCollection <WalletMongoEntity>("blockchain-wallets");
        }
Example #11
0
        public BilAzureDepositWalletsProvider(
            AzureStorageSettings azureStorageSettings,
            IBlockchainsProvider blockchainsProvider)
        {
            _blockchainsProvider = blockchainsProvider;

            var azureAccount = CloudStorageAccount.Parse(azureStorageSettings.BlockchainWalletsConnString);
            var azureClient  = azureAccount.CreateCloudTableClient();

            _table = azureClient.GetTableReference(azureStorageSettings.BlockchainWalletsTable);
        }
Example #12
0
        public CashOperationsWithdrawalsHistoryProvider(
            IBlockchainsProvider blockchainsProvider,
            AzureStorageSettings azureStorageSettings)
        {
            _blockchainsProvider = blockchainsProvider;

            var azureAccount = CloudStorageAccount.Parse(azureStorageSettings.CashOperationsConnString);
            var azureClient  = azureAccount.CreateCloudTableClient();

            _table = azureClient.GetTableReference("OperationsCash");
        }
        public BilCashoutWithdrawalsHistoryProvider(
            IBlockchainsProvider blockchainsProvider,
            AzureStorageSettings azureStorageSettings)
        {
            _blockchainsProvider = blockchainsProvider;

            var azureAccount = CloudStorageAccount.Parse(azureStorageSettings.CashoutProcessorConnString);
            var azureClient  = azureAccount.CreateCloudTableClient();

            _table = azureClient.GetTableReference("Cashout");
        }
Example #14
0
        public XrpDepositsHistoryProvider(
            IBlockchainsProvider blockchainsProvider,
            XrpSettings settings)
        {
            _ripple   = blockchainsProvider.GetRipple();
            _settings = settings;

            if (_settings.CacheExpirationPeriod == default(TimeSpan))
            {
                _settings.CacheExpirationPeriod = TimeSpan.FromMinutes(5);
            }

            _memoryCache = new MemoryCache(new MemoryCacheOptions());
        }
        public BilCashoutsBatchWithdrawalsHistoryProvider(
            ILogFactory logFactory,
            IBlockchainsProvider blockchainsProvider,
            AzureStorageSettings azureStorageSettings)
        {
            _log = logFactory.CreateLog(this);
            _blockchainsProvider = blockchainsProvider;

            var cashoutProcessorAzureAccount = CloudStorageAccount.Parse(azureStorageSettings.CashoutProcessorConnString);
            var cashoutProcessorAzureClient  = cashoutProcessorAzureAccount.CreateCloudTableClient();

            _cashoutBatchesTable = cashoutProcessorAzureClient.GetTableReference("CashoutsBatch");

            var operationsExecutorAzureAccount = CloudStorageAccount.Parse(azureStorageSettings.OperationsExecutorConnString);
            var operationsExecutorAzureClient  = operationsExecutorAzureAccount.CreateCloudTableClient();

            _operationExecutionsTable = operationsExecutorAzureClient.GetTableReference("OperationExecutions");
        }
 public EthAddressNormalizer(IBlockchainsProvider blockchainsProvider)
 {
     _ethereum = blockchainsProvider.GetEthereum();
 }
 public XrpAddressNormalizer(IBlockchainsProvider blockchainsProvider)
 {
     _ripple = blockchainsProvider.GetRipple();
 }