Options
All
  • Public
  • Public/Protected
  • All
Menu

A Switchboard account representing a crank of aggregators ordered by next update time.

Hierarchy

  • CrankAccount

Index

Constructors

Properties

keypair?: Keypair
program: Program<Idl>
publicKey: PublicKey

Methods

  • loadData(): Promise<any>
  • Load and parse CrankAccount data based on the program IDL.

    Returns Promise<any>

    CrankAccount data parsed in accordance with the Switchboard IDL.

  • peakNext(n: number): Promise<PublicKey[]>
  • Get an array of the next aggregator pubkeys to be popped from the crank, limited by n

    Parameters

    • n: number

      The limit of pubkeys to return.

    Returns Promise<PublicKey[]>

    Pubkey list of Aggregators next up to be popped.

  • peakNextReady(n?: number): Promise<PublicKey[]>
  • Get an array of the next readily updateable aggregator pubkeys to be popped from the crank, limited by n

    Parameters

    • Optional n: number

      The limit of pubkeys to return.

    Returns Promise<PublicKey[]>

    Pubkey list of Aggregator pubkeys.

  • peakNextWithTime(n: number): Promise<CrankRow[]>
  • Get an array of the next aggregator pubkeys to be popped from the crank, limited by n

    Parameters

    • n: number

      The limit of pubkeys to return.

    Returns Promise<CrankRow[]>

    Pubkey list of Aggregators and next timestamp to be popped, ordered by timestamp.

  • size(): number
  • Get the size of a CrankAccount on chain.

    Returns number

    size.

  • Create and initialize the CrankAccount.

    Parameters

    • program: Program<Idl>

      Switchboard program representation holding connection and IDL.

    • params: CrankInitParams

    Returns Promise<CrankAccount>

    newly generated CrankAccount.

Generated using TypeDoc