UNPKG

@firmachain/firma-js

Version:

The Official FirmaChain Javascript SDK written in Typescript

62 lines (61 loc) 1.6 kB
export declare enum ProposalStatus { PROPOSAL_STATUS_UNSPECIFIED = 0, PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, PROPOSAL_STATUS_VOTING_PERIOD = 2, PROPOSAL_STATUS_PASSED = 3, PROPOSAL_STATUS_REJECTED = 4, PROPOSAL_STATUS_FAILED = 5 } export interface ProposalParam { voting_period: string; deposit_params: { min_deposit: { denom: string; amount: string; }[]; max_deposit_period: string; }; tally_params: { quorum: string; threshold: string; veto_threshold: string; }; } export interface CurrentVoteInfo { yes: string; abstain: string; no: string; no_with_veto: string; } export interface ProposalInfo { proposal_id: string; content: { "@type": string; title: string; description: string; }; status: string; final_tally_result: { yes: string; abstain: string; no: string; no_with_veto: string; }; submit_time: string; deposit_end_time: string; total_deposit: { denom: string; amount: string; }[]; voting_start_time: string; voting_end_time: string; } export declare class GovQueryClient { private readonly axios; constructor(baseUrl: string); queryGetCurrentVoteInfo(id: string): Promise<CurrentVoteInfo>; queryGetParam(): Promise<ProposalParam>; queryGetProposal(id: string): Promise<ProposalInfo>; queryGetProposalListByStatus(status: ProposalStatus): Promise<ProposalInfo[]>; queryGetProposalList(): Promise<ProposalInfo[]>; }