/** * Copyright 2019 the orbs-client-sdk-javascript authors * This file is part of the orbs-client-sdk-javascript library in the Orbs project. * * This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. * The above notice should be included in all copies or substantial portions of the software. */ import { RequestStatus } from "./RequestStatus"; import { ExecutionResult } from "./ExecutionResult"; import { Argument } from "./Arguments"; import { Event } from "./Events"; export interface GetBlockRequest { protocolVersion: number; virtualChainId: number; blockHeight: bigint; } export interface GetBlockResponse { requestStatus: RequestStatus; blockHeight: bigint; blockTimestamp: Date; transactionsBlockHash: Uint8Array; transactionsBlockHeader: TransactionsBlockHeader; resultsBlockHash: Uint8Array; resultsBlockHeader: ResultsBlockHeader; transactions: BlockTransaction[]; } export interface TransactionsBlockHeader { protocolVersion: number; virtualChainId: number; blockHeight: bigint; prevBlockHash: Uint8Array; timestamp: Date; numTransactions: number; referenceTime: number; blockProposerAddress: Uint8Array; } export interface ResultsBlockHeader { protocolVersion: number; virtualChainId: number; blockHeight: bigint; prevBlockHash: Uint8Array; timestamp: Date; transactionsBlockHash: Uint8Array; numTransactionReceipts: number; referenceTime: number; blockProposerAddress: Uint8Array; } export interface BlockTransaction { txId: Uint8Array; txHash: Uint8Array; protocolVersion: number; virtualChainId: number; timestamp: Date; signerPublicKey: Uint8Array; contractName: string; methodName: string; inputArguments: Argument[]; executionResult: ExecutionResult; outputArguments: Argument[]; outputEvents: Event[]; } export declare function encodeGetBlockRequest(req: GetBlockRequest): Uint8Array; export declare function decodeGetBlockResponse(buf: Uint8Array): GetBlockResponse;