import { type Hex, type DecodedCall } from './abi.js'; import { type UnpackedUserOp } from './userOpHash.js'; import { type StepUpProof, type StepUpCheck } from './stepup.js'; export { ENTRY_POINT_V07 } from './userOpHash.js'; /** Vetted aave-v3 Pool per chainId. HARDCODED = bound to the action's CID. */ export declare const AAVE_V3_POOLS: Record; export type YieldIntentVerb = 'enter' | 'exit'; export interface YieldUserIntent { schema: 'flows-yield-userop-intent-v1'; verb: YieldIntentVerb; yieldId: string; chainId: number; token: Hex; pool: Hex; amount: string; amountBaseUnits: string; smartAccount: Hex; pkpAddress: Hex; userOpNonce: string; nonce: number; expiresAt: string; } export type YieldUserIntentProof = { proof: Extract; credentialPublicKey: Hex; webauthn: { rpId: string; allowedOrigins: string[]; }; } | { proof: Extract; credentialAddress: Hex; }; export declare function yieldUserIntentHash(intent: YieldUserIntent): string; export declare function yieldUserIntentChallenge(intent: YieldUserIntent): Uint8Array; export declare function verifyYieldUserIntentProof(input: { intent: YieldUserIntent; intentProof: YieldUserIntentProof; nowMs?: number; }): StepUpCheck; /** * Fail-closed yield policy for the inner calls of a smart-account UserOp. * Returns violations (empty = allowed). Per call: native value 0; only * approve/supply/deposit/withdraw; approve spender == the vetted pool; * supply/deposit/withdraw target == the pool and beneficiary == `sender`. */ export declare function validateEvmYieldCalls(input: { calls: DecodedCall[]; sender: string; chainId: number; intent?: YieldUserIntent; pkpAddress?: string; }): string[]; export interface GateResult { ok: boolean; userOpHash: Hex; violations: string[]; } /** * The one call an action makes. Recomputes the v0.7 userOpHash, binds it to * `messageRaw` (the hash the host asked to sign), decodes the Kernel calls, and * validates them. `ok` true ⇒ the action may sign `userOpHash`. */ export declare function gateYieldUserOp(input: { userOp: UnpackedUserOp; chainId: number; messageRaw?: string; entryPoint?: string; intent?: YieldUserIntent; intentProof?: YieldUserIntentProof; pkpAddress?: string; }): GateResult;