public LimitTradeQueue(
     AppSettings.RabbitMqSettings config,
     ILog log,
     IWalletCredentialsRepository walletCredentialsRepository,
     IOffchainRequestService offchainRequestService,
     IEthereumTransactionRequestRepository ethereumTransactionRequestRepository,
     ISrvEthereumHelper srvEthereumHelper,
     ICachedAssetsService assetsService,
     IBcnClientCredentialsRepository bcnClientCredentialsRepository,
     AppSettings.EthereumSettings settings,
     IEthClientEventLogs ethClientEventLogs,
     ILimitOrdersRepository limitOrdersRepository, IClientTradesRepository clientTradesRepository, ILimitTradeEventsRepository limitTradeEventsRepository, IClientSettingsRepository clientSettingsRepository, IAppNotifications appNotifications, IClientAccountsRepository clientAccountsRepository, IOffchainOrdersRepository offchainOrdersRepository, IClientCacheRepository clientCacheRepository, IBitcoinTransactionService bitcoinTransactionService)
 {
     _rabbitConfig = config;
     _walletCredentialsRepository          = walletCredentialsRepository;
     _offchainRequestService               = offchainRequestService;
     _ethereumTransactionRequestRepository = ethereumTransactionRequestRepository;
     _srvEthereumHelper = srvEthereumHelper;
     _assetsService     = assetsService;
     _bcnClientCredentialsRepository = bcnClientCredentialsRepository;
     _settings           = settings;
     _ethClientEventLogs = ethClientEventLogs;
     _log = log;
     _limitOrdersRepository      = limitOrdersRepository;
     _clientTradesRepository     = clientTradesRepository;
     _limitTradeEventsRepository = limitTradeEventsRepository;
     _clientSettingsRepository   = clientSettingsRepository;
     _appNotifications           = appNotifications;
     _clientAccountsRepository   = clientAccountsRepository;
     _offchainOrdersRepository   = offchainOrdersRepository;
     _clientCacheRepository      = clientCacheRepository;
     _bitcoinTransactionService  = bitcoinTransactionService;
 }
 public CashInOutQueue(AppSettings.RabbitMqSettings config, ILog log,
                       IBitcoinCommandSender bitcoinCommandSender,
                       ICashOperationsRepository cashOperationsRepository,
                       IWalletCredentialsRepository walletCredentialsRepository,
                       IBitCoinTransactionsRepository bitcoinTransactionsRepository,
                       IForwardWithdrawalRepository forwardWithdrawalRepository,
                       ICachedAssetsService assetsService,
                       IOffchainRequestService offchainRequestService,
                       IClientSettingsRepository clientSettingsRepository,
                       IEthereumTransactionRequestRepository ethereumTransactionRequestRepository,
                       ISrvEthereumHelper srvEthereumHelper,
                       IBcnClientCredentialsRepository bcnClientCredentialsRepository,
                       IEthClientEventLogs ethClientEventLogs,
                       IHistoryWriter historyWriter,
                       IBitcoinTransactionService bitcoinTransactionService)
 {
     _rabbitConfig                         = config;
     _log                                  = log;
     _bitcoinCommandSender                 = bitcoinCommandSender;
     _cashOperationsRepository             = cashOperationsRepository;
     _walletCredentialsRepository          = walletCredentialsRepository;
     _bitcoinTransactionsRepository        = bitcoinTransactionsRepository;
     _forwardWithdrawalRepository          = forwardWithdrawalRepository;
     _assetsService                        = assetsService;
     _offchainRequestService               = offchainRequestService;
     _clientSettingsRepository             = clientSettingsRepository;
     _ethereumTransactionRequestRepository = ethereumTransactionRequestRepository;
     _srvEthereumHelper                    = srvEthereumHelper;
     _bcnClientCredentialsRepository       = bcnClientCredentialsRepository;
     _ethClientEventLogs                   = ethClientEventLogs;
     _bitcoinTransactionService            = bitcoinTransactionService;
     _historyWriter                        = historyWriter;
 }
