declare const ALG_BLS = 1; declare const ALG_ECDSA = 2; declare const ALG_P256 = 3; declare const ALG_CUMULATIVE_T2 = 4; declare const ALG_CUMULATIVE_T3 = 5; type AlgId = typeof ALG_BLS | typeof ALG_ECDSA | typeof ALG_P256 | typeof ALG_CUMULATIVE_T2 | typeof ALG_CUMULATIVE_T3; type TierLevel = 1 | 2 | 3; interface TierConfig { /** Max value for Tier 1 (single ECDSA/Passkey). 0 = no enforcement. */ tier1Limit: bigint; /** Max value for Tier 2 (P256 + BLS). 0 = no enforcement. */ tier2Limit: bigint; } interface GuardStatus { hasGuard: boolean; guardAddress: string; dailyLimit: bigint; dailyRemaining: bigint; } interface PreCheckResult { ok: boolean; errors: string[]; tier: TierLevel; algId: AlgId; } /** * Determine the required tier for a given transaction value. * * - Tier 1: value <= tier1Limit — single ECDSA or P256 passkey * - Tier 2: tier1Limit < value <= tier2Limit — P256 + BLS aggregate * - Tier 3: value > tier2Limit — P256 + BLS + Guardian ECDSA * * If both limits are 0 (no enforcement), always returns Tier 1. */ declare function resolveTier(value: bigint, config: TierConfig): TierLevel; /** * Get the algorithm ID to use for a given tier. * * - Tier 1: ALG_ECDSA (0x02) — raw 65-byte ECDSA, no prefix needed * - Tier 2: ALG_CUMULATIVE_T2 (0x04) — P256 + BLS * - Tier 3: ALG_CUMULATIVE_T3 (0x05) — P256 + BLS + Guardian */ declare function algIdForTier(tier: TierLevel): AlgId; export { ALG_BLS as A, type GuardStatus as G, type PreCheckResult as P, type TierLevel as T, ALG_ECDSA as a, ALG_P256 as b, ALG_CUMULATIVE_T2 as c, ALG_CUMULATIVE_T3 as d, type AlgId as e, type TierConfig as f, algIdForTier as g, resolveTier as r };