Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PeriodVoter

Period Voters are accounts that voted during a VotingEpoch on the Tezos blockchain. For more information see the Voting API documentation on tzKT.

Hierarchy

  • PeriodVoter

Index

Constructors

constructor

  • new PeriodVoter(delegate: any, rolls: number, status: null | string): PeriodVoter

Properties

delegate

delegate: any

rolls

rolls: number

status

status: null | string

Methods

Static byAddress

  • byAddress(index: number, address: string, domain?: string): Promise<PeriodVoter>
  • Fetches a voter with the specified address from the voting period at the specified index from tzKT.

    see

    get period voter.

    example

    Fetch PeriodVoters in a given Voting Period

    let votingPeriodIndex: number = 33;
    let bakerAddress: string = 'tz1c8TSSGtVtg7ANrNVY7G4KnLn7iKdRnUVk';
    let voter: PeriodVoter = await PeriodVoter.byAddress(votingPeriodIndex, bakerAddress);
    

    Parameters

    • index: number
    • address: string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<PeriodVoter>

    Returns a voter with the specified address from the voting period at the specified index

Static current

  • Fetches voters from the current period from tzKT.

    see

    get current period voters.

    example

    Fetch PeriodVoters in the Current Voting Period

    let parameters: GetPeriodVoterParameters = {'status': 'none'};
    let voter: PeriodVoter = await PeriodVoter.current(parameters);
    

    Parameters

    Returns Promise<PeriodVoter[]>

    Returns voters from the current period.

Static currentByAddress

  • currentByAddress(address: string, domain?: string): Promise<PeriodVoter>
  • Fetches a voter with the specified address from the current period from tzKT.

    see

    get current period voter.

    example

    Fetch a Specific Voter in the current Voting Period

    let bakerAddress: string = 'tz1c8TSSGtVtg7ANrNVY7G4KnLn7iKdRnUVk';
    let voter: PeriodVoter = await PeriodVoter.currentByAddress(bakerAddress);
    

    Parameters

    • address: string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<PeriodVoter>

    Returns a voter with the specified address from the current period.

Static fromAPI

Static get

  • Fetches voters from the voting period at the specified index from tzKT.

    see

    get period voters.

    example

    Fetch PeriodVoters in a given Voting Period

    let votingPeriodIndex: number = 33;
    let voters: PeriodVoter[] = await PeriodVoter.get(votingPeriodIndex);
    

    Parameters

    Returns Promise<PeriodVoter[]>

    Returns voters from the voting period at the specified index.

Generated using TypeDoc