amazon-qldb-kvs-nodejs
Version:
A helper module, simplifying basic interactions with Amazon Quantum Ledger Database for Node.js through a simple key-value store interface.
33 lines (32 loc) • 2.27 kB
TypeScript
import { TransactionExecutor } from "amazon-qldb-driver-nodejs";
import { GetRevisionCommandOutput, QLDB, ValueHolder } from "@aws-sdk/client-qldb";
import { dom } from "ion-js";
/**
* Get the revision data object for a specified document ID and block address.
* Also returns a proof of the specified revision for verification.
* @param ledgerName Name of the ledger containing the document to query.
* @param documentId Unique ID for the document to be verified, contained in the committed view of the document.
* @param blockAddress The location of the block to request.
* @param digestTipAddress The latest block location covered by the digest.
* @param qldbClient The QLDB control plane client to use.
* @returns Promise which fulfills with a GetRevisionResponse.
*/
export declare function getRevision(ledgerName: string, documentId: string, blockAddress: ValueHolder, digestTipAddress: ValueHolder, qldbClient: QLDB): Promise<GetRevisionCommandOutput>;
/**
* Get full revision data object including the metadata for a specified document ID and block address.
* @param txn An instance of transaction executor object.
* @param tableName The name of the table containing the document.
* @param documentId The Id of the document generated by QLDB during creation.
* @param transactionId An ID of a transaction, that created or updated the document and triggered creation of new document revision.
* @returns Promise which fulfills with Ion Value.
*/
export declare function getRevisionByDocIdAndTxId(txn: TransactionExecutor, tableName: string, documentId: string, transactionId: string): Promise<dom.Value>;
/**
* Get ledger metadata object for a specified document ID and block address.
* @param txn An instance of transaction executor object.
* @param tableName The name of the table containing the document.
* @param documentId The Id of the document generated by QLDB during creation.
* @param transactionId An ID of a transaction, that created or updated the document and triggered creation of new document revision.
* @returns Promise which fulfills with Ion Value.
*/
export declare function getRevisionMetadataByDocIdAndTxId(txn: TransactionExecutor, tableName: string, documentId: string, transactionId: string): Promise<dom.Value>;