Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OfferManager

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Readonly cache

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

The cache of the manager.

Readonly client

client: Client

Protected Optional Readonly extras

extras: []

Protected Readonly hold

hold: typeof Offer

Readonly stellar

stellar: StellarClient

Methods

add

  • add(data: OfferRecord, cache?: boolean): Offer

fetch

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

    Parameters

    • id: string

      The offer id to fetch.

    • Optional cache: boolean

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

    • checkCache: boolean = true

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

    Returns Promise<Offer>

    The fetched offer.

resolve

  • resolve(key: string): undefined | Offer

Generated using TypeDoc