Assets

Assets

When details about assets are returned, there is a status property that indicates its current location (L1 or L2) or state (depositing, withdrawable, etc.). Assets can have one of the following statuses:

Status
Description

imx

The asset is in the XpansionChain L2 environment.

eth

The asset is on the main Ethereum blockchain.

pendingWithdrawal

A withdrawal has been requested for this asset, and it will be included in an upcoming batch.

withdrawable

The asset has been included in a published batch, and can now be withdrawn from the XpansionChain smart contract.

burned

The asset has been permanently removed from circulation.

Get list of assets

  • Typescript Core SDK

📚SDK REFERENCE

  • listAssets

Request

Get a list of assets at a particular collection address ordered by name:

const getListAssets = async (
  collectionAddress: string,
  orderBy: 'updated_at' | 'name'
) => {
  const response = await client.listAssets({
    collection: collectionAddress,
    orderBy: orderBy,
  });
  return response.result;
};
getListAssets('0x23db0e72bd7738da0d0afe7bccb4109f5f05edcf', 'name')
  .then((result) => {
    //print the result
    console.log(result);
  })
  .catch((e) => {
    console.log(e);
  });

Example response

  • Kotlin (JVM) Core SDK

📚SDK REFERENCE

  • listAssets

  • Swift Core SDK

📚SDK REFERENCE

  • listAssets

  • Golang Core SDK

📚SDK REFERENCE

  • ListAssets

  • C# Core SDK

📚SDK REFERENCE

  • ListAssets

See also listAssets example in the Core SDK.

Get details about an asset

  • Typescript Core SDK

📚SDK REFERENCE

  • listAssets

Request

Get details of an asset from a particular collection with ID of 1:

Example response

  • Kotlin (JVM) Core SDK

📚SDK REFERENCE

  • get-asset

  • Swift Core SDK

📚SDK REFERENCE

  • getasset

  • Golang Core SDK

📚SDK REFERENCE

  • GetAsset

  • C# Core SDK

📚SDK REFERENCE

  • GetAsset

See also listAssets example in the Core SDK.

Last updated