Class AssetFactory

Factory class for creating the appropriate asset instance based on ARC standards

Constructors

Methods

  • Creates the appropriate asset instance from asset parameters

    Parameters

    • id: number

      The asset ID

    • assetParams: AssetParams

      The asset parameters

    • network: Network

      The Algorand network

    Returns Promise<CoreAsset | Arc19 | Arc3 | Arc69>

    A promise resolving to the appropriate asset instance

  • Gets the ARC standard type of an asset

    Parameters

    • id: number

      The asset ID

    • network: Network

      The Algorand network

    Returns Promise<"arc3" | "arc69" | "arc19" | "unknown">

    The ARC standard type or 'unknown'