コード例 #1
0
        public WalletService(
            ICqrsEngine cqrsEngine,
            IBlockchainWalletsRepository walletRepository,
            IBlockchainSignFacadeClient blockchainSignFacadeClient,
            IAddressParser addressParser,
            IFirstGenerationBlockchainWalletRepository firstGenerationBlockchainWalletRepository,
            IAssetsServiceWithCache assetsServiceWithCache,
            IBlockchainExtensionsService blockchainExtensionsService,
            IAddressService addressService,
            ILegacyWalletService legacyWalletService,
            ILogFactory logFactory)
        {
            _cqrsEngine                 = cqrsEngine ?? throw new ArgumentNullException(nameof(cqrsEngine));
            _walletRepository           = walletRepository ?? throw new ArgumentNullException(nameof(walletRepository));
            _blockchainSignFacadeClient = blockchainSignFacadeClient ??
                                          throw new ArgumentNullException(nameof(blockchainSignFacadeClient));
            _addressParser = addressParser ?? throw new ArgumentNullException(nameof(addressParser));
            _firstGenerationBlockchainWalletRepository = firstGenerationBlockchainWalletRepository ??
                                                         throw new ArgumentNullException(
                                                                   nameof(firstGenerationBlockchainWalletRepository));
            _assetsServiceWithCache =
                assetsServiceWithCache ?? throw new ArgumentNullException(nameof(assetsServiceWithCache));
            _blockchainExtensionsService = blockchainExtensionsService ?? throw new ArgumentNullException(nameof(blockchainExtensionsService));
            _addressService      = addressService ?? throw new ArgumentNullException(nameof(addressService));
            _legacyWalletService = legacyWalletService ?? throw new ArgumentNullException(nameof(legacyWalletService));

            if (logFactory == null)
            {
                throw new ArgumentNullException(nameof(logFactory));
            }
            _log = logFactory.CreateLog(this);
        }
 public DialogConditionsController(
     IDialogConditionsService dialogConditionsService,
     IAssetsServiceWithCache assetsService)
 {
     _dialogConditionsService = dialogConditionsService;
     _assetsService           = assetsService;
 }
コード例 #3
0
 public OrdersController(
     IRequestContext requestContext,
     IClientSessionsClient clientSessionsClient,
     IPersonalDataService personalDataService,
     IKycStatusService kycStatusService,
     IClientAccountClient clientAccountClient,
     IAssetsServiceWithCache assetsServiceWithCache,
     IMatchingEngineClient matchingEngineClient,
     FeeSettings feeSettings,
     IOperationsClient operationsClient,
     BaseSettings baseSettings,
     IcoSettings icoSettings,
     GlobalSettings globalSettings,
     IHistoryClient historyClient)
 {
     _requestContext         = requestContext;
     _clientSessionsClient   = clientSessionsClient;
     _personalDataService    = personalDataService;
     _kycStatusService       = kycStatusService;
     _clientAccountClient    = clientAccountClient;
     _assetsServiceWithCache = assetsServiceWithCache;
     _matchingEngineClient   = matchingEngineClient;
     _feeSettings            = feeSettings;
     _operationsClient       = operationsClient;
     _baseSettings           = baseSettings;
     _icoSettings            = icoSettings;
     _globalSettings         = globalSettings;
     _historyClient          = historyClient;
 }
コード例 #4
0
 public LykkeAssetsResolver(
     AssetsMapSettings assetsMap,
     IAssetsServiceWithCache assetsService)
 {
     _assetsMap     = assetsMap;
     _assetsService = assetsService;
 }
コード例 #5
0
 public PurposeOfPaymentBuilder(
     IClientAccountClient clientAccountClient,
     IAssetsServiceWithCache assetsService)
 {
     _clientAccountClient = clientAccountClient;
     _assetsService       = assetsService;
 }
コード例 #6
0
 public OrdersController(
     IRequestContext requestContext,
     ILykkePrincipal lykkePrincipal,
     IClientSessionsClient clientSessionsClient,
     IPersonalDataService personalDataService,
     IKycStatusService kycStatusService,
     IClientAccountClient clientAccountClient,
     IAssetsServiceWithCache assetsServiceWithCache,
     IMatchingEngineClient matchingEngineClient,
     ILimitOrdersRepositoryClient limitOrdersRepository,
     FeeSettings feeSettings,
     IOperationsClient operationsClient,
     BaseSettings baseSettings,
     IcoSettings icoSettings,
     GlobalSettings globalSettings)
 {
     _requestContext         = requestContext;
     _lykkePrincipal         = lykkePrincipal;
     _clientSessionsClient   = clientSessionsClient;
     _personalDataService    = personalDataService;
     _kycStatusService       = kycStatusService;
     _clientAccountClient    = clientAccountClient;
     _assetsServiceWithCache = assetsServiceWithCache;
     _matchingEngineClient   = matchingEngineClient;
     _limitOrdersRepository  = limitOrdersRepository;
     _feeSettings            = feeSettings;
     _operationsClient       = operationsClient;
     _baseSettings           = baseSettings;
     _icoSettings            = icoSettings;
     _globalSettings         = globalSettings;
 }
