Assets + Collections

Assets are distinct objects that are owned by users. In games, assets can be used for things like characters, cosmetics, weapons, or any other distinct, ownable content. In other apps, assets could be used to represent ownable goods such as tickets, coupons, or even goods in a supply chain. Assets differ from currencies in that individual units are not interchangeable.

Assets are grouped by collections. Each asset within a collection has a distinct serial number. Serial numbers start at #0 and are determined by the order in which the assets were minted. Minting is the process of creating new assets from a collection.

In addition to a serial number, assets have properties and expression values. Properties are editable key-value pairs organized as a JSON object. These can be used to track the static qualities of an asset, such as a character's name. They can also track dynamic qualities that change over time, such as a character's XP level.

Expression values are the files associated with a particular asset. These are used to represent the asset in games and other apps. For more information on expressions, check out Expressions.

Collections belong to slots. The expressions available to assets depend on the slot to which the collection an asset is a part of belongs. Collections can be identical or unique. Assets in an identical collection all share the same expression values. Assets in a unique collection can have different expression values from one another.

Collection Data Model

  • collectionId: a UUID for the collection

  • collectionName: a name for the collection

  • collectionImage: a url to a 300x300 image for the collection

  • collectionBanner: a url to an image used to represent the collection in the marketplace

  • description: a text description of the collection

  • creator: the userId and handle of the user that created the collection

  • slotId: the slot to which the collection belongs

  • maximum: the maximum number of assets that can be minted as a part of this collection

  • minted: the number of assets that have been minted from this collection

  • tags: array of strings used to add context to the collection

  • royaltyRecipient: the userId and Handle of the user that receives the creator royalties

  • type: "Identical" or "Unique". Assets in an identical collection all contain the same expression values. Assets in a unique collection can contain different expression values from one another. See Expressions for more details

  • properties: editable key-value pairs which can be used to add data to a collection. Collection properties are editable by the app which owns the slot to which the collection belongs.

  • status: shows whether the collection is active or inactive. Inactive collections and their assets won't show up in normal API requests

  • createdAt: date-time when the collection was created

  • updatedAt: date-time when the collection was last updated

  • exampleExpressionValues: expression values from asset #0 from the collection. See Expressions for more details.

Example Collection Data

"collectionId": "64be8a60616a24971532d172",
"collectionName": "Test Collection",
"collectionImage": "https://asset-api-files-bucket.s3.amazonaws.com/ba7080b5-daad-4417-9078-6abda7bbb38d.png",
"collectionBanner": "https://asset-api-files-bucket.s3.amazonaws.com/03299129-a726-44a6-8bf5-b62e882d7e1c.png",
"description": "test description",
"creator": {
    "userId": "64be7cb18c37609ec45870c4",
    "handle": "gmadd"
},
"slotId": "64be86d9c336136e7e5c0c7a",
"maximum": 100,
"minted": 0,
"tags": [
    "gmadd"
],
"royaltyRecipient": {
    "userId": "64be7cb18c37609ec45870c4",
    "handle": "gmadd"
},
"type": "Identical",
"properties": {
    "64be837307889caa976fb8ec": {
        "prop1": 1,
        "prop2": {
            "val1": 1,
            "val2": 2
        }
    }
},
"status": "active",
"createdAt": 1690208864369,
"updatedAt": 1690320290728,
"exampleExpressionValues": [
    {
        "value": "https://asset-api-files-bucket.s3.amazonaws.com/f23cf053-5d1e-474b-99d0-90356366b6e9.png",
        "expressionValueId": "64bec88d1ea2f02ec1fbaeac",
        "expressionAttribute": {
            "expressionAttributeName": "Image",
            "expressionAttributeId": "62f83b2482081d6f89953fa7"
        },
        "expression": {
            "expressionName": "Menu View",
            "expressionId": "64be86d9c336136e7e5c0c7d"
        }
    }
]

Asset Data Model

  • assetId: a UUID for the asset

  • serial: the serial number for the asset based on the minting order

  • collectionId: the collection to which the asset belongs

  • collectionName: the name of the collection to which the asset belongs

  • user: the user who owns the asset

  • createdAt: date-time at which the Asset/NFT was created

  • updatedAt: date-time at which the Asset/NFT was last updated

  • properties: editable key-value pairs used to store data about an individual asset organized by app. Each app with access to an asset can create and edit its own properties.

  • expressionValues: the expression values for the asset (see Expressions for details)

Example Data

"asset": "14c2cd7cba4d2f87120c1eb4a25e3ea8",
"serial": 28,
"collectionId": "636fbbdd035f0a9460c44d37",
"collectionName": "Test Collection",
"user": {
    "userId": "64b6d05a7237eae6778ac8f6",
    "handle": "assetlayermarket"
 },
"createdAt": 1668450219949,
"updatedAt": 1668450219949,
"properties": {
  "636e9af9318fdb5bb604a365": {
    "test": 8
  }
},
"expressionValues": [
  {
    "value": "https://asset-api-files-bucket.s3.amazonaws.com/fbe269d5-e1fe-4cb8-8fa1-6cb95772e338.png",
    "expressionValueId": "636fc1062093334365821195",
    "expressionAttribute": {
      "expressionAttributeName": "Image",
      "expressionAttributeId": "62f83b2482081d6f89953fa7"
    },
    "expression": {
      "expressionName": "Test Expression",
      "expressionId": "636fc091035f0a2f52c44fb1"
    }
  }
]

Equipping Assets

Assets can be equipped to other assets to communicate relationships between assets. When one asset is equipped to another, the equipped asset is the child. It is equipped to the parent asset.

Equip Data Model

  • equipId: a UUID for the equip

  • slotId: the slotId for the slot that this equip corresponds to (optional)

  • assetIdParent: the assetId for the asset in the "parent" side of the equip

  • assetIdChild: the assetId for the asset in the "child" side of the equip

Example Equip Data

"equipId": "63d28e77db63fcbd0ac4bff9",
"slotId": "63285c965a72975ff4f3a884",
"assetIdParent": "6c3e3d93227fd44c7d3db0cd5c4001cd",
"assetIdChild": "6c3e3d93227fd44c7d3db0cd5c4001cd"

Last updated