Esempio n. 3
0
 public TradeQueue(
     AppSettings.RabbitMqSettings config,
     ILog log,
     IBitcoinCommandSender bitcoinCommandSender,
     IWalletCredentialsRepository walletCredentialsRepository,
     IBitCoinTransactionsRepository bitcoinTransactionsRepository,
     IMarketOrdersRepository marketOrdersRepository,
     IClientTradesRepository clientTradesRepository,
     IOffchainRequestService offchainRequestService,
     IOffchainOrdersRepository offchainOrdersRepository,
     IEthereumTransactionRequestRepository ethereumTransactionRequestRepository,
     ISrvEthereumHelper srvEthereumHelper,
     ICachedAssetsService assetsService,
     IBcnClientCredentialsRepository bcnClientCredentialsRepository,
     AppSettings.EthereumSettings settings,
     IEthClientEventLogs ethClientEventLogs, IBitcoinTransactionService bitcoinTransactionService, IClientAccountsRepository clientAccountsRepository)
 {
     _rabbitConfig                         = config;
     _bitcoinCommandSender                 = bitcoinCommandSender;
     _walletCredentialsRepository          = walletCredentialsRepository;
     _bitcoinTransactionsRepository        = bitcoinTransactionsRepository;
     _marketOrdersRepository               = marketOrdersRepository;
     _clientTradesRepository               = clientTradesRepository;
     _offchainRequestService               = offchainRequestService;
     _offchainOrdersRepository             = offchainOrdersRepository;
     _ethereumTransactionRequestRepository = ethereumTransactionRequestRepository;
     _srvEthereumHelper                    = srvEthereumHelper;
     _assetsService                        = assetsService;
     _bcnClientCredentialsRepository       = bcnClientCredentialsRepository;
     _settings                  = settings;
     _ethClientEventLogs        = ethClientEventLogs;
     _bitcoinTransactionService = bitcoinTransactionService;
     _clientAccountsRepository  = clientAccountsRepository;
     _log = log;
 }
 public SrvClientFinder(IPersonalDataRepository personalDataRepository,
                        IClientAccountsRepository clientAccountsRepository, IWalletCredentialsRepository walletCredentialsRepository)
 {
     _personalDataRepository      = personalDataRepository;
     _clientAccountsRepository    = clientAccountsRepository;
     _walletCredentialsRepository = walletCredentialsRepository;
 }
 public EthereumEventsQueue(AppSettings.RabbitMqSettings config, ILog log,
                            IMatchingEngineClient matchingEngineClient,
                            ICashOperationsRepository cashOperationsRepository,
                            IClientAccountsRepository clientAccountsRepository,
                            ISrvEmailsFacade srvEmailsFacade,
                            IBcnClientCredentialsRepository bcnClientCredentialsRepository,
                            IPaymentTransactionsRepository paymentTransactionsRepository,
                            IWalletCredentialsRepository walletCredentialsRepository,
                            IClientTradesRepository clientTradesRepository,
                            IEthereumTransactionRequestRepository ethereumTransactionRequestRepository,
                            ICachedAssetsService assetsService)
 {
     _log = log;
     _matchingEngineClient                 = matchingEngineClient;
     _cashOperationsRepository             = cashOperationsRepository;
     _clientAccountsRepository             = clientAccountsRepository;
     _srvEmailsFacade                      = srvEmailsFacade;
     _bcnClientCredentialsRepository       = bcnClientCredentialsRepository;
     _paymentTransactionsRepository        = paymentTransactionsRepository;
     _walletCredentialsRepository          = walletCredentialsRepository;
     _clientTradesRepository               = clientTradesRepository;
     _ethereumTransactionRequestRepository = ethereumTransactionRequestRepository;
     _assetsService = assetsService;
     _rabbitConfig  = config;
 }
Esempio n. 6
0
 public ManualHubCashoutFunction(IOffchainSettingsRepository offchainSettingsRepository, ILog log, IOffchainRequestService offchainRequestService, ISlackNotificationsSender slackNotificationsSender, IWalletCredentialsRepository walletCredentialsRepository, IBitcoinApi bitcoinApi)
 {
     _offchainSettingsRepository = offchainSettingsRepository;
     _log = log;
     _offchainRequestService      = offchainRequestService;
     _slackNotificationsSender    = slackNotificationsSender;
     _walletCredentialsRepository = walletCredentialsRepository;
     _bitcoinApi = bitcoinApi;
 }
