{"version":3,"sources":["../../admin/src/ProtocolGovernance.ts","../../admin/src/SlashGovernance.ts"],"names":["BaseClient","registryActions","superPaymasterActions","aggregatorActions","timelockControllerActions","encodeSetSlashPolicyAdmin","encodeSetSlashThreshold","ZERO_BYTES32"],"mappings":";;;;;AAmBO,IAAM,kBAAA,GAAN,cAAiCA,4BAAA,CAAW;AAAA,EACxC,eAAA;AAAA,EACA,iBAAA;AAAA,EAEP,YAAY,MAAA,EAGT;AACC,IAAA,KAAA,CAAM,MAAM,CAAA;AACZ,IAAA,IAAA,CAAK,kBAAkB,MAAA,CAAO,eAAA;AAC9B,IAAA,IAAA,CAAK,oBAAoB,MAAA,CAAO,iBAAA;AAAA,EACpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,WAAA,CAAY,QAAA,EAAmB,OAAA,EAA6C;AAW9E,IAAA,MAAM,IAAI,MAAM,2EAA2E,CAAA;AAAA,EAC/F;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,gBAAA,CAAiB,UAAA,EAAqB,OAAA,EAA6C;AAIrF,IAAA,MAAM,IAAI,MAAM,sCAAsC,CAAA;AAAA,EAC1D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,iBAAA,CAAkB,SAAA,EAAoB,OAAA,EAA6C;AACrF,IAAA,MAAM,QAAA,GAAWC,iCAAA,CAAgB,IAAA,CAAK,eAAe,CAAA;AACrD,IAAA,OAAO,MAAM,QAAA,CAAS,IAAA,CAAK,MAAM,EAAE,iBAAA,CAAkB;AAAA,MACjD,SAAA;AAAA,MACA,SAAS,OAAA,EAAS;AAAA,KACrB,CAAA;AAAA,EACL;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,UAAA,CAAW,OAAA,EAAkB,OAAA,EAA6C;AAC5E,IAAA,MAAM,QAAA,GAAWA,iCAAA,CAAgB,IAAA,CAAK,eAAe,CAAA;AACrD,IAAA,OAAO,MAAM,QAAA,CAAS,IAAA,CAAK,M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AAA,EAAW,IAAA,GAAYG,8BAAA,EAA+B;AAC7E,IAAA,MAAM,WAAWH,2CAAA,CAA0B,IAAA,CAAK,eAAe,CAAA,CAAE,KAAK,MAAM,CAAA;AAC5E,IAAA,MAAM,EAAA,GAAK,MAAM,QAAA,CAAS,aAAA,CAAc,EAAE,QAAQ,IAAA,CAAK,oBAAA,EAAsB,IAAA,EAAM,IAAA,EAAM,CAAA;AACzF,IAAA,OAAO,MAAM,QAAA,CAAS,YAAA,CAAa,EAAE,IAAI,CAAA;AAAA,EAC7C;AACJ","file":"chunk-B2QIWGEX.cjs","sourcesContent":["import { type Address, type Hash, type Hex } from 'viem';\nimport { BaseClient, type ClientConfig, type TransactionOptions } from '@aastar/core';\nimport { registryActions, entryPointActions, superPaymasterActions } from '@aastar/core'; // L2/L1 Actions\n\nexport interface ProtocolParams {\n    minStake: bigint;\n    treasury: Address;\n    entryPoint: Address;\n    superPaymaster: Address;\n}\n\n/**\n * ProtocolGovernance - L3 Pattern\n * \n * Responsibilities:\n * 1. Global Protocol Parameter Management (Registry, EntryPoint)\n * 2. High-level Governance Operations (DAO Transfer, Upgrades)\n * 3. SuperPaymaster & Module Approval\n */\nexport class ProtocolGovernance extends BaseClient {\n    public registryAddress: Address;\n    public entryPointAddress: Address;\n\n    constructor(config: ClientConfig & { \n        registryAddress: Address; \n        entryPointAddress: Address \n    }) {\n        super(config);\n        this.registryAddress = config.registryAddress;\n        this.entryPointAddress = config.entryPointAddress;\n    }\n\n    // ===========================================\n    // 1. Global Parameter Management\n    // ===========================================\n\n    /**\n     * Update the Global Treasury Address where protocol fees are collected\n     */\n    async setTreasury(treasury: Address, options?: TransactionOptions): Promise<Hash> {\n        // Note: Registry might not have direct setTreasury if it relies on SuperPaymaster's config.\n        // Assuming Registry has ownership pointers or config pointers.\n        // If Logic resides in SuperPaymaster, we would use superPaymasterActions.\n        // Based on provided ABI/Actions, Registry manages Role Configs mainly.\n        // Let's assume we are updating a System Role or similar global config if available,\n        // OR adhering to what registryActions provides.\n        \n        // Checking registryActions... it has 'transferOwnership' but maybe not direct 'setTreasury' depending on version.\n        // If strictly following ABI, we might need to update a specific Role Parameter (e.g. AOA/Super config).\n        \n        throw new Error(\"Method not mapped to RegistryABI v1. Please verify contract capabilities.\");\n    }\n\n    /**\n     * Update the supported EntryPoint address\n     */\n    async updateEntryPoint(entryPoint: Address, options?: TransactionOptions): Promise<Hash> {\n        // Placeholder: Real implementation depends on if Registry stores EntryPoint\n        // registryActions typically provides getters. Setters usually restricted to Owner.\n        // If action not available, throw standard error.\n        throw new Error(\"Method not mapped to RegistryABI v1.\");\n    }\n\n    // ===========================================\n    // 2. Role & Module Governance\n    // ===========================================\n\n    /**\n     * Approve a new SuperPaymaster contract address\n     */\n    async setSuperPaymaster(paymaster: Address, options?: TransactionOptions): Promise<Hash> {\n        const registry = registryActions(this.registryAddress);\n        return await registry(this.client).setSuperPaymaster({\n            paymaster,\n            account: options?.account\n        });\n    }\n\n    /**\n     * Set the Staking contract address\n     */\n    async setStaking(staking: Address, options?: TransactionOptions): Promise<Hash> {\n        const registry = registryActions(this.registryAddress);\n        return await registry(this.client).setStaking({\n            staking,\n            account: options?.account\n        });\n    }\n\n    /**\n     * Configure a Role's parameters (Admin only).\n     * Reads the current on-chain config first, then merges the provided overrides\n     * and writes back the full struct via configureRole.\n     */\n    async configureRole(params: {\n        roleId: Hex;\n        minStake?: bigint;\n        ticketPrice?: bigint;\n        exitFeePercent?: bigint;\n        minExitFee?: bigint;\n    }, options?: TransactionOptions): Promise<Hash> {\n        const registry = registryActions(this.registryAddress)(this.client);\n        const current = await registry.getRoleConfig({ roleId: params.roleId });\n        return await (registry as any).configureRole({\n            roleId: params.roleId,\n            config: {\n                ...current,\n                ...(params.minStake !== undefined && { minStake: params.minStake }),\n                ...(params.ticketPrice !== undefined && { ticketPrice: params.ticketPrice }),\n                ...(params.exitFeePercent !== undefined && { exitFeePercent: params.exitFeePercent }),\n                ...(params.minExitFee !== undefined && { minExitFee: params.minExitFee }),\n            },\n            account: options?.account,\n        });\n    }\n\n    // ===========================================\n    // 3. Transfer to DAO (Exit/Upgrade)\n    // ===========================================\n\n    /**\n     * Transfer Protocol Ownership to a DAO (Multisig/Timelock)\n     * This is the final step of \"Protocol Admin\" lifecycle.\n     */\n    async transferToDAO(daoAddress: Address, options?: TransactionOptions): Promise<Hash> {\n        const registry = registryActions(this.registryAddress);\n        return await registry(this.client).transferOwnership({\n            newOwner: daoAddress,\n            account: options?.account\n        });\n    }\n\n    // ===========================================\n    // 4. Query Capabilities\n    // ===========================================\n\n    async getProtocolParams(): Promise<ProtocolParams> {\n        const registry = registryActions(this.registryAddress)(this.client); // Read-only via Client\n        \n        // Parallel fetch\n        const [sp, staking] = await Promise.all([\n            registry.SUPER_PAYMASTER(),\n            registry.GTOKEN_STAKING()\n        ]);\n\n        // Read the real treasury from SuperPaymaster (not the registry owner — they can differ).\n        const treasury = await superPaymasterActions(sp)(this.client).treasury();\n\n        return {\n            minStake: 0n, // Global default not directly exposed, usually per role\n            treasury,\n            entryPoint: this.entryPointAddress,\n            superPaymaster: sp\n        };\n    }\n}\n","import { type Address, type Hash, type Hex } from 'viem';\nimport {\n    BaseClient,\n    type ClientConfig,\n    type TransactionOptions,\n    aggregatorActions,\n    timelockControllerActions,\n    encodeSetSlashPolicyAdmin,\n    encodeSetSlashThreshold,\n    ZERO_BYTES32,\n    type SlashLevel,\n} from '@aastar/core';\n\n/**\n * SlashGovernance — L3 orchestration for the BLSAggregator slash-policy admin surface\n * behind an OpenZeppelin {TimelockController} (CC-13 batch B; multisig target locked to\n * TimelockController, viem-only).\n *\n * The BLSAggregator's `setSlashPolicyAdmin` / `setSlashThreshold` are `onlyPolicyAdmin`.\n * Once the policy admin has been handed to a timelock, changing them is a two-step\n * `schedule()` → wait `getMinDelay()` → `execute()` flow — this client encodes the inner\n * call and drives that flow, and reads the current governance state + a pending change's\n * ETA for a UI to render.\n *\n * IMPORTANT: `salt` distinguishes otherwise-identical operations and MUST be persisted by\n * the caller and reused verbatim between schedule / execute / eta lookups (the operation id\n * is derived from target+value+data+predecessor+salt). Two identical (call, salt) pairs\n * collide on-chain.\n */\nexport class SlashGovernance extends BaseClient {\n    public blsAggregatorAddress: Address;\n    public timelockAddress: Address;\n\n    constructor(config: ClientConfig & {\n        blsAggregatorAddress: Address;\n        timelockAddress: Address;\n    }) {\n        super(config);\n        this.blsAggregatorAddress = config.blsAggregatorAddress;\n        this.timelockAddress = config.timelockAddress;\n    }\n\n    // ===========================================\n    // Reads — current governance state\n    // ===========================================\n\n    /** The address currently authorised to change the slash threshold table. */\n    async getSlashPolicyAdmin(): Promise<Address> {\n        return await aggregatorActions(this.blsAggregatorAddress)(this.client).slashPolicyAdmin();\n    }\n\n    /** The full slash threshold table (WARNING/MINOR/MAJOR co-sign quorums). */\n    async getSlashThresholds(): Promise<{ warning: number; minor: number; major: number }> {\n        return await aggregatorActions(this.blsAggregatorAddress)(this.client).getSlashThresholds();\n    }\n\n    /** The timelock's minimum delay (seconds) between schedule and execute. */\n    async getMinDelay(): Promise<bigint> {\n        return await timelockControllerActions(this.timelockAddress)(this.client).getMinDelay();\n    }\n\n    // ===========================================\n    // setSlashPolicyAdmin — schedule / execute / eta\n    // ===========================================\n\n    /**\n     * Schedule handing the slash policy admin to `newAdmin` (usually the timelock itself,\n     * or a follow-on multisig) through the timelock. `delay` defaults to the timelock's\n     * `getMinDelay()`. Persist `salt` to execute later.\n     *\n     * `salt` defaults to {@link ZERO_BYTES32}. Because the operation id is derived from\n     * (target, value, data, predecessor, salt), scheduling a change with the SAME\n     * `newAdmin` and default salt while a prior identical operation is still pending or\n     * already done reverts on-chain (`TimelockUnexpectedOperationState`). For a repeat or\n     * re-issued change, pass a fresh unique `salt`.\n     */\n    async scheduleSetSlashPolicyAdmin(args: {\n        newAdmin: Address;\n        salt?: Hex;\n        delay?: bigint;\n        options?: TransactionOptions;\n    }): Promise<Hash> {\n        const data = encodeSetSlashPolicyAdmin(args.newAdmin);\n        return await this.schedule(data, args.salt, args.delay, args.options);\n    }\n\n    /** Execute a previously-scheduled `setSlashPolicyAdmin(newAdmin)` once its delay has elapsed. */\n    async executeSetSlashPolicyAdmin(args: {\n        newAdmin: Address;\n        salt?: Hex;\n        options?: TransactionOptions;\n    }): Promise<Hash> {\n        const data = encodeSetSlashPolicyAdmin(args.newAdmin);\n        return await this.execute(data, args.salt, args.options);\n    }\n\n    /**\n     * The unix timestamp at which a scheduled `setSlashPolicyAdmin(newAdmin)` becomes\n     * ready. `0n` = not scheduled, `1n` = already executed, else the ready-at time.\n     */\n    async getSetSlashPolicyAdminEta(args: { newAdmin: Address; salt?: Hex }): Promise<bigint> {\n        const data = encodeSetSlashPolicyAdmin(args.newAdmin);\n        return await this.getChangeEta(data, args.salt);\n    }\n\n    // ===========================================\n    // setSlashThreshold — schedule / execute / eta\n    // ===========================================\n\n    /**\n     * Schedule updating the co-sign quorum for a {@link SlashLevel} through the timelock.\n     * `delay` defaults to `getMinDelay()`. Persist `salt` to execute later.\n     *\n     * `salt` defaults to {@link ZERO_BYTES32}. Scheduling the SAME (slashLevel, threshold)\n     * with the default salt while an identical operation is still pending or done reverts\n     * on-chain (`TimelockUnexpectedOperationState`) — pass a fresh unique `salt` for a\n     * repeat change (e.g. lowering then re-raising the same level).\n     */\n    async scheduleSetSlashThreshold(args: {\n        slashLevel: SlashLevel | number;\n        threshold: number;\n        salt?: Hex;\n        delay?: bigint;\n        options?: TransactionOptions;\n    }): Promise<Hash> {\n        const data = encodeSetSlashThreshold(args.slashLevel, args.threshold);\n        return await this.schedule(data, args.salt, args.delay, args.options);\n    }\n\n    /** Execute a previously-scheduled `setSlashThreshold(level, threshold)` once its delay has elapsed. */\n    async executeSetSlashThreshold(args: {\n        slashLevel: SlashLevel | number;\n        threshold: number;\n        salt?: Hex;\n        options?: TransactionOptions;\n    }): Promise<Hash> {\n        const data = encodeSetSlashThreshold(args.slashLevel, args.threshold);\n        return await this.execute(data, args.salt, args.options);\n    }\n\n    /** ETA (see {@link getSetSlashPolicyAdminEta}) for a scheduled `setSlashThreshold(level, threshold)`. */\n    async getSetSlashThresholdEta(args: {\n        slashLevel: SlashLevel | number;\n        threshold: number;\n        salt?: Hex;\n    }): Promise<bigint> {\n        const data = encodeSetSlashThreshold(args.slashLevel, args.threshold);\n        return await this.getChangeEta(data, args.salt);\n    }\n\n    // ===========================================\n    // Internal — shared timelock plumbing\n    // ===========================================\n\n    /** Schedule `data` against the BLSAggregator via the timelock; delay defaults to getMinDelay(). */\n    private async schedule(data: Hex, salt: Hex = ZERO_BYTES32, delay?: bigint, options?: TransactionOptions): Promise<Hash> {\n        const timelock = timelockControllerActions(this.timelockAddress)(this.client);\n        const effectiveDelay = delay ?? await timelock.getMinDelay();\n        return await timelock.schedule({\n            target: this.blsAggregatorAddress,\n            data,\n            salt,\n            delay: effectiveDelay,\n            account: options?.account,\n        });\n    }\n\n    /** Execute the timelock operation that runs `data` against the BLSAggregator. */\n    private async execute(data: Hex, salt: Hex = ZERO_BYTES32, options?: TransactionOptions): Promise<Hash> {\n        return await timelockControllerActions(this.timelockAddress)(this.client).execute({\n            target: this.blsAggregatorAddress,\n            data,\n            salt,\n            account: options?.account,\n        });\n    }\n\n    /** Resolve the timelock operation id for `data` and read its ready-at timestamp. */\n    private async getChangeEta(data: Hex, salt: Hex = ZERO_BYTES32): Promise<bigint> {\n        const timelock = timelockControllerActions(this.timelockAddress)(this.client);\n        const id = await timelock.hashOperation({ target: this.blsAggregatorAddress, data, salt });\n        return await timelock.getTimestamp({ id });\n    }\n}\n"]}