Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GovAPI

Hierarchy

  • BaseAPI
    • GovAPI

Index

Constructors

constructor

  • new GovAPI(c: APIRequester): GovAPI

Methods

depositParameters

deposits

  • deposits(proposalId: number, _params?: Partial<PaginationOptions & APIParams>): Promise<[Deposit[], Pagination]>
  • Get the deposits for a proposal

    Parameters

    • proposalId: number

      proposal's ID

    • _params: Partial<PaginationOptions & APIParams> = {}

    Returns Promise<[Deposit[], Pagination]>

initialDeposit

  • initialDeposit(proposalId: number): Promise<Coins>

parameters

  • parameters(params?: APIParams): Promise<GovParams>

proposal

  • proposal(proposalId: number, params?: APIParams): Promise<Proposal>

proposals

  • proposals(params?: Partial<PaginationOptions & APIParams>): Promise<[Proposal[], Pagination]>

proposer

  • proposer(proposalId: number): Promise<string>

searchProposalCreationTx

  • searchProposalCreationTx(proposalId: number): Promise<Tx.Data>

tally

  • tally(proposalId: number, params?: APIParams): Promise<Tally>
  • Gets the current tally for a proposal.

    Parameters

    • proposalId: number

      proposal's ID

    • params: APIParams = {}

    Returns Promise<Tally>

tallyParameters

  • tallyParameters(params?: APIParams): Promise<TallyParams>

votes

  • votes(proposalId: number, _params?: Partial<PaginationOptions & APIParams>): Promise<[Vote[], Pagination]>
  • Get the current votes for a proposal

    Parameters

    • proposalId: number

      proposal's ID

    • _params: Partial<PaginationOptions & APIParams> = {}

    Returns Promise<[Vote[], Pagination]>

votingParameters