Esempio n. 7
0
        public MigrationJob(IKeyRepository keyRepository, IWalletCredentialsRepository walletCredentials, IConfiguration configuration)
        {
            _keyRepository     = keyRepository;
            _walletCredentials = walletCredentials;

            var sha = SHA256.Create();

            _password = sha.ComputeHash(Encoding.UTF8.GetBytes(configuration.GetValue <string>("BitcoinConfig:EncryptionPassword")));
        }
 public SrvBlockchainHelper(IWalletCredentialsRepository walletCredentialsRepository,
                            HttpRequestClient requestClient, BaseSettings settings, ILog log, IWalletCredentialsHistoryRepository walletCredentialsHistoryRepository)
 {
     _walletCredentialsRepository = walletCredentialsRepository;
     _requestClient = requestClient;
     _settings      = settings;
     _log           = log;
     _walletCredentialsHistoryRepository = walletCredentialsHistoryRepository;
 }
        public OffchainTransactionFinalizeFunction(
            IBitCoinTransactionsRepository bitCoinTransactionsRepository,
            ILog log,
            ICashOperationsRepository cashOperationsRepository,
            IExchangeOperationsService exchangeOperationsService,
            SrvSlackNotifications srvSlackNotifications,
            ICashOutAttemptRepository cashOutAttemptRepository,
            ISrvEmailsFacade srvEmailsFacade,
            IClientTradesRepository clientTradesRepository,
            IClientAccountsRepository clientAccountsRepository,
            IPersonalDataService personalDataService,
            IOffchainTransferRepository offchainTransferRepository,
            IChronoBankService chronoBankService,
            ISrvSolarCoinHelper srvSolarCoinHelper,
            ITransferEventsRepository transferEventsRepository,
            IQuantaService quantaService,
            IOffchainRequestService offchainRequestService,
            IWalletCredentialsRepository walletCredentialsRepository,
            IBitcoinApiClient bitcoinApiClient,
            IOffchainRequestRepository offchainRequestRepository,
            CachedDataDictionary <string, IAssetSetting> assetSettings,
            IMarginDataServiceResolver marginDataServiceResolver,
            IMarginTradingPaymentLogRepository marginTradingPaymentLog,
            IPaymentTransactionsRepository paymentTransactionsRepository,
            IAppNotifications appNotifications,
            ICachedAssetsService assetsService, IBitcoinTransactionService bitcoinTransactionService)
        {
            _bitCoinTransactionsRepository = bitCoinTransactionsRepository;
            _log = log;
            _cashOperationsRepository   = cashOperationsRepository;
            _exchangeOperationsService  = exchangeOperationsService;
            _srvSlackNotifications      = srvSlackNotifications;
            _cashOutAttemptRepository   = cashOutAttemptRepository;
            _srvEmailsFacade            = srvEmailsFacade;
            _clientTradesRepository     = clientTradesRepository;
            _clientAccountsRepository   = clientAccountsRepository;
            _personalDataService        = personalDataService;
            _offchainTransferRepository = offchainTransferRepository;
            _chronoBankService          = chronoBankService;
            _srvSolarCoinHelper         = srvSolarCoinHelper;
            _transferEventsRepository   = transferEventsRepository;
            _quantaService               = quantaService;
            _offchainRequestService      = offchainRequestService;
            _walletCredentialsRepository = walletCredentialsRepository;
            _bitcoinApiClient            = bitcoinApiClient;
            _offchainRequestRepository   = offchainRequestRepository;
            _assetSettings               = assetSettings;

            _marginDataServiceResolver     = marginDataServiceResolver;
            _marginTradingPaymentLog       = marginTradingPaymentLog;
            _paymentTransactionsRepository = paymentTransactionsRepository;
            _appNotifications          = appNotifications;
            _assetsService             = assetsService;
            _bitcoinTransactionService = bitcoinTransactionService;
        }
