/** * 托管合约侧:channelId 推导 + EIP-712(Voucher、OpenAuthorization)。 * 链上开通 / 结算由服务端完成。 */ import type { Address, Hex } from 'viem'; export declare const ESCROW_EIP712_DOMAIN_NAME: "AgentPaymentChannel"; /** * `keccak256(abi.encode(payer, payee, token, salt, authorizedSigner, escrowContract, chainId))` */ export interface ComputeChannelIdParameters { payer: Address; payee: Address; token: Address; salt: Hex; authorizedSigner: Address; escrowContract: Address; chainId: number; } export declare function computeChannelId(parameters: ComputeChannelIdParameters): Hex; /** * 签名 Voucher(链下累计支付承诺)。domain / types 须与链上验证逻辑一致。 */ export declare function signVoucher(account: { address: Address; signTypedData: (params: unknown) => Promise; }, params: { channelId: Hex; cumulativeAmount: bigint; escrowContract: Address; chainId: number; }): Promise; /** 与链上 `openWithAuthorization` 的 OpenAuthorization struct 一致;auth* 须与 USDC EIP-3009 授权字段一致 */ export interface OpenAuthorizationMessage { payer: Address; payee: Address; token: Address; deposit: bigint; salt: Hex; authorizedSigner: Address; authValidAfter: bigint; authValidBefore: bigint; authNonce: Hex; } /** * 签名 OpenAuthorization(托管合约 EIP-712;Operator 代付 gas 的开通路径)。 */ export declare function signOpenAuthorization(account: { address: Address; signTypedData: (params: unknown) => Promise; }, message: OpenAuthorizationMessage, params: { escrowContract: Address; chainId: number; }): Promise; //# sourceMappingURL=escrow.d.ts.map