Function toCaipAssetId

  • Asset ID as defined per the CAIP-19 https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-19.md.

    It defines a way to uniquely identify any blockchain asset in a human-readable way.

    Throws

    Error This exception is thrown if the inputs do not comply with the CAIP-19 syntax specification https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-19.md#syntax.

    Returns

    A CAIP asset ID.

    Parameters

    • namespace: string

      The standard (ecosystem) of similar blockchains.

    • reference: string

      Identity of a blockchain within a given namespace.

    • assetNamespace: string

      The namespace domain of an asset.

    • assetReference: string

      The identity of an asset within a given namespace.

    • tokenId: string

      The unique identifier for an addressable asset of a given type.

    Returns CaipAssetId