Tokens

* is a required field

Make sure to use your X-Auth-Token when making a POST request. Your X-Auth-Token is the private key associated to your ERC-20 wallet.

It is strongly not recommended to use Mint/Clone/Burn in any game as it can cause uncontrolled access to your studio wallet and expose the private key. Mint/Clone/Burn should be done via the Vessel dashboard.

Create Tokens

Create new tokens

Create new tokens multipart

create vs create-multipart

You need to upload the image somewhere and post the URL when you use /tokens/manage/create API. Once it is created, we store image data in our DB.

On the other hand, you can post the image binary directly to us if you use /tokens/manage/create-multipart API.

Mint/Clone/Burn Tokens

Mint tokens

You can create new tokens specified by fqTn and give it to the user wallet.

Clone tokens

You can clone and create new tokens from a parent token specified by fqTn. Cloned tokens have different fqTn from the parent token.

Burn tokens

You can consume tokens. Consumed tokens will be removed from the user wallet.

Burn to Mint tokens

You can consume tokens and create new tokens.

Mint vs Clone

There are two APIs for creating and giving a new token to a user, Mint and Clone.

If you use Mint API, the token created has the identical fqTn as the original one. If you Mint com.studio.sword.greatsword, the user will get com.studio.sword.greatsword in the wallet. On the other hand, If you Clone com.studio.sword.greatsword , a new token com.studio.sword.greatsword:1 is created and added to the user wallet. In short, Clone API will create a variation of the original token.

Here's the side-by-side comparison for both APIs.

MintClone

fqTn

identical

:N is appended

Display Name

identical

#N is appended

Description

identical

identical

Immutable Properties

identical

identical

Mutable Properties

identical

new values can be set

If you just need to give a specific item to a user and all those items share the same properties in your app, our Mint API is recommended. If each token has different mutable parameter that can be changed in the gameplay (e.g. level) , you need to use Clone API.

Token Details

List game tokens

List collection tokens

Token Object

NameTypeDescription

displayName

string

Display name of the token

fqTn

string

Fully qualified token name

totalSupply

number

Total number of minted tokens

Token Details Object

NameTypeDescription

displayName

string

Display name of the token

description

string

Token description

imageUrl

string

URL that points to the token image

fqTn

string

Fully qualified token name

collectionAddress

string

Blockchain address of the collection this token belongs to

totalSupply

number

Total number of minted tokens

properties

object

An object that contains the token’s immutable properties

mutableProperties

object

An object that contains the token’s mutable properties

createdAt

number

Unix timestamp of the token’s creation time

Token Metadata

Update metadata

Update metadata multipart

Update a single mutable property

Update multiple mutable properties

Mutable Properties

Minted tokens can have multiple mutable properties. These properties persist outside of Vessel’s blockchain.

The properties object maps property keys to their values. For example:

{
    "favorite_weapon": {
        "displayName": "Favorite Weapon",
        "value": "Club"
    }
}

In this example, favorite_weapon is the property key which maps to its current value along with the display name.

Transfer Tokens

Transfer tokens between players and studio

There's rate limit for API calls and it's 5,000/hour. If you want to increase the threshold, please reach out to your Vessel account manager.

Once you hit the rate limit, API returns http response code 429. In that case, you can retry to call the API after several minutes.

Last updated