URI Argument / Base Token URI

In general, NFT/MultiToken module templates constructors take several arguments and one of them is called URI. URI stands for Universal Resource Identifier. The role of this argument is to provide the base for your endpoint metadataarrow-up-right. Metadataarrow-up-right represents the information of your NFT/MultiToken, this information holds data like name, current owner, previous owner, etc..., but one of the most important attributes is the picture/image of the NFT/MultiToken. Based on the meaning of the Universal Resource Identifier, this resource (metadataarrow-up-right) is unique per every token based on its token id. URI Example: https://my-metadata-server/api/

The example from above represents an example of the value that the URI argument should take. Based on that example, if we want to retrieve metadataarrow-up-right associated with token id 1 the endpoint will look like this:

https://my-metadata-server/api/1

Based on the current EIPs for metadata this endpoint should return a JSON-object, following you can see the example below for a compatible JSON schema.

{
    "title": "Token Metadata",
    "type": "object",
    "properties": {
        "name": {
            "type": "string",
            "description": "Identifies the asset to which this token represents"
        },
        "decimals": {
            "type": "integer",
            "description": "The number of decimal places that the token amount should display - e.g. 18, means to divide the token amount by 1000000000000000000 to get its user representation."
        },
        "description": {
            "type": "string",
            "description": "Describes the asset to which this token represents"
        },
        "image": {
            "type": "string",
            "description": "A URI pointing to a resource with mime-type image/* representing the asset to which this token represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
        }
    }
}

For any questions or feedback you may have, please feel free to contact us on Bunzz Discord Serverarrow-up-right.

Last updated