Module: AssetsApi

API for interacting with assets.

Methods


<inner> create(params)

Create a new asset.

Parameters:
Name Type Description
params module:AssetsApi~createRequest

Parameters for asset creation.

Returns:

Newly created asset.

Type
Promise.<Asset>

<inner> list(id)

Get asset by the asset id.

Parameters:
Name Type Description
id module:AssetsApi~id

Asset id.

Returns:

target asset.

Type
Promise.<Asset>

<inner> listAll()

List all assets in one Bytom node.

Returns:

target assets.

Type
Promise.<Array.<Asset>>

<inner> updateAlias(params)

Update asset alias.

Parameters:
Name Type Description
params object

Parameters for asset update.

Properties
Name Type Description
id String

id of asset.

alias String

new alias of asset.

Type Definitions


createRequest

Type:
  • Object
Properties:
Name Type Argument Description
alias String <optional>

User specified, unique identifier.

defintion Object <optional>

User-specified, arbitrary/unstructured data visible across blockchain networks.

root_xpubs Array.<String>

Optional. The list of keys used to create the asset.

quorum Number

Optional. the default value is 1, threshold of keys that must sign a transaction to spend asset units controlled by the account.

issuance_program String <optional>

Optional. User-specified, contract program.