import { c as Address } from "../../abi-Bjd7pZee.mjs"; //#region extensions/crypto/src/services/governance-service.d.ts interface SnapshotProposal { id: string; title: string; body: string; state: 'active' | 'closed' | 'pending'; choices: string[]; scores: number[]; scoresTotal: number; start: number; end: number; author: string; space: { id: string; name: string; }; votes: number; quorum: number; link: string; } interface SnapshotVotingPower { space: string; vp: number; vpByStrategy: number[]; vpState: string; } interface TallyProposal { id: string; title: string; description: string; status: string; governor: { name: string; chainId: number; }; voteStats: Array<{ support: string; weight: string; percent: number; }>; startBlock: number; endBlock: number; proposer: { address: string; name?: string; }; } interface GovernorInfo { address: Address; chainId: number; name: string; tokenAddress?: Address; } declare const KNOWN_GOVERNORS: Record; declare const GOVERNOR_ABI: readonly [{ readonly name: "castVote"; readonly type: "function"; readonly stateMutability: "nonpayable"; readonly inputs: readonly [{ readonly name: "proposalId"; readonly type: "uint256"; }, { readonly name: "support"; readonly type: "uint8"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; }, { readonly name: "castVoteWithReason"; readonly type: "function"; readonly stateMutability: "nonpayable"; readonly inputs: readonly [{ readonly name: "proposalId"; readonly type: "uint256"; }, { readonly name: "support"; readonly type: "uint8"; }, { readonly name: "reason"; readonly type: "string"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; }, { readonly name: "getVotes"; readonly type: "function"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly name: "account"; readonly type: "address"; }, { readonly name: "timepoint"; readonly type: "uint256"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; }, { readonly name: "state"; readonly type: "function"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly name: "proposalId"; readonly type: "uint256"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint8"; }]; }, { readonly name: "proposalDeadline"; readonly type: "function"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly name: "proposalId"; readonly type: "uint256"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; }]; declare class GovernanceService { /** * Fetch proposals from a Snapshot space. */ getSnapshotProposals(space: string, state?: 'active' | 'closed' | 'all', limit?: number): Promise; /** * Get voting power on a Snapshot space. */ getSnapshotVotingPower(space: string, voter: string): Promise; /** * Resolve a governor name or address. */ resolveGovernor(input: string): GovernorInfo | null; /** * Get all known governors. */ getKnownGovernors(): { id: string; name: string; address: `0x${string}`; chainId: number; }[]; /** * Cast an on-chain vote. * Support: 0 = Against, 1 = For, 2 = Abstain */ castVote(governorAddress: Address, proposalId: bigint, support: number, reason: string | undefined, walletClient: any, publicClient: any): Promise<{ hash: string; }>; /** * Delegate voting power on a governance token. */ delegate(tokenAddress: Address, delegatee: Address, walletClient: any, publicClient: any): Promise<{ hash: string; }>; /** * Get on-chain voting power for an address on a governance token. */ getOnchainVotingPower(tokenAddress: Address, userAddress: Address, publicClient: any): Promise<{ votes: string; balance: string; delegate: string; }>; /** * Get proposal state from an on-chain Governor. */ getProposalState(governorAddress: Address, proposalId: bigint, publicClient: any): Promise; } declare function getGovernanceService(): GovernanceService; declare function resetGovernanceService(): void; //#endregion export { GOVERNOR_ABI, GovernanceService, GovernorInfo, KNOWN_GOVERNORS, SnapshotProposal, SnapshotVotingPower, TallyProposal, getGovernanceService, resetGovernanceService }; //# sourceMappingURL=governance-service.d.mts.map