import { Hex, Address, Account, Hash, PublicClient, WalletClient } from 'viem'; /** A registered validator's on-chain BLS G1 public key point. */ type BLSG1Point = { x_a: Hex; x_b: Hex; y_a: Hex; y_b: Hex; }; /** * BLSAggregator slash severity levels (SP #329 unified slash consensus). The * per-level co-sign quorum is read via {@link AggregatorActions.getSlashThreshold} * (bootstrap on Sepolia: WARNING 2-of-3, MINOR/MAJOR 3-of-3). */ declare enum SlashLevel { WARNING = 0, MINOR = 1, MAJOR = 2 } /** * ABI-encode a BLSAggregator `setSlashPolicyAdmin(newAdmin)` call (CC-13 batch B). * Returns the inner calldata to route through governance — pair it with the * BLSAggregator address as the `target` of a {TimelockController} `schedule`/`execute` * (see the admin `SlashGovernance` helper). The current admin is read via * {@link AggregatorActions.slashPolicyAdmin}. Once handed over to a timelock, a direct * EOA call to `setSlashPolicyAdmin` reverts `NotSlashPolicyAdmin`. */ declare function encodeSetSlashPolicyAdmin(newAdmin: Address): Hex; /** * ABI-encode a BLSAggregator `setSlashThreshold(slashLevel, threshold)` call (CC-13 * batch B). `threshold` is the co-sign quorum for the given {@link SlashLevel}. Returns * the inner calldata to route through governance (same target/timelock pairing as * {@link encodeSetSlashPolicyAdmin}). */ declare function encodeSetSlashThreshold(slashLevel: SlashLevel | number, threshold: number): Hex; type AggregatorActions = { registerBLSPublicKey: (args: { validator: Address; publicKey: Hex; account?: Account | Address; }) => Promise; /** @deprecated The deployed BLSAggregator ABI has no `blsPublicKeys` mapping getter — this wrapper now reads the ABI-confirmed `getBLSPublicKey` and projects out the slot. Prefer {@link getBLSPublicKey}. */ blsPublicKeys: (args: { validator: Address; }) => Promise<{ publicKey: Hex; isActive: boolean; }>; /** Read a validator's registered G1 key + its registration SLOT (1-indexed) + active flag. */ getBLSPublicKey: (args: { validator: Address; }) => Promise<{ publicKey: BLSG1Point; slot: number; isActive: boolean; }>; /** Reverse of {@link getBLSPublicKey}: the validator address registered at a given slot. */ validatorAtSlot: (args: { slot: number; }) => Promise
; /** Revoke a validator's registered BLS public key (owner-gated). ABI: revokeBLSPublicKey(address validator). */ revokeBLSPublicKey: (args: { validator: Address; account?: Account | Address; }) => Promise; /** Toggle permissionless (self-service) BLS key registration. ABI: setPermissionlessBLSRegistration(bool enabled). */ setPermissionlessBLSRegistration: (args: { enabled: boolean; account?: Account | Address; }) => Promise; /** Whether permissionless BLS key registration is currently enabled (view). */ permissionlessBLSRegistration: () => Promise; /** * Build the DVT `signerMask` for a set of signer addresses by reading each * signer's on-chain registration slot. bit `s-1` is set for a validator at slot * `s` (see {@link BLSHelpers.slotsToSignerMask}). Throws if any signer is not a * registered, active validator, or if two signers map to the same slot. */ buildSignerMask: (args: { signers: Address[]; }) => Promise<{ signerMask: bigint; slots: number[]; }>; /** On-chain aggregate-signature verification (view). `sigBytes` = aggregated sigG2. */ verify: (args: { expectedMessageHash: Hex; signerMask: bigint; requiredThreshold: bigint; sigBytes: Hex; }) => Promise; setDefaultThreshold: (args: { newThreshold: bigint; account?: Account | Address; }) => Promise; setMinThreshold: (args: { newThreshold: bigint; account?: Account | Address; }) => Promise; defaultThreshold: () => Promise; minThreshold: () => Promise; /** * The address authorised to update the slash threshold table (`slashPolicyAdmin()` view). * Bootstrap on Sepolia = deployer EOA; governance moves it to a TimelockController (CC-13). */ slashPolicyAdmin: () => Promise
; /** The co-sign quorum required for a given {@link SlashLevel} (`slashThresholds(uint8)` view). */ getSlashThreshold: (args: { slashLevel: SlashLevel | number; }) => Promise; /** Convenience: read the whole slash threshold table (WARNING/MINOR/MAJOR) in one shot. */ getSlashThresholds: () => Promise<{ warning: number; minor: number; major: number; }>; executeProposal: (args: { proposalId: bigint; target: Address; callData: Hex; requiredThreshold: bigint; proof: Hex; account?: Account | Address; }) => Promise; verifyAndExecute: (args: { proposalId: bigint; operator: Address; slashLevel: number; repUsers: Address[]; newScores: bigint[]; epoch: bigint; evidenceHash: Hex; proof: Hex; account?: Account | Address; }) => Promise; executedProposals: (args: { proposalId: bigint; }) => Promise; proposalNonces: (args: { proposalId: bigint; }) => Promise; aggregatedSignatures: (args: { index: bigint; }) => Promise<{ aggregatedSig: Hex; messageHash: Hex; timestamp: bigint; verified: boolean; }>; setDVTValidator: (args: { dv: Address; account?: Account | Address; }) => Promise; setSuperPaymaster: (args: { paymaster: Address; account?: Account | Address; }) => Promise; DVT_VALIDATOR: () => Promise
; SUPERPAYMASTER: () => Promise
; REGISTRY: () => Promise
; MAX_VALIDATORS: () => Promise; owner: () => Promise
; transferOwnership: (args: { newOwner: Address; account?: Account | Address; }) => Promise; renounceOwnership: (args: { account?: Account | Address; }) => Promise; version: () => Promise; }; declare const aggregatorActions: (address: Address) => (client: PublicClient | WalletClient) => AggregatorActions; export { type AggregatorActions as A, type BLSG1Point as B, SlashLevel as S, encodeSetSlashThreshold as a, aggregatorActions as b, encodeSetSlashPolicyAdmin as e };