import { Address, Hash, Hex } from 'viem'; import { a as BaseClient, C as ClientConfig, T as TransactionOptions } from './BaseClient-BjbYP0cf.js'; import { S as SlashLevel } from './aggregator-DFrAbJfH.js'; import './doc-types-471vSmPO.js'; interface ProtocolParams { minStake: bigint; treasury: Address; entryPoint: Address; superPaymaster: Address; } /** * ProtocolGovernance - L3 Pattern * * Responsibilities: * 1. Global Protocol Parameter Management (Registry, EntryPoint) * 2. High-level Governance Operations (DAO Transfer, Upgrades) * 3. SuperPaymaster & Module Approval */ declare class ProtocolGovernance extends BaseClient { registryAddress: Address; entryPointAddress: Address; constructor(config: ClientConfig & { registryAddress: Address; entryPointAddress: Address; }); /** * Update the Global Treasury Address where protocol fees are collected */ setTreasury(treasury: Address, options?: TransactionOptions): Promise; /** * Update the supported EntryPoint address */ updateEntryPoint(entryPoint: Address, options?: TransactionOptions): Promise; /** * Approve a new SuperPaymaster contract address */ setSuperPaymaster(paymaster: Address, options?: TransactionOptions): Promise; /** * Set the Staking contract address */ setStaking(staking: Address, options?: TransactionOptions): Promise; /** * Configure a Role's parameters (Admin only). * Reads the current on-chain config first, then merges the provided overrides * and writes back the full struct via configureRole. */ configureRole(params: { roleId: Hex; minStake?: bigint; ticketPrice?: bigint; exitFeePercent?: bigint; minExitFee?: bigint; }, options?: TransactionOptions): Promise; /** * Transfer Protocol Ownership to a DAO (Multisig/Timelock) * This is the final step of "Protocol Admin" lifecycle. */ transferToDAO(daoAddress: Address, options?: TransactionOptions): Promise; getProtocolParams(): Promise; } /** * SlashGovernance — L3 orchestration for the BLSAggregator slash-policy admin surface * behind an OpenZeppelin {TimelockController} (CC-13 batch B; multisig target locked to * TimelockController, viem-only). * * The BLSAggregator's `setSlashPolicyAdmin` / `setSlashThreshold` are `onlyPolicyAdmin`. * Once the policy admin has been handed to a timelock, changing them is a two-step * `schedule()` → wait `getMinDelay()` → `execute()` flow — this client encodes the inner * call and drives that flow, and reads the current governance state + a pending change's * ETA for a UI to render. * * IMPORTANT: `salt` distinguishes otherwise-identical operations and MUST be persisted by * the caller and reused verbatim between schedule / execute / eta lookups (the operation id * is derived from target+value+data+predecessor+salt). Two identical (call, salt) pairs * collide on-chain. */ declare class SlashGovernance extends BaseClient { blsAggregatorAddress: Address; timelockAddress: Address; constructor(config: ClientConfig & { blsAggregatorAddress: Address; timelockAddress: Address; }); /** The address currently authorised to change the slash threshold table. */ getSlashPolicyAdmin(): Promise
; /** The full slash threshold table (WARNING/MINOR/MAJOR co-sign quorums). */ getSlashThresholds(): Promise<{ warning: number; minor: number; major: number; }>; /** The timelock's minimum delay (seconds) between schedule and execute. */ getMinDelay(): Promise; /** * Schedule handing the slash policy admin to `newAdmin` (usually the timelock itself, * or a follow-on multisig) through the timelock. `delay` defaults to the timelock's * `getMinDelay()`. Persist `salt` to execute later. * * `salt` defaults to {@link ZERO_BYTES32}. Because the operation id is derived from * (target, value, data, predecessor, salt), scheduling a change with the SAME * `newAdmin` and default salt while a prior identical operation is still pending or * already done reverts on-chain (`TimelockUnexpectedOperationState`). For a repeat or * re-issued change, pass a fresh unique `salt`. */ scheduleSetSlashPolicyAdmin(args: { newAdmin: Address; salt?: Hex; delay?: bigint; options?: TransactionOptions; }): Promise; /** Execute a previously-scheduled `setSlashPolicyAdmin(newAdmin)` once its delay has elapsed. */ executeSetSlashPolicyAdmin(args: { newAdmin: Address; salt?: Hex; options?: TransactionOptions; }): Promise; /** * The unix timestamp at which a scheduled `setSlashPolicyAdmin(newAdmin)` becomes * ready. `0n` = not scheduled, `1n` = already executed, else the ready-at time. */ getSetSlashPolicyAdminEta(args: { newAdmin: Address; salt?: Hex; }): Promise; /** * Schedule updating the co-sign quorum for a {@link SlashLevel} through the timelock. * `delay` defaults to `getMinDelay()`. Persist `salt` to execute later. * * `salt` defaults to {@link ZERO_BYTES32}. Scheduling the SAME (slashLevel, threshold) * with the default salt while an identical operation is still pending or done reverts * on-chain (`TimelockUnexpectedOperationState`) — pass a fresh unique `salt` for a * repeat change (e.g. lowering then re-raising the same level). */ scheduleSetSlashThreshold(args: { slashLevel: SlashLevel | number; threshold: number; salt?: Hex; delay?: bigint; options?: TransactionOptions; }): Promise; /** Execute a previously-scheduled `setSlashThreshold(level, threshold)` once its delay has elapsed. */ executeSetSlashThreshold(args: { slashLevel: SlashLevel | number; threshold: number; salt?: Hex; options?: TransactionOptions; }): Promise; /** ETA (see {@link getSetSlashPolicyAdminEta}) for a scheduled `setSlashThreshold(level, threshold)`. */ getSetSlashThresholdEta(args: { slashLevel: SlashLevel | number; threshold: number; salt?: Hex; }): Promise; /** Schedule `data` against the BLSAggregator via the timelock; delay defaults to getMinDelay(). */ private schedule; /** Execute the timelock operation that runs `data` against the BLSAggregator. */ private execute; /** Resolve the timelock operation id for `data` and read its ready-at timestamp. */ private getChangeEta; } export { ProtocolGovernance, type ProtocolParams, SlashGovernance };