Esempio n. 10
0
 public BroadcastCommitmentFunction(IOffchainRequestService offchainRequestService, ILog logger,
                                    IBitcoinApi bitcoinApi, IWalletCredentialsRepository walletCredentialsRepository,
                                    IOffchainSettingsRepository offchainSettingsRepository, ISlackNotificationsSender slackNotificationsSender)
 {
     _offchainRequestService = offchainRequestService;
     _bitcoinApi             = bitcoinApi;
     _logger = logger;
     _walletCredentialsRepository = walletCredentialsRepository;
     _offchainSettingsRepository  = offchainSettingsRepository;
     _slackNotificationsSender    = slackNotificationsSender;
 }
Esempio n. 11
0
 public UserinfoController(
     ILog log,
     IApplicationRepository applicationRepository,
     IClientSessionsClient clientSessionsClient,
     IWalletCredentialsRepository walletCredentialsRepository,
     IClientAccountClient clientAccountClient)
 {
     _log = log;
     _applicationRepository       = applicationRepository;
     _clientSessionsClient        = clientSessionsClient;
     _walletCredentialsRepository = walletCredentialsRepository;
     _clientAccountClient         = clientAccountClient;
 }
Esempio n. 12
0
 public UserinfoController(
     IApplicationRepository applicationRepository,
     IKycRepository kycRepository,
     IClientAccountsRepository clientAccountsRepository,
     IClientsSessionsRepository clientsSessionsRepository,
     IWalletCredentialsRepository walletCredentialsRepository)
 {
     _applicationRepository       = applicationRepository;
     _kycRepository               = kycRepository;
     _clientAccountsRepository    = clientAccountsRepository;
     _clientsSessionsRepository   = clientsSessionsRepository;
     _walletCredentialsRepository = walletCredentialsRepository;
 }
Esempio n. 13
0
        public static async Task <string[]> GetAllClientMultisigs(this IWalletCredentialsRepository walletCredsRepo,
                                                                  IWalletCredentialsHistoryRepository walletHistoryCredsRepo, string clientId)
        {
            var currentCreds = await walletCredsRepo.GetAsync(clientId);

            var prevMultisigs = await walletHistoryCredsRepo.GetPrevMultisigsForUser(clientId);

            var res = new List <string>();

            res.Add(currentCreds.MultiSig);
            res.AddRange(prevMultisigs);

            return(res.Distinct().ToArray());
        }
 public OffchainService(IBitcoinApiClient bitcoinApiClient,
                        IWalletCredentialsRepository walletCredentialsRepository,
                        IOffchainTransferRepository offchainTransferRepository,
                        IOffchainEncryptedKeysRepository offchainEncryptedKeysRepository,
                        IOffchainFinalizeCommandProducer offchainFinalizeCommandProducer,
                        ILog logger)
 {
     _bitcoinApiClient                = bitcoinApiClient;
     _walletCredentialsRepository     = walletCredentialsRepository;
     _offchainTransferRepository      = offchainTransferRepository;
     _offchainEncryptedKeysRepository = offchainEncryptedKeysRepository;
     _offchainFinalizeCommandProducer = offchainFinalizeCommandProducer;
     _logger = logger;
 }
 public OperationsCommandHandler(
     [NotNull] ILogFactory logFactory,
     [NotNull] ITransactionsRepository transactionsRepository,
     [NotNull] ITransactionService transactionService,
     [NotNull] IWalletCredentialsRepository walletCredentialsRepository,
     [NotNull] IFeeCalculationService feeCalculationService,
     [NotNull] IOperationsClient operationsClient)
 {
     _log = logFactory.CreateLog(this) ?? throw new ArgumentNullException(nameof(logFactory));
     _transactionsRepository      = transactionsRepository ?? throw new ArgumentNullException(nameof(transactionsRepository));
     _transactionService          = transactionService ?? throw new ArgumentNullException(nameof(transactionService));
     _walletCredentialsRepository = walletCredentialsRepository ?? throw new ArgumentNullException(nameof(walletCredentialsRepository));
     _feeCalculationService       = feeCalculationService ?? throw new ArgumentNullException(nameof(feeCalculationService));
     _operationsClient            = operationsClient ?? throw new ArgumentNullException(nameof(operationsClient));
 }
