import { Hex } from "viem"; //#region src/account-signer/types.d.ts type HexAddress = `0x${string}`; /** * Minimal account signer interface for SDK operations. * * The SDK authenticates the Polyester smart account address. When ownerAddress * is present it is declared as the LOGIN challenge signer, and signMessage must * return that EOA's raw 65-byte EIP-191 signature: login rejects Safe/ERC-6492 * wrapped signatures. Subaccount creation accepts either form. */ interface AccountSigner { /** Fingerprint of the PolyesterEnvironment this signer was created for */ readonly environmentFingerprint: string; /** The smart account address (used for authentication and trading) */ readonly accountAddress: HexAddress; /** The owner/EOA address. Declared as the LOGIN challenge signer when present; otherwise accountAddress signs. */ readonly ownerAddress?: HexAddress; /** * Sign the exact UTF-8 message with EIP-191 semantics. For login this must be * the owner EOA's raw 65-byte signature (0x + 130 hex chars), not a * smart-account wrapped one. Login SIWE uses Ethereum mainnet (1); wallet * adapters must select that network before signing when required (e.g. Phantom). * This does not change the Polyester environment used for Safe signing. */ signMessage(message: string): Promise; } /** * Factory function type for lazy account signer initialization. * Useful when the signer might not be available at client creation time. */ type AccountSignerFactory = () => AccountSigner | null | Promise; /** * Account signer configuration for the client. * Can be a signer instance or a factory for lazy initialization. */ type AccountSignerConfig = AccountSigner | AccountSignerFactory; /** * Helper to check if an account signer config is a factory function. */ declare function isAccountSignerFactory(config: AccountSignerConfig): config is AccountSignerFactory; /** * Helper to resolve an account signer from config. */ declare function resolveAccountSigner(config: AccountSignerConfig | undefined): Promise; //#endregion export { AccountSigner, AccountSignerConfig, AccountSignerFactory, HexAddress, isAccountSignerFactory, resolveAccountSigner }; //# sourceMappingURL=types.d.ts.map