Beispiel #1
0
        /// <summary>
        /// Get Transaction Merkle Path by height and transactionHash
        /// </summary>
        /// <param name="height"></param>
        /// <param name="transactionHash"></param>
        /// <returns>IObservable&lt;MerklePath&gt;</returns>
        public IObservable <MerklePath> GetTransactionMerklePath(ulong height, string transactionHash)
        {
            var route = $"{BasePath}/block/{height}/transaction/{transactionHash}/merkle";

            return(Observable.FromAsync(async ar => await route.GetJsonAsync <MerkleProofInfoDTO>())
                   .Select(i => MerklePath.FromDto(i)));
        }
Beispiel #2
0
        /// <summary>
        /// Gets receipt merkle path by given block height and recipentHash.
        /// </summary>
        /// <param name="height"></param>
        /// <param name="receiptHash"></param>
        /// <returns>IObservable&lt;MerklePath&gt;</returns>
        public IObservable <MerklePath> GetReceiptMerklePath(ulong height, string receiptHash)
        {
            var route = $"{BasePath}/block/{height}/receipt/{receiptHash}/merkle";

            return(Observable.FromAsync(async ar => await route.GetJsonAsync <MerkleProofInfoDTO>())
                   .Select(i => MerklePath.FromDto(i)));
        }