public Block <MonitorAction> GetBlock(HashDigest <SHA256> blockHash)
        {
            var request = new GetBlock(blockHash);
            var reply   = SendMultipartMessageWithReply <Block>(request);

            return(Block <MonitorAction> .Deserialize(reply.Payload));
        }
Esempio n. 2
0
        /**<summary>
         * Return information about block.
         * </summary>**/
        /// See <see cref="GetBlock(string, Verbosity)"/>
        /// <param name="blockhash">The block hash.</param>
        /// <param name="verbosity">"VerbosityZero" for hex-encoded data, "VerbosityOne" for a json object, and "VerbosityTwo" for json object with transaction data.</param>
        public async Task <string> GetBlock(string blockhash, Verbosity verbosity = Verbosity.VerbosityOne)
        {
            GetBlock getBlock = new GetBlock {
                Blockhash = blockhash, Verbosity = verbosity
            };

            string response = await httpRequest.SendReq(MethodName.getblock, getBlock);

            return(response);
        }