UNPKG

@myclique/governance-sdk

Version:

The SDK is provides easy access to the high level interactions to be governance with an Clique DAO.

83 lines (82 loc) 1.92 kB
import { Token, TokenAmount } from "../../token"; import { CChainId } from "../constants"; export declare enum VotingTypes { ANY = 0, SINGLE = 1, MULTI = 2 } export declare enum ProposalStatus { SOON = 1, OPEN = 2, CLOSED = 3, CANCEL = 4, SUCCESS = 5 } export interface DaoInfoProp { daoAddress: string; daoChainId: CChainId; name: string; handle: string; category: string; description: string; twitter: string; github: string; website: string; discord: string; daoLogo: string; daoTokenAddress: string; daoTokenChainId: CChainId; token: Token; proposalThreshold: TokenAmount; votingThreshold: TokenAmount; votingPeriod: number; votingType: VotingTypes; isCustomVotes: boolean; } export interface ProposalOptionProp { name: string; amount: TokenAmount; per: number; } export interface ProposalDetailProp { status: ProposalStatus; creator: string; title: string; cancel: boolean; introduction: string; uuid: string; startTime: number; endTime: number; votingType: VotingTypes; content: string; proposalOptions: ProposalOptionProp[]; proposalId: number; votingThreshold: TokenAmount; totalVoteAmount: TokenAmount; } export interface AccountVotesInfo { name: string; amount: TokenAmount; } export declare enum ProposalSignType { CREATE_PROPOSAL = 0, VOTE = 1 } export interface ProposalSignProp { balance: TokenAmount; account: string; signature: string; tokenAddress: string; tokenChainId: CChainId; deadline: number; } export interface ProposalVoteHistory { optionIndex: number; voter: string; amountRaw: string; amount: TokenAmount; } export declare enum ProposalVotingTypes { SINGLE = 1, MULTI = 2 }