Options
All
  • Public
  • Public/Protected
  • All
Menu

A Switchboard account representing an oracle account and its associated queue and escrow account.

Hierarchy

  • OracleAccount

Index

Constructors

Properties

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

Methods

  • getBalance(): Promise<number>
  • heartbeat(authority: Keypair): Promise<string>
  • Inititates a heartbeat for an OracleAccount, signifying oracle is still healthy.

    Parameters

    • authority: Keypair

    Returns Promise<string>

    TransactionSignature.

  • heartbeatTx(): Promise<Transaction>
  • /** Inititates a heartbeat for an OracleAccount, signifying oracle is still healthy.

    Returns Promise<Transaction>

    TransactionSignature.

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

    Returns Promise<any>

    OracleAccount data parsed in accordance with the Switchboard IDL.

  • size(): number
  • Get the size of an OracleAccount on chain.

    Returns number

    size.

  • Create and initialize the OracleAccount.

    Parameters

    • program: Program<Idl>

      Switchboard program representation holding connection and IDL.

    • params: OracleInitParams

    Returns Promise<OracleAccount>

    newly generated OracleAccount.

  • decode(program: Program<Idl>, accountInfo: AccountInfo<Buffer>): any
  • Parameters

    • program: Program<Idl>
    • accountInfo: AccountInfo<Buffer>

    Returns any

  • Constructs OracleAccount from the static seed from which it was generated.

    Parameters

    Returns [OracleAccount, number]

    OracleAccount and PDA bump tuple.

Generated using TypeDoc