UNPKG

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.

25 lines (24 loc) 1.48 kB
import { TransactionExecutor } from "amazon-qldb-driver-nodejs"; import { QLDB } from "@aws-sdk/client-qldb"; import { LedgerMetadata } from "./GetMetadata"; /** * Verify a version of the document metadata for a given Key by retrieving it from the ledger. * @param txn The {@linkcode TransactionExecutor} for lambda execute. * @param ledgerName The ledger to get the digest from. * @param tableName The table name to query. * @param keyAttributeName A keyAttributeName to query. * @param keyAttributeValue The key of the given keyAttributeName. * @param qldbClient The QLDB control plane client to use. * @returns Promise which fulfills with void. * @throws Error: When verification fails. */ export declare function verifyDocumentMetadataWithLedgerData(txn: TransactionExecutor, ledgerName: string, tableName: string, keyAttributeName: string, keyAttributeValue: string, qldbClient: QLDB): Promise<void>; /** * Verify a version of the document metadata for the given Key using metadata provided by the user. * @param ledgerName The ledger to get the digest from. * @param qldbClient The QLDB control plane client to use. * @param userLedgerMetadata The {@linkcode LedgerMetadata} object to verify against the ledger. * @returns Promise which fulfills with boolean. * @throws Error: When verification fails. */ export declare function verifyDocumentMetadataWithUserData(ledgerName: string, qldbClient: QLDB, userLedgerMetadata: LedgerMetadata): Promise<boolean>;