import { Kwil } from '../client/kwil'; import { SignerSupplier } from '../core/builders'; import { DeployOrDrop, EnvironmentType } from '../core/enums'; import { CompiledKuneiform, DropDbPayload } from '../core/payload'; import { AnySignatureType } from '../core/signature'; import { Transaction } from '../core/tx'; export interface DBOptions { signer: SignerSupplier; payload: () => CompiledKuneiform | DropDbPayload; identifier: Uint8Array; signatureType: AnySignatureType; chainId: string; description: string; nonce: number; } export declare class DB { private readonly kwil; private payloadType; private signer?; private payload?; private identifier?; private signatureType?; private chainId?; private description?; private nonce?; /** * Initializes a new `Kwil Database` instance. * * @param {Kwil} kwil - The Kwil client, used to call higher-level methods on the Kwil class. */ constructor(kwil: Kwil, payloadType: DeployOrDrop, options: Partial); /** * Static factory method to create a new Kwil Database instance. * * @param kwil - The Kwil client. * @param options - The options to configure the Kwil Database instance. */ static create(kwil: Kwil, payloadType: DeployOrDrop, options: Partial): DB; /** * Builds a Transaction. This will call the kwil network to retrieve the nonce for the signer. * * @returns {Promise} - A promise that resolves to a `Transaction` object. The `Transaction` object can be broadcasted to the Kwil network using `kwil.broadcast(tx)`. * @throws Will throw an error if there are any errors in the payload. * @throws Will throw an error if there is an issue with the account retrieval. */ buildTx(): Promise; /** * Ensures the compiled kuneiform schema has all of the required fields for RLP encoding. * * @param payload * @returns */ private makePayloadEncodable; private validateCreateDBOptions; private validateDBTxOptions; }