import { Kwil } from '../client/kwil'; import { SignerSupplier } from '../core/signature'; 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; } /** * `DB` class creates a transaction to deploy or drop a new database on the Kwil network. */ export declare class DB { readonly kwil: Kwil; payloadType: DeployOrDrop; signer: SignerSupplier; payload: CompiledKuneiform | DropDbPayload; identifier: Uint8Array; signatureType: AnySignatureType; chainId: string; description: string; nonce?: number; /** * 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: DBOptions); /** * 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 createTx(kwil: Kwil, payloadType: DeployOrDrop, options: DBOptions): 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; }