public async Task <Block> GetBlockAsync(string headerHash) { var result = await PostAsync <GetBlockResult>(FullNodeRoutes.GetBlock(ApiUrl), new Dictionary <string, string>() { ["header_hash"] = headerHash, }); return(result.Block); }
public async Task <Block[]> GetBlocksAsync(int startHeight, int endHeight) { var result = await PostAsync <GetBlocksResult>(FullNodeRoutes.GetBlocks(ApiUrl), new Dictionary <string, string>() { ["start"] = $"{startHeight}", ["end"] = $"{endHeight}", }); return(result.Blocks); }
public async Task <BlockchainState> GetBlockchainStateAsync() { var result = await PostAsync <GetBlockchainStateResult>(FullNodeRoutes.GetBlockchainState(ApiUrl)); return(result.BlockchainState); }