import { c as Address } from "./abi-Bjd7pZee.mjs"; import { a as Chain } from "./entryPointVersion-Cm2jyUEb.mjs"; import { n as Hash, r as Hex } from "./misc-BASHpEmW.mjs"; //#region node_modules/.pnpm/@clawnch+sdk@2.2.1_@walletconnect+sign-client@2.23.6_typescript@6.0.2_zod@4.3.6__viem@2.47.6_typescript@6.0.2_zod@4.3.6_/node_modules/@clawnch/sdk/dist/signer-types.d.ts /** * WalletConnect signer configuration */ interface WalletConnectSignerConfig { /** WalletConnect project ID (get one at cloud.walletconnect.com) */ projectId: string; /** Chain to operate on (default: Base) */ chain?: Chain; /** Session persistence path (default: none — sessions are ephemeral) */ sessionPath?: string; /** Spending policies for auto-approval (default: none — all txs require approval) */ policies?: SpendingPolicy[]; /** Metadata shown in the wallet's pairing UI */ metadata?: SignerMetadata; /** Request timeout in milliseconds (default: 120000 — 2 minutes) */ requestTimeout?: number; /** Callback when a transaction is queued for approval */ onTransactionQueued?: (tx: QueuedTransaction) => void; /** Callback when a transaction is approved */ onTransactionApproved?: (tx: QueuedTransaction, hash: Hash) => void; /** Callback when a transaction is rejected */ onTransactionRejected?: (tx: QueuedTransaction, reason: string) => void; /** Callback when session state changes */ onSessionChange?: (state: SessionState) => void; } /** * Metadata shown in the wallet's WalletConnect pairing screen */ interface SignerMetadata { /** Agent/app name (default: 'Clawnch Agent') */ name?: string; /** Description (default: 'Autonomous agent requesting transaction approval') */ description?: string; /** URL (default: 'https://clawn.ch') */ url?: string; /** Icon URLs (default: Clawnch icon) */ icons?: string[]; } /** * A spending policy that allows auto-approval of transactions matching certain criteria. * If a transaction matches ANY policy, it is auto-approved without human interaction. */ interface SpendingPolicy { /** Human-readable label for this policy */ label: string; /** Maximum ETH value per transaction (in wei). Omit for no value limit. */ maxValueWei?: bigint; /** Allowed contract addresses. Omit for any contract. */ allowedContracts?: Address[]; /** Allowed function selectors (first 4 bytes). Omit for any function. */ allowedSelectors?: Hex[]; /** Maximum transactions per hour under this policy. Omit for no rate limit. */ maxPerHour?: number; /** Whether this policy is currently active */ enabled?: boolean; } /** * A transaction waiting in the approval queue */ interface QueuedTransaction { /** Unique ID for this queued transaction */ id: string; /** Transaction parameters */ transaction: TransactionRequest; /** Human-readable context about what this transaction does */ context?: TransactionContext; /** When this transaction was queued */ queuedAt: number; /** Current status */ status: 'pending' | 'approved' | 'rejected' | 'expired' | 'auto_approved'; /** Whether this was auto-approved by a spending policy */ policyLabel?: string; /** Result hash if approved and sent */ hash?: Hash; /** Rejection reason if rejected */ rejectionReason?: string; } /** * Transaction request (viem-compatible) */ interface TransactionRequest { to: Address; value?: bigint; data?: Hex; gas?: bigint; gasPrice?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; } /** * Human-readable context attached to a transaction for the approval UI */ interface TransactionContext { /** Short summary: "Claim 0.023 WETH in LP fees" */ summary: string; /** Detailed breakdown */ details?: string; /** Estimated gas cost in ETH */ estimatedGasCostEth?: string; /** Net value (e.g., "net profit: 0.0226 WETH after gas") */ netValue?: string; /** Contract being called */ contractName?: string; /** Function being called */ functionName?: string; /** Tags for categorization */ tags?: string[]; } /** * WalletConnect session state */ type SessionState = { status: 'disconnected'; } | { status: 'pairing'; uri: string; } | { status: 'connected'; address: Address; chainId: number; } | { status: 'expired'; lastAddress: Address; }; /** * Result of sendTransaction */ interface SendTransactionResult { /** Transaction hash */ hash: Hash; /** Whether this was auto-approved by a spending policy */ autoApproved: boolean; /** Policy label if auto-approved */ policyLabel?: string; } /** * Result of signMessage */ interface SignMessageResult { /** Signature */ signature: Hex; } /** * Result of signTypedData */ interface SignTypedDataResult { /** Signature */ signature: Hex; } /** * A batch of transactions submitted together for review */ interface TransactionBatch { /** Unique batch ID */ id: string; /** Transactions in this batch */ transactions: QueuedTransaction[]; /** When this batch was created */ createdAt: number; /** Overall status */ status: 'pending' | 'approved' | 'partial' | 'rejected'; } //#endregion //#region extensions/crypto/src/lib/types.d.ts interface CryptoPluginConfig { /** WalletConnect project ID (get one at cloud.walletconnect.com) */ walletConnectProjectId?: string; /** Private key for headless/testing mode (takes precedence over WalletConnect) */ privateKey?: string; /** RPC URL for Base (default: public RPC) */ rpcUrl?: string; /** Network: 'mainnet' or 'sepolia' (default: 'mainnet') */ network?: 'mainnet' | 'sepolia'; /** Clawnch API URL (default: https://clawn.ch) */ apiUrl?: string; /** Clawnch API key for verified agent operations */ apiKey?: string; /** WalletConnect session persistence path */ sessionPath?: string; /** Initial spending policies (natural language or structured) */ policies?: string | SpendingPolicy[]; /** DexScreener API base URL */ dexScreenerUrl?: string; /** CoinGecko API key (optional, for higher rate limits) */ coinGeckoApiKey?: string; } interface WalletState { /** Whether any wallet is connected (private key or WalletConnect) */ connected: boolean; /** Connected wallet address */ address: Address | null; /** Chain ID */ chainId: number | null; /** Connection mode */ mode: 'private_key' | 'walletconnect' | 'bankr' | 'none'; /** Active spending policies */ policies: SpendingPolicy[]; /** WalletConnect session state (null if using private key) */ wcState: SessionState | null; /** Bankr EVM address (only in bankr mode) */ bankrEvmAddress?: string; /** Bankr Solana address (only in bankr mode) */ bankrSolAddress?: string; /** Bankr Club membership status */ bankrClub?: boolean; /** Account type — detected via eth_getCode (EIP-7702 detection) */ accountType?: 'eoa' | 'smart_account' | 'eip7702'; /** Whether the account has on-chain code deployed */ hasCode?: boolean; /** EIP-7702 delegation designation address (if detected) */ delegationDesignation?: Address; } interface ToolResult { content: Array<{ type: 'text'; text: string; }>; data?: T; } interface TransactionRecord { id: string; hash?: Hash; status: 'approved' | 'rejected' | 'auto_approved' | 'pending'; policyLabel?: string; summary: string; timestamp: number; value?: string; to?: Address; } interface TokenPrice { address: Address; symbol: string; name: string; priceUsd: number; priceEth?: number; change24h: number; volume24h: number; liquidity: number; marketCap?: number; source: 'dexscreener' | 'coingecko' | 'onchain'; } interface PortfolioToken { address: Address; symbol: string; name: string; balance: string; balanceFormatted: string; valueUsd?: number; priceUsd?: number; } interface PortfolioSummary { address: Address; ethBalance: string; ethValueUsd: number; tokens: PortfolioToken[]; totalValueUsd: number; } //#endregion export { WalletConnectSignerConfig as _, ToolResult as a, QueuedTransaction as c, SignMessageResult as d, SignTypedDataResult as f, TransactionRequest as g, TransactionContext as h, TokenPrice as i, SendTransactionResult as l, TransactionBatch as m, PortfolioSummary as n, TransactionRecord as o, SpendingPolicy as p, PortfolioToken as r, WalletState as s, CryptoPluginConfig as t, SessionState as u }; //# sourceMappingURL=types-mW0rZolZ.d.mts.map