/** * Module-level mutable that bridges CDP's hook-only state into our * imperative wallet connector layer. * * `` (mounted inside `` in App.tsx) * reads `useEvmAddress()` + `useCurrentUser()` and writes their values * into this object via `setCdpState()`. Anything outside the React tree * (the connector class, the ethers signer adapter) reads via `getCdpState()`. * * Imperative actions (signEvmTypedData, sendUserOperation, getUserOperation, * signOut) come straight from `@coinbase/cdp-core` — they share the same * singleton auth state initialized by `` and don't need * to be bridged. */ export interface CdpState { /** The user's smart account address. Used as the on-chain identity (NFT * owner, offer lender). Null when signed out. */ evmAddress: string | null; /** The EOA that owns the smart account. CDP's `signEvmTypedData` / * `signEvmMessage` accept only EOAs (User.evmAccounts) — passing the * smart account address fails with "EVM account not found". For ERC-1271 * flows, sign with this EOA; the contract verifies via SignatureChecker * against the smart account address. Null when signed out. */ evmEoaAddress: string | null; /** True once `` has finished bootstrapping. */ initialized: boolean; /** True iff currentUser is non-null (i.e. user is signed in). */ signedIn: boolean; } export declare function getCdpState(): CdpState; export declare function setCdpState(patch: Partial): void; export declare function subscribeCdpState(cb: (s: CdpState) => void): () => void; /** * Resolve once `evmAddress` is non-null (i.e. the post-sign-in handoff * has propagated through CDP's React state). Used by the connect flow * to bridge between the auth modal closing and the connector returning * a usable ConnectedWallet. */ export declare function waitForCdpAddress(timeoutMs?: number): Promise; //# sourceMappingURL=cdpBridge.d.ts.map