import type { IProviderService } from "../providerService/index.js"; import type { FetchSafeAccountArgs, ISafeAccountService, SafeAccountInfo, SafeAccountServiceConfig } from "./safeAccountServiceTypes.js"; /** * Minimal fragments for probing Safe (ex Gnosis Safe) smart accounts. * * `masterCopy()` is not a regular function on the Safe singleton — Safe proxy * contracts (v1.1.1+) special-case the `0xa619486e` selector in their fallback * and return the singleton address stored at slot 0 without delegating. An * `eth_call` against any Safe proxy therefore answers it, while EOAs return * empty data and non-Safe contracts revert or fail decoding. */ export declare const safeAccountAbi: readonly [{ readonly type: "function"; readonly name: "masterCopy"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly name: "masterCopy"; readonly type: "address"; }]; readonly stateMutability: "view"; }, { readonly type: "function"; readonly name: "getThreshold"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly name: "threshold"; readonly type: "uint256"; }]; readonly stateMutability: "view"; }, { readonly type: "function"; readonly name: "getOwners"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly name: "owners"; readonly type: "address[]"; }]; readonly stateMutability: "view"; }]; /** Safe contract version for a known singleton address, if recognized. */ export declare function getSafeSingletonVersion(singleton: string | null | undefined): string | undefined; export declare class SafeAccountService implements ISafeAccountService { private readonly providerService; private readonly config; private readonly cache; private readonly inFlight; constructor(providerService: IProviderService, config?: SafeAccountServiceConfig); /** * Detect whether an address is a Safe smart account. * * Results are cached per `${chainId}:${account}` (threshold/owners can * change, hence the TTL) and concurrent callers for the same key share * one in-flight three-read probe. RPC failures are not cached so a later * call retries. * * @param args.chainId - Chain to probe on. * @param args.account - Address to probe. */ fetchSafeAccount(args: FetchSafeAccountArgs): Promise; /** * Fire the three probe reads concurrently — providers built by the SDK's * ProviderService batch them into a single multicall RPC request (custom * IProviderService implementations without batching issue three). EOAs * return empty call data and non-Safe contracts revert on the unknown * selectors, so those failures mean "not a Safe". Transport-level * failures are rethrown instead, so they surface to the caller and are * never cached as negative detections. */ private probeSafeAccount; } //# sourceMappingURL=safeAccountService.d.ts.map