Options
All
  • Public
  • Public/Protected
  • All
Menu

A Switchboard account representing a lease for managing funds for oracle payouts for fulfilling feed updates.

Hierarchy

  • LeaseAccount

Index

Constructors

Properties

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

Methods

  • estimatedLeaseTimeRemaining(): Promise<number>
  • Estimate the time remaining on a given lease

    params

    void

    Returns Promise<number>

    number milliseconds left in lease (estimate)

  • Adds fund to a LeaseAccount. Note that funds can always be withdrawn by the withdraw authority if one was set on lease initialization.

    Parameters

    Returns Promise<string>

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

    Returns Promise<any>

    LeaseAccount data parsed in accordance with the Switchboard IDL.

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

    Returns number

    size.

  • Create and initialize the LeaseAccount.

    Parameters

    • program: Program<Idl>

      Switchboard program representation holding connection and IDL.

    • params: LeaseInitParams

    Returns Promise<LeaseAccount>

    newly generated LeaseAccount.

Generated using TypeDoc