/** * Catapult REST Endpoints * OpenAPI Specification of catapult-rest * * The version of the OpenAPI document: 1.0.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { BlockInfoDTO, BlockOrderByEnum, BlockPage, MerkleProofInfoDTO, Order } from '../models/index'; export interface GetBlockByHeightRequest { height: string; } export interface GetMerkleReceiptsRequest { height: string; hash: string; } export interface GetMerkleTransactionRequest { height: string; hash: string; } export interface SearchBlocksRequest { signerPublicKey?: string; beneficiaryAddress?: string; pageSize?: number; pageNumber?: number; offset?: string; order?: Order; orderBy?: BlockOrderByEnum; } /** * */ export declare class BlockRoutesApi extends runtime.BaseAPI { /** * Gets a block from the chain that has the given height. * Get block information */ getBlockByHeightRaw(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Gets a block from the chain that has the given height. * Get block information */ getBlockByHeight(requestParameters: GetBlockByHeightRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Returns the merkle path for a receipt statement or resolution linked to a block. The merkle path is the minimum number of nodes needed to calculate the merkle root. Steps to calculate the merkle root: 1. proofHash = hash (leaf). 2. Concatenate proofHash with the first unprocessed item from the merklePath list as follows: * a) If item.position == left -> proofHash = sha_256(item.hash + proofHash). * b) If item.position == right -> proofHash = sha_256(proofHash+ item.hash). 3. Repeat 2. for every item in the merklePath list. 4. Compare if the calculated proofHash equals the one recorded in the block header (block.receiptsHash) to verify if the statement was linked with the block. * Get the merkle path for a given a receipt statement hash and block */ getMerkleReceiptsRaw(requestParameters: GetMerkleReceiptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns the merkle path for a receipt statement or resolution linked to a block. The merkle path is the minimum number of nodes needed to calculate the merkle root. Steps to calculate the merkle root: 1. proofHash = hash (leaf). 2. Concatenate proofHash with the first unprocessed item from the merklePath list as follows: * a) If item.position == left -> proofHash = sha_256(item.hash + proofHash). * b) If item.position == right -> proofHash = sha_256(proofHash+ item.hash). 3. Repeat 2. for every item in the merklePath list. 4. Compare if the calculated proofHash equals the one recorded in the block header (block.receiptsHash) to verify if the statement was linked with the block. * Get the merkle path for a given a receipt statement hash and block */ getMerkleReceipts(requestParameters: GetMerkleReceiptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Returns the merkle path for a transaction included in a block. The merkle path is the minimum number of nodes needed to calculate the merkle root. Steps to calculate the merkle root: 1. proofHash = hash (leaf). 2. Concatenate proofHash with the first unprocessed item from the merklePath list as follows: * a) If item.position == left -> proofHash = sha_256(item.hash + proofHash). * b) If item.position == right -> proofHash = sha_256(proofHash+ item.hash). 3. Repeat 2. for every item in the merklePath list. 4. Compare if the calculated proofHash equals the one recorded in the block header (block.transactionsHash) to verify if the transaction was included in the block. * Get the merkle path for a given a transaction and block */ getMerkleTransactionRaw(requestParameters: GetMerkleTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns the merkle path for a transaction included in a block. The merkle path is the minimum number of nodes needed to calculate the merkle root. Steps to calculate the merkle root: 1. proofHash = hash (leaf). 2. Concatenate proofHash with the first unprocessed item from the merklePath list as follows: * a) If item.position == left -> proofHash = sha_256(item.hash + proofHash). * b) If item.position == right -> proofHash = sha_256(proofHash+ item.hash). 3. Repeat 2. for every item in the merklePath list. 4. Compare if the calculated proofHash equals the one recorded in the block header (block.transactionsHash) to verify if the transaction was included in the block. * Get the merkle path for a given a transaction and block */ getMerkleTransaction(requestParameters: GetMerkleTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Gets an array of bocks. * Search blocks */ searchBlocksRaw(requestParameters: SearchBlocksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Gets an array of bocks. * Search blocks */ searchBlocks(requestParameters?: SearchBlocksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; }