public async Task <IRpcBlock> GetBlock(long height)
        {
            var blockHash = await _blockHashService.GetBlockHash(height);

            var result = await _walletRpcService.Request(RpcMethods.GetBlock, blockHash);

            result.Result.Json = result.Json;
            return(result.Result);
        }
        public async Task <IRpcTransaction> GetTransaction(string txId)
        {
            var result = await _walletRpcService.Request(RpcMethods.GetRawTransaction, txId, 1);

            if (result?.Result == null)
            {
                return(null);
            }

            result.Result.Json = result.Json;
            return(result.Result);
        }
Example #3
0
        public async Task <string> GetBlockHash(long height)
        {
            var result = await _walletRpcService.Request(RpcMethods.GetBlockHash, height);

            return(result.Result);
        }
        public async Task <long> GetBlockCount()
        {
            var result = await _walletRpcService.Request(RpcMethods.GetBlockCount);

            return(result.Result);
        }