import type { TAbiItem } from '../types/TAbi'; import { TxWriter, ITxWriterOptions } from '../txs/TxWriter'; import { Web3Client } from '../clients/Web3Client'; import { TAddress } from '../models/TAddress'; import { IAccount, IAccountTx } from "../models/TAccount"; import { ITxBuilderOptions } from '../txs/ITxBuilderOptions'; export interface IContractWriter { writeAsync(account: IAccount & { value?: number | string | bigint; }, methodAbi: string | TAbiItem, ...params: any[]): Promise; } export declare class ContractWriter implements IContractWriter { address: TAddress; client: Web3Client; protected builderConfig?: ITxBuilderOptions; protected writerConfig?: ITxWriterOptions; static SILENT: boolean; constructor(address: TAddress, client: Web3Client, builderConfig?: ITxBuilderOptions, writerConfig?: ITxWriterOptions); $config(builderConfig?: ITxBuilderOptions, writerConfig?: ITxWriterOptions): this; /** * We split Tx sending in two awaitable steps * 1. This method prepares(gas, nonce, etc) - and sends the Tx * 2. With returned writer you can subscribe to events and/or wait for Tx to be mined * @param account * @param interfaceAbi * @param params * @param configs * @returns {TxWriter} */ writeAsync(account: IAccountTx, interfaceAbi: string | TAbiItem, params: any[], configs?: { abi?: TAbiItem[]; builderConfig?: ITxBuilderOptions; writerConfig?: ITxWriterOptions; }): Promise; }