public CryptoProviderService(IBitcoinService bitcoinService, IEthereumService ethereumService) { registeredServices = new Dictionary <string, ICryptoService>(); registeredServices.Add("BTC", bitcoinService); registeredServices.Add("ETH", ethereumService); }
static void Main(string[] args) { Console.WriteLine("Setting up!!"); // Bitcoind _BitcoinManager = new BitcoinService(ApplicationSettings.GetEncryptedString("BTCNodeDaemonURL"), ApplicationSettings.GetEncryptedString("BTCNodeJsonRPCUser"), ApplicationSettings.GetEncryptedString("BTCNodeJsonRPCPass"), "", 30); // Wallet passphrase will be put up later.. Console.WriteLine("Testing BTC Service..."); Console.WriteLine("Bitcoin Difficulty: " + _BitcoinManager.GetDifficulty()); //Console.WriteLine("" + _BitcoinManager.GetNetworkInfo().LocalServices); while (true) { Console.WriteLine(); // Here's the prepared hash = de6605800010593850355721072bcc44bd2c5683a111a615c41aad3a05b8ac70 //9c9dd22fc1a0222be84a756a19f8e1729941886b7b7e47f9eeb65780dbc88c62 Console.WriteLine("Enter a raw transaction: "); string input = Console.ReadLine(); if (input.Equals("quit")) { Environment.Exit(0); } var rawTxResp = _BitcoinManager.GetRawTransaction(input); Console.WriteLine(JObject.FromObject(rawTxResp)); } }
public ManageController( UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IEmailSender emailSender, ILogger <ManageController> logger, UrlEncoder urlEncoder, IMerchantRepository merchantRepository, ITransactionRepository transactionRepository, ILogRepository logRepository, IMapper mapper, IBitcoinService bitcoinService, ISubscriptionsRepository subscriptionsRepository, IConfiguration configuration, IEthereumService ethereumService) { _userManager = userManager; _signInManager = signInManager; _emailSender = emailSender; _logger = logger; _merchantRepository = merchantRepository; _transactionRepository = transactionRepository; _logRepository = logRepository; _mapper = mapper; _bitcoinService = bitcoinService; _subscriptionsRepository = subscriptionsRepository; _configuration = configuration; _ethereumService = ethereumService; }
public BitcoinController(ITransactionService transactionService, IBitcoinService bitcoinService, IWalletService walletService, IUnitOfWork unitOfWork, IMapper mapper) { this.unitOfWork = unitOfWork; this.mapper = mapper; this.bitcoinService = bitcoinService; this.transactionService = transactionService; }
public WalletService(EtheriumService etheriumService, ZCashService zCashService, ILitecoinService litecoinService, IDogecoinService dogecoinService, IDashService dashService, IBitcoinService bitcoinService, IBitcoinCashService bitcoinCashService) { _etheriumService = etheriumService; _zCashService = zCashService; _litecoinService = litecoinService; _dogecoinService = dogecoinService; _dashService = dashService; _bitcoinService = bitcoinService; _bitcoinCashService = bitcoinCashService; }
public SyncPersonalWalletCommandHandler( IFortifex4DBContext context, IDateTimeOffsetService dateTimeOffset, IBitcoinService bitcoinService, IEthereumService ethereumService, IDogecoinService dogecoinService, ISteemService steemService, IHiveService hiveService) { _context = context; _dateTimeOffset = dateTimeOffset; _bitcoinService = bitcoinService; _ethereumService = ethereumService; _dogecoinService = dogecoinService; _steemService = steemService; _hiveService = hiveService; }
public PurchaserController(ITransactionRepository transactionRepository, IBitcoinService bitcoinService, UserManager <ApplicationUser> userManager, IMerchantRepository merchantRepository, ILogger <PurchaserController> logger, ILogRepository logRepository, IMapper mapper, IEthereumService ethereumService, IEmailSender emailSender) { _transactionRepository = transactionRepository; _bitcoinService = bitcoinService; _userManager = userManager; _merchantRepository = merchantRepository; _logger = logger; _logRepository = logRepository; _mapper = mapper; _ethereumService = ethereumService; _emailSender = emailSender; }
public CoinManager(IBitcoinCashService bitcoinCash, IBitcoinService bitcoin, IDashService dash, IDogecoinService dogecoin, ILitecoinService litecoin) { _bitcoinCashService = bitcoinCash; _bitcoinService = bitcoin; _dashService = dash; _dogecoinService = dogecoin; _litecoinService = litecoin; _coinServices = new List <ICoinService>(); _coinServices.Add(bitcoinCash); _coinServices.Add(bitcoin); _coinServices.Add(dash); _coinServices.Add(dogecoin); _coinServices.Add(litecoin); }
public BitcoinController(IBitcoinService bitcoinService) { _bitcoinService = bitcoinService; }
// GET: /Home/ public HomeController() { _bitcoinService = new BitcoinService(useTestnet: true); }
public AssetService(IRequestProvider requestProvider, IBitcoinService bitcoinService, IAssetRepository assetRepository) { _requestProvider = requestProvider; _bitcoinService = bitcoinService; _assetRepository = assetRepository; }
public BitcoinController(IBitcoinService service) { this.bitcoinService = service; }
// // GET: /Home/ public HomeController() { _baseBtcConnector = new BaseBtcConnector(); _bitcoinService = new BitcoinService(); }
public WalletController(IBitcoinService bitcoinService, ILoggerFactory loggerFactory) { _bitcoinService = bitcoinService; _logger = loggerFactory?.CreateLogger <WalletController>(); }
// GET: /Home/ public HomeController() { _bitcoinService = new BitcoinService(); }
public BitcoinSocketHandler(IBitcoinService bitcoinService, ILoggerFactory loggerFactory) : base(loggerFactory) { _bitcoinService = bitcoinService; }
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ApplicationDbContext context, ILoggerFactory loggerFactory, WatcherService watcher, IEmailSender emailSender, IRateCache rateCache, IBitcoinService bitcoinService, IGraftWalletService graftWalletService) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); } else { app.UseExceptionHandler("/Error/Error"); app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseCookiePolicy(); app.UseAuthentication(); app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "GRAFT Exchange Broker API V1"); }); app.UseMiddleware(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); watcher.Add(rateCache); watcher.Add(emailSender); watcher.Add(bitcoinService); watcher.Add(graftWalletService); // comment this line if you want to apply the migrations as a separate process context.Database.Migrate(); BitcoinService.Init(options => { options.IsTestNetwork = Configuration["BitcoinService:NetworkType"] != "MainNet"; options.TryCount = 2; options.DelayMs = 2000; options.LoggerFactory = loggerFactory; options.DbContext = context; options.BitcoinExtPubKeyString = Configuration["BitcoinService:BitcoinExtPubKeyString"]; }); EthereumService.Init( ConnectionString, loggerFactory, Configuration["EthereumService:NetworkType"] != "MainNet", Configuration["EthereumService:EthereumPoolWalletPassword"], Configuration["EthereumService:EthereumGethNodeUrl"], Configuration["EthereumService:EthereumBrokerWallet"], Convert.ToDecimal(Configuration["EthereumService:EthereumPoolDrainLimit"])); bitcoinService.Ping(); GraftWalletService.Init(context, Configuration["GraftWalletService:RpcUrl"], ConnectionString, loggerFactory); }
public BitcoinController(IBitcoinService bitcoinService) { _bitcoinService = bitcoinService; //decimal conf; }