/** * Agent-delegation authorization for the Safe agent path. * * One question, asked properly: *may THIS agent key perform THIS op on THIS * position, right now?* Split out of `agent-module-executor.ts` so the gate can * be unit-tested against a mock provider without building a Lit bundle. * * The registry (`AgentDelegationRegistry`) answers in two parts and BOTH matter: * - identity — `agentOf(user)` : which key is bound to this Safe, and is * that binding Active and unexpired? * - authority — `canMint/canRepay/canRenew/canWithdraw(positionId, agent)` : * did the borrower grant this scope, and does it still hold * (pause, revocation, terminal status, caps)? * * Identity is checked FIRST and independently. The `can*` gates take the agent * as an argument, so asking them about a caller-supplied address would answer * "is this address authorized" — not "is the caller the real agent". Reversing * that order is the whole C-40 failure mode. */ export type AgentOp = "mint" | "repay" | "renew" | "withdraw"; export interface AgentAuthorizationRecord { agent: string; validUntil: number; /** * Present for op="mint" and op="withdraw" — `canMint`/`canWithdraw`'s * `effectiveFloorBps` (`max(grant floor, agentMintFloorMinBps)`). The * REGISTRY computes this; nothing in this module or in * `agent-module-executor.ts` yet enforces it against the requested * amount/post-operation collateral ratio — see the caller. */ effectiveFloorBps?: number; } /** * Asserts the full chain, or throws. Returns the on-chain agent record so the * caller can echo the authoritative agent address rather than the supplied one. * * @throws if the Safe has no Active agent, if the bound agent is not * `candidateAgent`, or if the borrower has not granted `op`. */ export declare function assertAgentOpAuthorized(params: { provider: any; registryAddress: string; safe: string; positionId: string; op: AgentOp; candidateAgent: string; }): Promise; //# sourceMappingURL=agent-module-authorization.module.d.ts.map