> For the complete documentation index, see [llms.txt](https://numbersprotocol.gitbook.io/about/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://numbersprotocol.gitbook.io/about/introduction/numbers-protocol/defining-web3-assets/assettree.md).

# AssetTree

## What is AssetTree

AssetTree files describe an asset's properties, including its creator, creation time, license, and other relevant details. These AssetTree files contain a comprehensive collection of metadata that are important to authenticating digital assets on the blockchain.&#x20;

When changes are made to an asset, a new [Commit](/about/introduction/numbers-protocol/defining-web3-assets/commit.md) is created on the blockchain. This process also leads to the generation of a new AssetTree file, reflecting the updated state of the asset. Each of these commits includes the [Nid](/about/introduction/numbers-protocol/defining-web3-assets/numbers-id-nid.md) of the relevant AssetTree within its metadata, linking every asset state to a particular point in the blockchain.

An important part of this process is the merging of AssetTree files. This must be done according to the [Commit](/about/introduction/numbers-protocol/defining-web3-assets/commit.md) specifications, which then allows users to trace the complete history of an asset. Users may also use [API](/about/developers/read-asset-history/get-the-merged-assettree.md) or [nit](/about/developers/nit-git-for-media-files.md) module to merge AssetTree files. By merging the AssetTree files, one can see the complete lifecycle of the asset from its creation to its alterations, to the current state.

For example, consider a digital art piece that has undergone multiple iterations. Each AssetTree file would document properties such as the artist's name, the dates of revisions, the licenses under which the art is distributed, any relevant keywords, and other pertinent information about the art at each point of its evolution. These historical snapshots can be used to verify the authenticity of the art piece at each stage, ensuring it hasn't been tampered with and can always be traced back to its original creator.

Overall, AssetTree provides a comprehensive view of the properties of the asset and ensures transparency and accountability, making it an essential part of the assetization process.

## AssetTree Specification

AssetTree is a JSON file on IPFS containing the following information:

1. `assetCid`: (string) The Nid of the asset file
2. `assetCreator`: (string) Name of the asser creator. The length should not exceed 15 characters.
3. `encodingFormat`: (string) The asset's type expressed using a MIME format
4. `abstract`: (string) An abstract is a short description that summarizes the asset, the length should not exceed 500 characters. More details see the definition on the [schema.org](https://schema.org/CreativeWork)
5. `assetTimestampCreated`: (Unix timestamp) Creation time of the asset file, the time when the digital media content was converted to a Web3 asset (i.e. with the first blockchain recognition).
6. `headline`: (string, optional) Headline or the title of the content file, the length should not exceed 25 characters. More details see the definition on the [schema.org](https://schema.org/CreativeWork)
7. `digitalSourceType`: (string, optional) Specify the type of the source. More details see [here](/about/introduction/numbers-protocol/defining-web3-assets/assettree/digitalsourcetype.md).
8. `assetLocationCreated`: (string, optional) precise or broad location where the asset was created.
9. `assetSha256`: (string, optional) SHA-256 hash of the asset file
10. `assetSourceType`: (string, optional) This field specify where the asset comes from
11. `creatorWallet`: (string, optional) the Wallet address of the asset creator
12. `creatorProfile`: (string, optional) The Nid of the creator profile
13. `parentAssetCid`: (string, optional) The Nid of the parent asset
14. `license.name`: (string, optional) License of the asset file
15. `license.document`: (string, optional) URL of the license file
16. `miningPreference.allowed` : (array, optional) Provide options of the allowed mining preferences for data mining or AI/ML training workflow. More details see [here](/about/introduction/numbers-protocol/defining-web3-assets/assettree/miningpreference.md).
17. `miningPreference.notAllowed` : (array, optional) Provide options of the NOT allowed mining preferences for data mining or AI/ML training workflow. More details see [here](/about/introduction/numbers-protocol/defining-web3-assets/assettree/miningpreference.md).
18. `miningPreference.constrained` : (array, optional) Provide options of the allowed mining preferences with constraints for data mining or AI/ML training workflow. More details see [here](/about/introduction/numbers-protocol/defining-web3-assets/assettree/miningpreference.md). If the mining option is shown in the constrained array, the users should follow the license to use the asset properly.
19. `generatedBy` : (string, optional) The AI model used to generate the content.&#x20;
20. `generatedThrough` : (string, optional) URL of the software application or a downloadable link which generates the digital content.
21. `usedBy`: (string, optional) URL of the website that uses the asset
22. `integrityCid`: (string, optional) the Cid/Nid of the additional proof metadata on IPFS
23. `nftRecord`: (string, optional) IPFS Cid where you can find all the NFT records. More details can be found in the [nftRecord page](/about/introduction/numbers-protocol/defining-web3-assets/assettree/nftrecord.md).
24. `displaySocial`: (boolean, optional) Set this to `True` if you want to display the asset on [Asset Profile](/about/developers/read-asset-history/read-commits-with-asset-profile.md) with the social media link instead of the IPFS file URL.&#x20;
25. `socialLink` : (string, optional) Social link to the URL. If `displaySocial` is true, this URL will be used to display the asset on [Asset Profile](/about/developers/read-asset-history/read-commits-with-asset-profile.md).&#x20;
26. `custom`: (JSON, optional) Custom metadata

The [DBDiagram](https://dbdiagram.io/d/6220e69c54f9ad109a54c3a5) describes the relationship between [Commit](/about/introduction/numbers-protocol/defining-web3-assets/commit.md) and [AssetTree](/about/introduction/numbers-protocol/defining-web3-assets/assettree.md) tables. Here is [an example of the AssetTree file](https://bafkreigbl7262jgwykk6ce47gbzvh4udr3rtzkpgd3b465664gzxma6zfi.ipfs.dweb.link/). You may also refer to the [nit open-source project](https://github.com/numbersprotocol/nit) for more examples of how to create AssetTree and Commit.&#x20;

Note:&#x20;

* This specification follows the [EIP-191](https://eips.ethereum.org/EIPS/eip-191) verification method for input: data, signature and output: signer's wallet address.

<figure><img src="https://ipfs-pin.numbersprotocol.io/ipfs/bafkreibzuqq3y55nddugsxqsnkeottguwfucz6a4zkwgfemxklpx4sn4em" alt=""><figcaption><p>Signature and Verification Flows</p></figcaption></figure>
