import type { Address, PublicClient } from "viem"; import type { ClientConfig } from "./config.js"; import type { MachineryAdminConfig } from "./machineryWriter.js"; import type { TxResult } from "./trade.js"; /** Signer configuration for the BinaryMarketsModule governance capability. */ export type { MachineryAdminConfig as GovernanceAdminConfig }; /** * Params for {@link GovernanceAdmin.setAdapterApproved}. * * @category administration */ export interface SetAdapterApprovedParams { /** The oracle adapter to approve or revoke on BinaryMarketsModule. */ adapter: Address; /** `true` approves (adapter can back new markets); `false` revokes. */ approved: boolean; /** Gas ceiling for this tx; overrides the config default. */ gas?: bigint; } /** * The protocol-admin governance surface on BinaryMarketsModule — the one seam * an operator can't self-serve (see the module notes above). Built via * `client.createGovernanceAdmin(config)` with a signer * ({@link GovernanceAdminConfig}); the write is module-owner only, the reads * are open chain point reads. * * Every write throws `ContractRevertError` when the chain rejects it — at * simulation, at send, or as a mined receipt with `status: "reverted"` (the * reason is recovered by replaying the call at that block while the node still * has the state) — and `RpcError` when the send or the receipt read does not * complete. A reverted write never resolves as if it had been confirmed. * * @category administration */ export interface GovernanceAdmin { /** * Approve (or revoke) an oracle adapter on the module — the inert→live gate * for a factory-minted adapter. MODULE-OWNER ONLY: reverts for any other * caller, so a UI shows this only to the protocol admin (see * {@link GovernanceAdmin.isModuleOwner}). */ setAdapterApproved(p: SetAdapterApprovedParams): Promise; /** The module owner (the protocol admin). Needs `config.addresses.binaryModule`. */ getModuleOwner(): Promise
; /** * Whether `addr` is the module owner — gate the `setAdapterApproved` UI on * this. Needs `config.addresses.binaryModule`. */ isModuleOwner(addr: Address): Promise; } /** * Dependencies supplied by the owning client to its governance capability. * * @internal */ export interface GovernanceAdminDeps { getConfig: () => ClientConfig; getClient: () => PublicClient; } export declare function createGovernanceAdminWithDeps(config: MachineryAdminConfig, deps: GovernanceAdminDeps): GovernanceAdmin;