コード例 #7
0
 public OperationsController(
     IAssetsServiceWithCache assetsServiceWithCache,
     IBalancesClient balancesClient,
     IKycStatusService kycStatusService,
     IClientAccountClient clientAccountClient,
     FeeSettings feeSettings,
     BaseSettings baseSettings,
     IOperationsClient operationsClient,
     ICqrsEngine cqrsEngine,
     IRequestContext requestContext,
     IConfirmationCodesClient confirmationCodesClient,
     Google2FaService google2FaService)
 {
     _assetsServiceWithCache  = assetsServiceWithCache;
     _balancesClient          = balancesClient;
     _kycStatusService        = kycStatusService;
     _clientAccountClient     = clientAccountClient;
     _feeSettings             = feeSettings;
     _baseSettings            = baseSettings;
     _operationsClient        = operationsClient;
     _cqrsEngine              = cqrsEngine;
     _requestContext          = requestContext;
     _confirmationCodesClient = confirmationCodesClient;
     _google2FaService        = google2FaService;
 }
コード例 #8
0
 public QuoteService(
     IAssetsServiceWithCache assetsServiceWithCache,
     IRateCalculatorClient rateCalculatorClient)
 {
     _assetsServiceWithCache = assetsServiceWithCache;
     _rateCalculatorClient   = rateCalculatorClient;
 }
        public DepositWalletsBalanceProcessingPeriodicalHandler(
            ILogFactory logFactory,
            TimeSpan period,
            int batchSize,
            string blockchainType,
            IBlockchainApiClientProvider blockchainApiClientProvider,
            ICqrsEngine cqrsEngine,
            IAssetsServiceWithCache assetsService,
            IEnrolledBalanceRepository enrolledBalanceRepository,
            IHotWalletsProvider hotWalletsProvider,
            ICashinRepository cashinRepository,
            IDepositWalletLockRepository depositWalletLockRepository,
            IChaosKitty chaosKitty)
        {
            _logFactory                  = logFactory;
            _batchSize                   = batchSize;
            _blockchainType              = blockchainType;
            _blockchainApiClient         = blockchainApiClientProvider.Get(blockchainType);
            _cqrsEngine                  = cqrsEngine;
            _assetsService               = assetsService;
            _enrolledBalanceRepository   = enrolledBalanceRepository;
            _hotWalletsProvider          = hotWalletsProvider;
            _cashinRepository            = cashinRepository;
            _depositWalletLockRepository = depositWalletLockRepository;
            _chaosKitty                  = chaosKitty;

            _timer = new TimerTrigger(
                $"{nameof(DepositWalletsBalanceProcessingPeriodicalHandler)} : {blockchainType}",
                period,
                _logFactory);

            _timer.Triggered += ProcessBalancesAsync;
        }
コード例 #10
0
 public SrvEthereumHelper(
     IEthereumCoreAPI ethereumApi,
     IAssetsServiceWithCache assetsServiceWithCache)
 {
     _addressUtil            = new AddressUtil();
     _ethereumApi            = ethereumApi;
     _assetsServiceWithCache = assetsServiceWithCache;
 }
 public LiquidityEngineTradesPublisher(ITelegramSender telegramSender, IChatPublisherSettings publisherSettings,
                                       LiquidityEngineUrlSettings settings, IAssetsServiceWithCache assetsServiceWithCache,
                                       ILogFactory logFactory)
     : base(telegramSender, publisherSettings, logFactory)
 {
     _settings = settings;
     _assetsServiceWithCache = assetsServiceWithCache;
 }
コード例 #12
0
 public ValidationService(
     IAssetsServiceWithCache assetsService,
     IBalancesClient balancesClient
     )
 {
     _assetsService  = assetsService;
     _balancesClient = balancesClient;
 }
コード例 #13
0
 public AssetService(IAssetRepository assetRepository, ILogFactory logFactory,
                     IAssetsServiceWithCache assetsServiceWithCache,
                     IMemoryCache memoryCache)
 {
     _assetRepository        = assetRepository;
     _assetsServiceWithCache = assetsServiceWithCache;
     _memoryCache            = memoryCache;
     _log = logFactory.CreateLog(this);
 }
