Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LedgerManager

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Readonly cache

cache: Map<string, Ledger> = ...

The cache of the manager.

Readonly client

client: Client

Protected Optional Readonly extras

extras: []

Protected Readonly hold

hold: typeof Ledger

Readonly stellar

stellar: StellarClient

Methods

add

  • add(data: LedgerRecord, cache?: boolean): Ledger

fetch

  • fetch(id: string | number, cache?: boolean, checkCache?: boolean): Promise<Ledger>
  • Fetch the ledger by its id in the cache or from the Pi Network Stellar API.

    Parameters

    • id: string | number

      The ledger id to fetch.

    • Optional cache: boolean

      If the ledger should be cached (or cached ledger patched), true by default.

    • checkCache: boolean = true

      If the ledger should be fetched in the cache, true by default.

    Returns Promise<Ledger>

    The fetched ledger.

resolve

  • resolve(key: string): undefined | Ledger

Generated using TypeDoc