Esempio n. 16
0
 public WalletsScannerFunctions(IWalletCredentialsRepository walletCredentialsRepository,
                                ILog log, IInternalOperationsRepository internalOperationsRepository,
                                ILastProcessedBlockRepository lastProcessedBlockRepository, IBalanceChangeTransactionsRepository balanceChangeTransactionsRepository,
                                IAppGlobalSettingsRepositry appGlobalSettingsRepositry,
                                ICqrsEngine cqrsEngine, IBcnClientCredentialsRepository bcnClientCredentialsRepository, IQBitNinjaApiCaller qbitNinjaApiCaller, AppSettings.NinjaSettings ninjaSettings)
 {
     _walletCredentialsRepository = walletCredentialsRepository;
     _log = log;
     _internalOperationsRepository        = internalOperationsRepository;
     _lastProcessedBlockRepository        = lastProcessedBlockRepository;
     _balanceChangeTransactionsRepository = balanceChangeTransactionsRepository;
     _appGlobalSettingsRepositry          = appGlobalSettingsRepositry;
     _cqrsEngine = cqrsEngine;
     _bcnClientCredentialsRepository = bcnClientCredentialsRepository;
     _qbitNinjaApiCaller             = qbitNinjaApiCaller;
     _ninjaSettings = ninjaSettings;
 }
Esempio n. 17
0
 public TransferQueue(AppSettings.RabbitMqSettings config, ILog log,
                      IBitcoinCommandSender bitcoinCommandSender,
                      ITransferEventsRepository transferEventsRepository,
                      IWalletCredentialsRepository walletCredentialsRepository,
                      IBitCoinTransactionsRepository bitCoinTransactionsRepository, IOffchainRequestService offchainRequestService, IClientSettingsRepository clientSettingsRepository, IBitcoinTransactionService bitcoinTransactionService, IClientAccountsRepository clientAccountsRepository)
 {
     _rabbitConfig                  = config;
     _log                           = log;
     _bitcoinCommandSender          = bitcoinCommandSender;
     _transferEventsRepository      = transferEventsRepository;
     _walletCredentialsRepository   = walletCredentialsRepository;
     _bitCoinTransactionsRepository = bitCoinTransactionsRepository;
     _offchainRequestService        = offchainRequestService;
     _clientSettingsRepository      = clientSettingsRepository;
     _bitcoinTransactionService     = bitcoinTransactionService;
     _clientAccountsRepository      = clientAccountsRepository;
 }
 public CashInOutMessageProcessor(
     [NotNull] ILogFactory logFactory,
     [NotNull] ICashOperationsRepositoryClient cashOperationsRepositoryClient,
     [NotNull] ITransactionsRepository transactionsRepository,
     [NotNull] IAssetsServiceWithCache assetsServiceWithCache,
     [NotNull] IWalletCredentialsRepository walletCredentialsRepository,
     [NotNull] IClientAccountClient clientAccountClient,
     [NotNull] ITransactionService transactionService,
     [NotNull] ICqrsEngine cqrsEngine,
     [NotNull] IBitcoinCashinRepository bitcoinCashinRepository)
 {
     _log = logFactory.CreateLog(this) ?? throw new ArgumentNullException(nameof(logFactory));
     _cashOperationsRepositoryClient = cashOperationsRepositoryClient ?? throw new ArgumentNullException(nameof(cashOperationsRepositoryClient));
     _transactionsRepository         = transactionsRepository ?? throw new ArgumentNullException(nameof(transactionsRepository));
     _assetsServiceWithCache         = assetsServiceWithCache ?? throw new ArgumentNullException(nameof(assetsServiceWithCache));
     _walletCredentialsRepository    = walletCredentialsRepository ?? throw new ArgumentNullException(nameof(walletCredentialsRepository));
     _clientAccountClient            = clientAccountClient ?? throw new ArgumentNullException(nameof(clientAccountClient));
     _transactionService             = transactionService ?? throw new ArgumentNullException(nameof(transactionService));
     _cqrsEngine = cqrsEngine ?? throw new ArgumentNullException(nameof(cqrsEngine));
     _bitcoinCashinTypeRepository = bitcoinCashinRepository ?? throw new ArgumentNullException(nameof(bitcoinCashinRepository));
 }
