# Assets

### Assets[​](https://docs.x.immutable.com/docs/x/how-to-get-data#assets) <a href="#assets" id="assets"></a>

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 <mark style="color:blue;">permanently removed from circulation.</mark>                         |

#### Get list of assets[​](https://docs.x.immutable.com/docs/x/how-to-get-data#get-list-of-assets) <a href="#get-list-of-assets" id="get-list-of-assets"></a>

* Typescript Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">listAssets</mark>

#### Request[​](https://docs.x.immutable.com/docs/x/how-to-get-data#request-6) <a href="#request-6" id="request-6"></a>

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[​](https://docs.x.immutable.com/docs/x/how-to-get-data#example-response-4) <a href="#example-response-4" id="example-response-4"></a>

```
{
  result: [
    {
      token_address: '0x23db0e72bd7738da0d0afe7bccb4109f5f05edcf', // Address of the ERC721 contract
      token_id: '1', // ERC721 Token ID of this asset
      user: '0xd5aefc1fed909da9a5409594d758e3bdd055634c', // Ethereum address of the user who owns this asset
      status: 'imx', // Status of this asset (where it is in the system)
      uri: null, // URI to access this asset externally to XpansionChain 
      name: '1st NFT', // Name of this asset
      description: 'This is your 1st nft', // Description of this asset
      image_url: 'https://gateway.pinata.cloud/ipfs/QmS7p34oVDHB3VBE2d9bMqrbNFxdmxtwJ8BYcuHa9yNQHz', // URL of the image which should be used for this asset
      metadata: { // Metadata of this asset
        name: 'Juju Mints',
        icon_url: 'https://media-exp1.licdn.com/dms/image/C4E03AQFB06seGq_MGA/profile-displayphoto-shrink_100_100/0/1597970079587?e=1669248000&v=beta&t=hd0P3T5102HzRvsSK4TBtjhLJLaivuh0u3Qlu57g7lk'
      },
      collection: { // Details of the collection
        name: '1st NFT',
        class: 'EnumValue1',
        attack: 123,
        image_url: 'https://gateway.pinata.cloud/ipfs/QmS7p34oVDHB3VBE2d9bMqrbNFxdmxtwJ8BYcuHa9yNQHz',
        collectable: true,
        description: 'This is your 1st nft'
      },
      created_at: '2022-09-23T14:32:59.876942Z' // Timestamp of when the asset was created
      updated_at: '2022-09-23T14:34:01.793638Z',  // Timestamp of when the asset was updated
  },
  // Other assets returned
  ...
  ],
  cursor: "eyJpZCI6IjB4OTkzNzQyNzhiMThjM2YyNTA5MTFhZjVjMWM2ZGE1OGIxZmMxZjVkZDk1ZjBhYzFkYjA3MTgwOWI2MWM0M2E0ZCIsIm5hbWUiOiIxc3QgTkZUIiwidXBkYXRlZF9hdCI6IjIwMjItMDktMjNUMTQ6MzQ6MDEuNzkzNjM4WiJ9",
  // Remaining results
  remaining: 1,
}
```

* Kotlin (JVM) Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">listAssets</mark>

* Swift Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">listAssets</mark>

* Golang Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">ListAssets</mark>

* C# Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">ListAssets</mark>

See also <mark style="color:blue;">listAssets example</mark> in the Core SDK.

#### Get details about an asset[​](https://docs.x.immutable.com/docs/x/how-to-get-data#get-details-about-an-asset) <a href="#get-details-about-an-asset" id="get-details-about-an-asset"></a>

* Typescript Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">listAssets</mark>

#### Request[​](https://docs.x.immutable.com/docs/x/how-to-get-data#request-7) <a href="#request-7" id="request-7"></a>

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

```
const getAsset = async (
  tokenAddress: string,
  tokenId: string,
  includeFees: boolean
) => {
  const response = await client.getAsset({
    tokenAddress,
    tokenId,
    includeFees,
  });
  return response;
};
getAsset('0x23db0e72bd7738da0d0afe7bccb4109f5f05edcf', '1', true)
  .then((result) => {
    console.log(result);
  })
  .catch((e) => {
    console.log(e);
  });
```

#### Example response[​](https://docs.x.immutable.com/docs/x/how-to-get-data#example-response-5) <a href="#example-response-5" id="example-response-5"></a>

```
{
      token_address: '0x23db0e72bd7738da0d0afe7bccb4109f5f05edcf', // Address of the ERC721 contract
      token_id: '1', // ERC721 Token ID of this asset
      user: '0xd5aefc1fed909da9a5409594d758e3bdd055634c', // Ethereum address of the user who owns this asset
      status: 'imx', // Status of this asset (where it is in the system)
      uri: null, // URI to access this asset externally to XpansionChain 
      name: '1st NFT', // Name of this asset
      description: 'This is your 1st nft', // Description of this asset
      image_url: 'https://gateway.pinata.cloud/ipfs/QmS7p34oVDHB3VBE2d9bMqrbNFxdmxtwJ8BYcuHa9yNQHz', // URL of the image which should be used for this asset
      metadata: { // Metadata of this asset
        name: 'Juju Mints',
        icon_url: 'https://media-exp1.licdn.com/dms/image/C4E03AQFB06seGq_MGA/profile-displayphoto-shrink_100_100/0/1597970079587?e=1669248000&v=beta&t=hd0P3T5102HzRvsSK4TBtjhLJLaivuh0u3Qlu57g7lk'
      },
      collection: { // Details of the collection
        name: '1st NFT',
        class: 'EnumValue1',
        attack: 123,
        image_url: 'https://gateway.pinata.cloud/ipfs/QmS7p34oVDHB3VBE2d9bMqrbNFxdmxtwJ8BYcuHa9yNQHz',
        collectable: true,
        description: 'This is your 1st nft'
      },
      created_at: '2022-09-23T14:32:59.876942Z' // Timestamp of when the asset was created
      updated_at: '2022-09-23T14:34:01.793638Z',  // Timestamp of when the asset was updated
      fees: [  // Royalties to pay on this asset operations
        {
          type: 'protocol',
          address: '0xc8714f989ce817e5d21349888077aa5db4a9bcf6',
          percentage: 2
        }
      ]
  }
```

* Kotlin (JVM) Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">get-asset</mark>

* Swift Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">getasset</mark>

* Golang Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">GetAsset</mark>

* C# Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">GetAsset</mark>

See also <mark style="color:blue;">listAssets example</mark> in the Core SDK.
