public async Task <Transaction> GetTransaction(string txId) { var rpcRequest = RpcRequestFactory.CreateRpcRequest(1, BitcoinMethods.GetTransaction, txId); var rpcResponse = await rpcService.SendRequest <TransactionRpcResponse>(rpcRequest); return(mapper.Map <TransactionRpcResponse, Transaction>(rpcResponse.Result)); }
private async Task <Wallet> GetWalletFromBitcoinDaemon() { var rpcRequest = RpcRequestFactory.CreateRpcRequest(1, BitcoinMethods.GetWalletInfo); var rpcResponse = await rpcService.SendRequest <GetWalletInfoRpcResponse>(rpcRequest); return(mapper.Map <GetWalletInfoRpcResponse, Wallet>(rpcResponse.Result)); }
public async Task <string> SendBitcoins(SendBitcoinModel sendBitcoinModel) { var rpcRequest = RpcRequestFactory.CreateRpcRequest(1, BitcoinMethods.SendToAddress, sendBitcoinModel.Address, sendBitcoinModel.Amount); var rpcResponse = await rpcService.SendRequest <string>(rpcRequest); return(rpcResponse.Result); }