import type { Address, Chain, PublicClient, Transport } from "viem"; import type { NetworkType } from "../chain/index.js"; import type { ILogger } from "../types/index.js"; import { ChainContractsRegister } from "./ChainContractsRegister.js"; import type { TokensMeta } from "./TokensMeta.js"; /** * Options accepted by the {@link Construct} base class constructor. * * @param register - A {@link ChainContractsRegister} instance to use for cross-contract lookups. * You may choose not to pass it if you plan to instantiate contracts manually and do not need any cross-contract lookups. * @param client - A viem {@link PublicClient} instance to use for chain access. * @param logger - An optional logger instance to use for logging * */ export type ConstructOptions = ChainContractsRegister | { client: PublicClient; logger?: ILogger; } | { register: ChainContractsRegister; logger?: ILogger; }; /** * Base class for all SDK objects that need chain access. * * Provides a viem {@link PublicClient}, optional structured logging, and an * optional {@link ChainContractsRegister} for cross-contract lookups. * Most SDK classes inherit from this (or from {@link SDKConstruct}). */ export declare class Construct { #private; readonly logger?: ILogger; readonly client: PublicClient; constructor(options: ConstructOptions); /** * Throws if register was not provided in constructor options * Ephemeral contracts that do not need to access other contracts may not need it */ get register(): ChainContractsRegister; protected safeGetRegister(): ChainContractsRegister | undefined; /** * The viem {@link Chain} object associated with the connected client. **/ get chain(): Chain; /** * Numeric chain ID (e.g. `1` for Ethereum mainnet). **/ get chainId(): number; /** * Gearbox network type for this chain (e.g. `"Mainnet"`, `"Arbitrum"`). * @throws If the chain was not created by the Gearbox SDK. */ get networkType(): NetworkType; /** * @internal * Indicates that contract state diverged from onchain state and needs to be updated */ get dirty(): boolean; protected set dirty(value: boolean); /** * Information about tokens known on this chain */ protected get tokensMeta(): TokensMeta; protected labelAddress(address: Address, omitAddress?: boolean): string; /** * @internal * Returns list of addresses that should be watched for events to sync state */ get watchAddresses(): Set
; }