/** * Central XPR transfer cap, enforced at the signing layer. * * Every signed transaction — core plugin tools (createCliSession) and every bundled * or external skill (createCliApi) — passes through assertTransferCap before it is * handed to the proton CLI. Individual tools can no longer forget the cap: the * total XPR the agent spends in one transaction (eosio.token::transfer, eosio::buyram and * eosio::stakexpr) * is summed and refused if it exceeds the limit. Account and action names are compared in * canonical form, so trailing-dot aliases such as "eosio.token." are counted. * * Limit, in order of precedence: * 1. an explicit `maxTransferAmount` (smallest units, 4 decimals) passed by the caller * 2. MAX_TRANSFER_AMOUNT env (smallest units; the documented setting) * 3. MAX_TRANSFER_XPR env (whole XPR; legacy name used by skills before 0.8.4) * 4. default 10,000,000 = 1,000 XPR * * Only XPR is capped (the documented cap is denominated in XPR). Other tokens are * not limited here. */ export declare const DEFAULT_MAX_TRANSFER_AMOUNT = 10000000; interface CappableAction { account: string; name: string; data?: unknown; } /** Resolve the cap in smallest units (4 decimals). */ export declare function resolveTransferCap(explicit?: number): number; /** * Canonical form of an EOSIO name. Trailing dots encode as zero bits, so "eosio.token." and * "eosio.token" are the same account on chain; compare names only in this form. */ export declare function canonicalName(name: unknown): string; /** * Total XPR (smallest units) the account spends in these actions: eosio.token::transfer sent * from it, plus RAM it buys with XPR (eosio::buyram paid by it). */ export declare function totalXprSent(actions: CappableAction[], account: string): number; /** Throw if the transaction would send more XPR than the cap allows. */ export declare function assertTransferCap(actions: CappableAction[], account: string, maxTransferAmount?: number): void; export {}; //# sourceMappingURL=transfer-cap.d.ts.map