import { providers, type Signer, type Overrides, type ContractTransaction, type ContractReceipt } from "ethers"; import { type TransactionReceipt } from "../validator/receipt.js"; import { type SignerConfig } from "./config.js"; type ExternalProvider = providers.ExternalProvider; declare const getDefaultProvider: typeof providers.getDefaultProvider; /** * 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. * @returns A boolean that indicates if the chain is a mainnet/testnet Polygon. */ export declare function isPolygon(chainId: number): 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: ContractTransaction): 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?: ExternalProvider): Promise; export { Signer, getDefaultProvider, type ExternalProvider, type ContractTransaction, type ContractReceipt, }; //# sourceMappingURL=ethers.d.ts.map