Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AssetManager

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Readonly cache

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

The cache of the manager.

Readonly client

client: Client

Protected Optional Readonly extras

extras: []

Protected Readonly hold

hold: typeof Asset

Readonly stellar

stellar: StellarClient

Methods

add

  • add(data: AssetRecord, cache?: boolean): Asset

fetch

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

    Parameters

    • id: string

      The asset id to fetch.

    • Optional cache: boolean

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

    • checkCache: boolean = true

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

    Returns Promise<Asset>

    The fetched asset.

resolve

  • resolve(key: string): undefined | Asset

Generated using TypeDoc