Class

AssetType

AssetType()

Object representing an asset definition. Used to fetch tracing policies and any other information that may be required to construct a valid transfer or issuance.

Constructor

# new AssetType()

View Source pkg/wasm.js, line 859

Methods

# static from_json(val) → {AssetType}

Builds an asset type from a JSON-encoded JavaScript value.

Parameters:
Name Type Description
val JsValue

JSON-encoded asset type fetched from ledger server with the asset_token/{code} route. Note: The first field of an asset type is properties. See the example below.

See:
  • Network.getAsset for information about how to fetch an asset type from the ledger server.

View Source pkg/wasm.js, line 899

AssetType
Example
"properties":{
  "code":{
    "val":[151,8,106,38,126,101,250,236,134,77,83,180,43,152,47,57,83,30,60,8,132,218,48,52,167,167,190,244,34,45,78,80]
  },
  "issuer":{"key":“iFW4jY_DQVSGED05kTseBBn0BllPB9Q9escOJUpf4DY=”},
  "memo":“test memo”,
  "asset_rules":{
    "transferable":true,
    "updatable":false,
    "transfer_multisig_rules":null,
    "max_units":5000
  }
}

# get_tracing_policies() → {TracingPolicies}

Fetch the tracing policies associated with this asset type.

View Source pkg/wasm.js, line 911