Esempio n. 19
0
 public OperationHistoryProjection(
     [NotNull] ILogFactory logFactory,
     [NotNull] ITradeOperationsRepositoryClient clientTradesRepository,
     [NotNull] ICashOperationsRepositoryClient cashOperationsRepositoryClient,
     [NotNull] ITransferOperationsRepositoryClient transferEventsRepositoryClient,
     [NotNull] Core.Services.BitCoin.ITransactionService transactionService,
     [NotNull] IAssetsServiceWithCache assetsServiceWithCache,
     [NotNull] IWalletCredentialsRepository walletCredentialsRepository,
     [NotNull] ILimitTradeEventsRepositoryClient limitTradeEventsRepositoryClient,
     [NotNull] IEthereumTransactionRequestRepository ethereumTransactionRequestRepository)
 {
     _limitTradeEventsRepositoryClient = limitTradeEventsRepositoryClient;
     _log = logFactory.CreateLog(this);
     _clientTradesRepository               = clientTradesRepository ?? throw new ArgumentNullException(nameof(clientTradesRepository));
     _cashOperationsRepositoryClient       = cashOperationsRepositoryClient ?? throw new ArgumentNullException(nameof(cashOperationsRepositoryClient));
     _transferEventsRepositoryClient       = transferEventsRepositoryClient ?? throw new ArgumentNullException(nameof(transferEventsRepositoryClient));
     _transactionService                   = transactionService ?? throw new ArgumentNullException(nameof(transactionService));
     _assetsServiceWithCache               = assetsServiceWithCache ?? throw new ArgumentNullException(nameof(assetsServiceWithCache));
     _walletCredentialsRepository          = walletCredentialsRepository ?? throw new ArgumentNullException(nameof(walletCredentialsRepository));
     _ethereumTransactionRequestRepository = ethereumTransactionRequestRepository ?? throw new ArgumentNullException(nameof(ethereumTransactionRequestRepository));
 }
Esempio n. 20
0
 public SrvBitcoinCommandProducer(IBitCoinCommandProducer bitCoinCommandProducer, IBitCoinTransactionsRepository bitCoinTransactionsRepository,
                                  IWalletCredentialsRepository walletCredentialsRepository, IAssetsRepository assetsRepository, ICashOperationsRepository cashOperationsRepository,
                                  IBalancePendingRepository balancePendingRepository, ILog log, BaseSettings baseSettings, IMatchingEngineConnector matchingEngineConnector,
                                  ITransferEventsRepository transferEventsRepository, ISrvBlockchainHelper srvBlockchainHelper, IWalletsRepository walletsRepository,
                                  ISrvBlockchainReader srvBlockchainReader, CachedDataDictionary <string, IAsset> assetsDict)
 {
     _bitCoinCommandProducer        = bitCoinCommandProducer;
     _bitCoinTransactionsRepository = bitCoinTransactionsRepository;
     _walletCredentialsRepository   = walletCredentialsRepository;
     _assetsRepository         = assetsRepository;
     _cashOperationsRepository = cashOperationsRepository;
     _balancePendingRepository = balancePendingRepository;
     _log = log;
     _matchingEngineConnector  = matchingEngineConnector;
     _transferEventsRepository = transferEventsRepository;
     _srvBlockchainHelper      = srvBlockchainHelper;
     _walletsRepository        = walletsRepository;
     _srvBlockchainReader      = srvBlockchainReader;
     _assetsDict   = assetsDict;
     _baseSettings = baseSettings;
 }
 public SrvBlockchainValidations(ISrvBlockchainReader srvBlockchainReader,
                                 IWalletCredentialsRepository walletCredentialsRepository)
 {
     _srvBlockchainReader         = srvBlockchainReader;
     _walletCredentialsRepository = walletCredentialsRepository;
 }