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.
34 lines (33 loc) • 1.23 kB
TypeScript
import { ValueHolder } from "@aws-sdk/client-qldb";
import { dom } from "ion-js";
export declare class BlockAddress {
_strandId: string;
_sequenceNo: number;
constructor(strandId: string, sequenceNo: number);
}
/**
* Convert a block address from an Ion value into a ValueHolder.
* Shape of the ValueHolder must be: {'IonText': "{strandId: <"strandId">, sequenceNo: <sequenceNo>}"}
* @param value The Ion value that contains the block address values to convert.
* @returns The ValueHolder that contains the strandId and sequenceNo.
*/
export declare function blockAddressToValueHolder(value: dom.Value): ValueHolder;
/**
* Helper method that to get the Metadata ID.
* @param value The Ion value.
* @returns The Metadata ID.
*/
export declare function getMetadataId(value: dom.Value): string;
/**
* Helper method to get the Sequence No.
* @param value The Ion value.
* @returns The Sequence No.
*/
export declare function getSequenceNo(value: dom.Value): number;
/**
* Helper method to get the Strand ID.
* @param value The Ion value.
* @returns The Strand ID.
*/
export declare function getStrandId(value: dom.Value): string;
export declare function getBlockAddressValue(value: dom.Value): dom.Value;