import { FeeData, getDefaultProvider, type ContractTransactionResponse, type ContractTransactionReceipt, type Eip1193Provider, type EventLog, type JsonRpcApiProviderOptions, type Log, type Overrides, type Signer } from "ethers"; import { type TransactionReceipt } from "../validator/receipt.js"; import { type SignerConfig } from "./config.js"; import { type ChainName } from "./chains.js"; /** * Fetches the current gas fee data for a connected network. * @param signer A signer instance. * @returns Current gas fee information for the network. */ export declare function getFeeData(signer: Signer): Promise; /** * Request a set of opinionated overrides to be used when calling the Tableland contract. * @param signer A valid web3 provider/signer. * @returns A promise that resolves to an object with overrides. */ export declare function getOverrides({ signer, }: SignerConfig): Promise; /** * Check if a chain is Polygon. * @param chainId The chainId of the network as a number or bigint. * @returns A boolean that indicates if the chain is a mainnet/testnet Polygon. */ export declare function isPolygon(chainId: number | bigint): boolean; /** * Check if a chain can use the `eth_getMaxPriorityFeePerGas` or * `eth_getMaxFeePerGas` calls, which are used by the built-in ethers * `getFeeData` method. * @param chainId The chainId of the network as a number or bigint. * @returns A boolean that indicates if `getFeeData` can be used for the chain. */ export declare function chainCanGetFeeData(chainId: number | bigint): boolean; /** * RegistryReceipt is based on the TransactionReceipt type which defined by the API spec. * The API v1 has a known problem where it only returns the first tableId from a transaction. */ export type RegistryReceipt = Required>; /** * MultiEventTransactionReceipt represents a mapping of a response from a Validator * transaction receipt to the tableIds that were affected. * @typedef {Object} MultiEventTransactionReceipt * @property {string[]} tableIds - The list of table ids affected in the transaction * @property {string} transactionHash - The hash of the transaction * @property {number} blockNumber - The block number of the transaction * @property {number} chainId - The chain id of the transaction */ export interface MultiEventTransactionReceipt { tableIds: string[]; transactionHash: string; blockNumber: number; chainId: number; } /** * Given a transaction, this helper will return the tableIds that were part of the transaction. * Especially useful for transactions that create new tables because you need the tableId to * calculate the full table name. * @param {tx} a contract transaction * @returns {MultiEventTransactionReceipt} tableland receipt * */ export declare function getContractReceipt(tx: ContractTransactionResponse): Promise; /** * Request a signer object from the global ethereum object. * @param external A valid external provider. Defaults to `globalThis.ethereum` if not provided. * @returns A promise that resolves to a valid web3 provider/signer * @throws If no global ethereum object is available. */ export declare function getSigner(external?: Eip1193Provider): Promise; /** * Check if the signer has an attached provider (mimics ethers v5 * `signer._checkProvider`). * @param signer A signer instance. */ export declare function checkProviderOfSigner(signer: Signer): void; /** * Check if a log value is an ether `EventLog`. * @param logOrEvent Response from `ContractTransactionResponse` awaited receipt that * includes both `Log` and `EventLog` types. * @returns */ export declare function isEventLog(logOrEvent: EventLog | Log): logOrEvent is EventLog; /** * Create a signer with a private key, a provider URL, and a chain. Optionally, * pass the chain name or ID to create a static network and reduce calls made by * the provider (by not checking the chain ID). * @param privateKey The private key of the signer. * @param providerUrl The URL of the provider. * @param chainNameOrId The chain name or ID. * @param options Optional settings for the provider. See ethersjs * {@link JsonRpcApiProviderOptions} for more information. */ export declare function createSigner({ privateKey, providerUrl, chainNameOrId, options, }: { privateKey: string; providerUrl: string; chainNameOrId?: ChainName | number; options?: JsonRpcApiProviderOptions; }): Signer; export { getDefaultProvider, type Eip1193Provider, type FeeData, type ContractTransactionResponse, type ContractTransactionReceipt, type Signer, }; //# sourceMappingURL=ethers.d.ts.map