# New Field: Token ID

## Trait Mapper File Format Has Been Updated!

* A new field `tokenId` is added
  * Since NFT’s token id can be extremely large enough (exceeding `2^64`), we are introducing a new field: `tokenId` with **string** data type
  * It is required to insert at least one of `id`, `tokenId,` for each item. When both fields are included in a single item, `id` is ignored and `tokenId` is used
* The original field `id` still works
  * `id` can be used rather than `tokenId`. The new version of MYTY Kit is compatible with previous Trait Mapper file and asset bundles.
  * The field `id` may be deprecated in the future, so it is highly recommended to use `tokenId` rather than `id`.
* File Format

  ```json
  [
  	{
  		"id": number,  // token ID
  		"tokenId": string,  // string type of token ID
  		"filename": string,  // file name of psd/psb file
  		"traits": List<string>  // array of full paths of image layers
  	},
  	...
  ]
  ```
* Example JSON file
  * Case 1: Previous Trait Mapper with only `id`

    ```
    [
    	{
    		"tokenId": "0",
    		"filename": "CollectionName_A_v01.psb",
    		"traits": [
    			"Body/BlueAndYellowJacket",
    			"Head/Tan",
    			"Face/Eyes/BlackLeftEye",
    			 ...
    			"Hair/PurpleLong"
    		]
    	},
    	{
    		"tokenId": "2",
    		"filename": "CollectionName_A_v01.psb",
    		"traits": [
    			"Body/PurpleSweaterWithSatchel",
    			"Head/Gradient2",
    			"Face/Eyes/BlackLeftEye",
    			 ...
    			"Hair/WhiteBucketCap"
    		]
    	},
    	...
    	{
    		"tokenId": "123456",
    		"filename": "CollectionName_B_v01.psb",
    		"traits": [
    			"Body/PinkFleece",
    			"Head/Yellow",
    			"Face/Eyes/BlackLeftEye",
    			 ...
    			"Hair/BlueMessy"
    		]
    	}
    ]
    ```
  * Case 2: New Field wth only `tokenId`
  * Case 3: Mix of `id` and `tokenId`

    ```json
    [
    	{
    		"id": 0,
    		"tokenId": "0",
    		"filename": "CollectionName_A_v01.psb",
    		"traits": [
    			"Body/BlueAndYellowJacket",
    			"Head/Tan",
    			"Face/Eyes/BlackLeftEye",
    			 ...
    			"Hair/PurpleLong"
    		]
    	},
    	{
    		"id": 2,
    		"filename": "CollectionName_A_v01.psb",
    		"traits": [
    			"Body/PurpleSweaterWithSatchel",
    			"Head/Gradient2",
    			"Face/Eyes/BlackLeftEye",
    			 ...
    			"Hair/WhiteBucketCap"
    		]
    	},
    	...
    	{
    		"tokenId": "123456",
    		"filename": "CollectionName_B_v01.psb",
    		"traits": [
    			"Body/PinkFleece",
    			"Head/Yellow",
    			"Face/Eyes/BlackLeftEye",
    			 ...
    			"Hair/BlueMessy"
    		]
    	}
    ]
    ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://myty.gitbook.io/myty-kit/getting-started/2.-trait-mapping/new-field-token-id.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
