UNPKG

postchain-client

Version:

Client library for accessing a Postchain node through REST.

17 lines (16 loc) 1.62 kB
/// <reference types="node" /> import { IClient } from "../blockchainClient/interface"; import { PubKey, ConfirmationProof, Transaction, StatusPolling, BufferId } from "../blockchainClient/types"; import { GTX } from "../gtx/types"; import { AnchoringTransaction, ResponseObjectClusterInfo, ResponseAnchoringTransaction } from "./types"; export declare function getClusterOfBlockchain(client: IClient, blockchainRid: Buffer): Promise<string>; export declare function getClusterInfo(client: IClient, name: string): Promise<ResponseObjectClusterInfo>; export declare function awaitGetAnchoringTransactionForBlockRid(client: IClient, blockchainRid: Buffer, blockRid: Buffer, systemAnchoringStatusPolling: StatusPolling): Promise<AnchoringTransaction | null>; export declare function getAnchoringTransactionForBlockRid(client: IClient, blockchainRid: Buffer, blockRid: Buffer): Promise<AnchoringTransaction | null>; export declare function convertToAnchoringTransaction(responseTx: ResponseAnchoringTransaction): AnchoringTransaction; export declare function calculateBlockRID(decodedTxProof: ConfirmationProof, merkleHashVersion: number): Buffer; export declare function fetchAndVerifyTransaction(sourceClient: IClient, txToProveRID: BufferId, proofHash: Buffer, txToProveSigners: PubKey[]): Promise<{ verifiedTx: GTX; verifiedTxHash: Buffer; }>; export declare function composeProofTransactionObject(sourceBlockchainRid: BufferId, verifiedTxHash: Buffer, txProof: ConfirmationProof, iccfTxSigners: Buffer[], anchoringTx?: AnchoringTransaction, anchoringProof?: ConfirmationProof, isNetwork?: boolean): Transaction;