Options
All
  • Public
  • Public/Protected
  • All
Menu
class

AssetIdentifier

package

Swapable

subpackage

Models

since

v1.0.0

description

Model that describes identifiers of digital assets. An identifier is created around an \a id (4 bytes), a \a source and an \a owner public account (32 bytes). The owner account is always the first liquidity provider of a pool x:y.

Hierarchy

  • AssetIdentifier

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

id

id: string
description

A unique identifier for an asset.

e.g.: "0a1f3e2c" (4 bytes)

target

target: PublicAccount

Accessors

nonce

  • get nonce(): MosaicNonce

Methods

toMosaicId

  • toMosaicId(): MosaicId

Static createForSource

  • Creates an asset identifier from a \a name, a \a target public account and a \a source asset source blockchain network.

    This method returns a deterministic identifier build from its three arguments.

    static
    access

    public

    Parameters

    • name: string

      The cryptocurrency name (e.g.: "symbol.xym", "Bitcoin", etc.).

    • target: PublicAccount

      The target public account (public key of the ISSUER of the cryptocurrency).

    • source: AssetSource

      The source network information for the asset (i.e. where it is issued).

    Returns AssetIdentifier

    Given a triplet of name, target account address and source network, returns a deterministic asset identifier.

Generated using TypeDoc