/** * Framework-agnostic CDP smart-account capability core. * * This is the heart of the CDP wallet: the four operations a wallet exposes — * get-address, sign-message, sign-typed-data, send-calls — implemented directly * on `@coinbase/cdp-core` actions + the Coinbase Smart Wallet (CSW) ERC-1271 / * ERC-6492 wrapping. It depends on NO signing framework (no ethers signer, no * viem account), so it can be wrapped by: * - `CdpEthersSigner` (the live ethers path today — see cdp.ts), and * - `createCdpEip1193Provider` (the EIP-1193 boundary — see cdpEip1193.ts), * which a future `cdp-wagmi-rn` wagmi connector lifts almost verbatim. * * Keeping both wrappers on this single core means the core is exercised by the * production signer path, not speculative dead code. */ import { ethers } from 'ethers'; import type { TypedDataDomain, TypedDataField } from 'ethers'; import type { CdpSignOpts, CdpSendOpts } from './cdpConfig'; /** A single call in a UserOperation batch (EIP-5792 / ethers tx shape). */ export interface CdpCall { to: string; value?: bigint; data?: string; } /** Current smart-account address from the CDP hooks bridge, falling back to the * address captured at connect time. */ export declare function cdpGetAddress(smartAccount: string): string; /** * personal_sign for a Coinbase Smart Wallet: sign the EIP-191 hash wrapped in * the CSW replay-safe envelope (chainId = `opts.chainId`, the chain the verifier * runs on), then ERC-6492-wrap so a counterfactual account can be deployed inside * the verifier's eth_call. `readProvider` is used only to probe the factory * CREATE2 address; null falls back to nonce 0. * * The provider passes its own `cfg.chainId`; a caller whose verifier lives on a * different chain (e.g. an off-chain ERC-1271 verifier that only runs on mainnet) * passes that chain's id. */ export declare function cdpSignMessage(message: string | Uint8Array, smartAccount: string, readProvider: ethers.Provider | null, opts: CdpSignOpts): Promise; /** * EIP-712 typed-data signing for a Coinbase Smart Wallet: sign the offer digest * wrapped in CSW's replay-safe envelope (chainId = `opts.chainId`, the chain the * on-chain verifier runs on) with the owner EOA, then * `abi.encode(ownerIndex, sig)`-wrap it for ERC-1271. */ export declare function cdpSignTypedData(domain: TypedDataDomain, types: Record, value: Record, smartAccount: string, opts: CdpSignOpts): Promise; /** * Execute one or more calls as a single sponsored UserOperation and return the * on-chain transaction hash once the bundler includes it. Throws if the userOp * is dropped or times out. * * (Send/poll logic lifted from the former `CdpEthersSigner.sendTransaction` + * `waitForUserOpTransactionHash`. Returns the hash only; callers that need an * `ethers.TransactionResponse` resolve it via their own provider.) */ export declare function cdpSendCalls(calls: CdpCall[], smartAccount: string, opts: CdpSendOpts): Promise; export declare function waitForUserOpTransactionHash(userOpHash: string, smartAccount: string, opts: CdpSendOpts): Promise; //# sourceMappingURL=cdpAccount.d.ts.map