コード例 #14
0
 public ContextFactory(
     IClientTradesFactory clientTradesFactory,
     IClientAccountClient clientAccountClient,
     IAssetsServiceWithCache assetsServiceWithCache)
 {
     _clientTradesFactory    = clientTradesFactory;
     _clientAccountClient    = clientAccountClient;
     _assetsServiceWithCache = assetsServiceWithCache;
 }
 public LimitOrderCommandHandler(
     IClientAccountClient clientAccountClient,
     ILimitOrdersRepository limitOrdersRepository,
     IAssetsServiceWithCache assetsServiceWithCache)
 {
     _clientAccountClient    = clientAccountClient;
     _limitOrdersRepository  = limitOrdersRepository;
     _assetsServiceWithCache = assetsServiceWithCache;
 }
コード例 #16
0
ファイル: AssetsHelper.cs プロジェクト: kobzev/LykkeWalletAPI
 public AssetsHelper(
     IAssetsService assetsService,
     IAssetsServiceWithCache assetsServiceWithCache,
     ICacheManager memoryCache
     )
 {
     _assetsService          = assetsService;
     _assetsServiceWithCache = assetsServiceWithCache;
     _memoryCache            = memoryCache;
 }
        private async Task InitializeAsync(IAssetsServiceWithCache assetsServiceClient)
        {
            var allAssets = await assetsServiceClient.GetAllAssetsAsync(includeNonTradable : true);

            _ercTokenAssets = allAssets
                              .Where(x => x.Blockchain == Blockchain.Ethereum &&
                                     string.IsNullOrWhiteSpace(x.BlockchainIntegrationLayerId) &&
                                     !string.IsNullOrWhiteSpace(x.BlockChainAssetId))
                              .ToDictionary(x => x.BlockChainAssetId.ToLower());
        }
 public LiquidityEngineSummaryChannel(
     IReportChannel channel,
     ITelegramSender telegramSender,
     ILogFactory logFactory,
     LiquidityEngineUrlSettings settings,
     IAssetsServiceWithCache assetsServiceWithCache)
     : base(channel, telegramSender, logFactory)
 {
     _settings = settings;
     _assetsServiceWithCache = assetsServiceWithCache;
 }
コード例 #19
0
 public CashoutsSaga(
     IForwardWithdrawalRepository repository,
     IBitCoinTransactionsRepository bitCoinTransactionsRepository,
     IAssetsServiceWithCache assetsServiceWithCache,
     ILogFactory logFactory)
 {
     _repository = repository;
     _bitCoinTransactionsRepository = bitCoinTransactionsRepository;
     _assetsServiceWithCache        = assetsServiceWithCache;
     _log = logFactory.CreateLog(this);
 }
        public SamuraiBalanceProvider(
            string url,
            BlockchainAsset nativeAsset,
            IAssetsServiceWithCache assetsServiceClient)
        {
            _nativeAsset = nativeAsset;
            _client      = new SamuraiClient(url);
            _tokensCache = new Dictionary <string, SamuraiErc20TokenResponse>();

            AsyncInitialization = InitializeAsync(assetsServiceClient);
        }
コード例 #21
0
 public CommandsHandler(ILogFactory logFactory,
                        IForwardWithdrawalRepository repository,
                        IExchangeOperationsServiceClient exchangeOperationsService,
                        string hotWalletId,
                        IAssetsServiceWithCache assetsServiceWithCache)
 {
     _log        = logFactory.CreateLog(this);
     _repository = repository;
     _exchangeOperationsService = exchangeOperationsService;
     _hotWalletId            = hotWalletId;
     _assetsServiceWithCache = assetsServiceWithCache;
 }
コード例 #22
0
 public LimitOrderCommandHandler(
     IClientAccountClient clientAccountClient,
     ILimitOrdersRepository limitOrdersRepository,
     IAssetsServiceWithCache assetsServiceWithCache,
     ILogFactory logFactory
     )
 {
     _clientAccountClient    = clientAccountClient;
     _limitOrdersRepository  = limitOrdersRepository;
     _assetsServiceWithCache = assetsServiceWithCache;
     _log = logFactory.CreateLog(this);
 }
