UNPKG

postchain-client

Version:

Client library for accessing a Postchain node through REST.

16 lines (15 loc) 1.35 kB
/// <reference types="node" /> import { IClient } from "../blockchainClient/interface"; import { PubKey, ConfirmationProof, Transaction } 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 getAnchoringTransactionForBlockRid(client: IClient, blockchainRid: Buffer, blockRid: Buffer): Promise<AnchoringTransaction>; export declare function convertToAnchoringTransaction(responseTx: ResponseAnchoringTransaction): AnchoringTransaction; export declare function calculateBlockRID(decodedTxProof: ConfirmationProof): Buffer; export declare function fetchAndVerifyTransaction(sourceClient: IClient, txToProveRID: Buffer, proofHash: Buffer, txToProveSigners: PubKey[]): Promise<{ verifiedTx: GTX; verifiedTxHash: Buffer; }>; export declare function composeProofTransactionObject(sourceBlockchainRid: string, verifiedTxHash: Buffer, txProof: ConfirmationProof, iccfTxSigners: Buffer[], anchoringTx?: AnchoringTransaction, anchoringProof?: ConfirmationProof, isNetwork?: boolean): Transaction;