コード例 #23
0
ファイル: RateController.cs プロジェクト: LykkeCity/LykkePay
 public RateController(IMemoryCache cache,
                       PayServiceRatesSettings settings,
                       IAssertPairHistoryRepository assertPairHistoryRepository,
                       ILykkeMarketProfile lykkeMarketProfile,
                       IAssetsServiceWithCache assetsServiceWithCache)
 {
     _cache    = cache;
     _settings = settings;
     _assertPairHistoryRepository = assertPairHistoryRepository;
     _lykkeMarketProfile          = lykkeMarketProfile;
     _assetsServiceWithCache      = assetsServiceWithCache;
 }
コード例 #24
0
 public StartCashoutCommandsHandler(
     ILogFactory logFactory,
     IBlockchainConfigurationsProvider blockchainConfigurationProvider,
     IAssetsServiceWithCache assetsService,
     IHttpClientFactory httpClientFactory
     )
 {
     _log = logFactory.CreateLog(this);
     _blockchainConfigurationProvider = blockchainConfigurationProvider ?? throw new ArgumentNullException(nameof(blockchainConfigurationProvider));
     _assetsService  = assetsService ?? throw new ArgumentNullException(nameof(assetsService));
     _opsGenieClient = httpClientFactory.CreateClient(HttpClientNames.Opsgenie);
 }
コード例 #25
0
 public CrossRateInstrumentService(
     ICrossRateInstrumentRepository crossRateInstrumentRepository,
     IAssetsServiceWithCache assetsServiceWithCache,
     IQuoteService quoteService,
     ILogFactory logFactory)
 {
     _crossRateInstrumentRepository = crossRateInstrumentRepository;
     _assetsServiceWithCache        = assetsServiceWithCache;
     _quoteService = quoteService;
     _cache        = new InMemoryCache <CrossRateInstrument>(instrument => instrument.AssetPairId, false);
     _log          = logFactory.CreateLog(this);
 }
コード例 #26
0
        public EthereumBalanceProvider(
            EthereumSettings settings,
            IAssetsServiceWithCache assetsServiceClient)
        {
            _balanceProvider = new SamuraiBalanceProvider
                               (
                settings.SamuraiApiUrl,
                new BlockchainAsset("ETH", "ETH", "ETH"),
                assetsServiceClient
                               );

            AsyncInitialization = InitializeAsync();
        }
コード例 #27
0
 public LegacyWalletService(
     IFirstGenerationBlockchainWalletRepository firstGenerationBlockchainWalletRepository,
     ISrvSolarCoinHelper srvSolarCoinHelper,
     IAssetsServiceWithCache assetsServiceWithCache,
     ISrvEthereumHelper srvEthereumHelper,
     ISrvBlockchainHelper srvBlockchainHelper)
 {
     _firstGenerationBlockchainWalletRepository = firstGenerationBlockchainWalletRepository;
     _srvSolarCoinHelper     = srvSolarCoinHelper;
     _assetsServiceWithCache = assetsServiceWithCache;
     _srvEthereumHelper      = srvEthereumHelper;
     _srvBlockchainHelper    = srvBlockchainHelper;
 }
コード例 #28
0
 public ClientService(
     ISwiftCredentialsRepository swiftCredentialsRepository,
     IPersonalDataService personalDataService,
     IAssetsServiceWithCache assetsServiceWithCache,
     IClientSwiftCredentialsCache clientSwiftCredentialsCache,
     ILog log)
 {
     _swiftCredentialsRepository  = swiftCredentialsRepository;
     _personalDataService         = personalDataService;
     _assetsServiceWithCache      = assetsServiceWithCache;
     _clientSwiftCredentialsCache = clientSwiftCredentialsCache;
     _log = log;
 }
        public EthereumClassicBalanceProvider(
            EthereumClassicSettings settings,
            IAssetsServiceWithCache assetsServiceClient)
        {
            _balanceProvider = new SamuraiBalanceProvider
                               (
                settings.SamuraiApiUrl,
                new BlockchainAsset("ETC", "ETC", "915c4074-ec20-40ed-b8b7-5e3cc2f303b1"),
                assetsServiceClient
                               );

            AsyncInitialization = InitializeAsync();
        }
コード例 #30
0
 public EmailRequestController(
     ICqrsEngine cqrsEngine,
     IPersonalDataService personalDataService,
     IAssetsServiceWithCache assetsServiceWithCache,
     ISwiftCredentialsService swiftCredentialsService,
     IPurposeOfPaymentBuilder purposeOfPaymentBuilder)
 {
     _cqrsEngine              = cqrsEngine;
     _personalDataService     = personalDataService;
     _assetsService           = assetsServiceWithCache;
     _swiftCredentialsService = swiftCredentialsService;
     _purposeOfPaymentBuilder = purposeOfPaymentBuilder;
 }