Developers

Overview

It is easy for any game or application built using Enjin Blockchain to access a wallet's owned names. This page will go over the steps to read out Multiverse Name Service tokens so that they can be used in your game.

Name Token Attributes

Naming tokens have the following properties in them which can be read from the block chain...

Property
Description

Name

The name that this token represents. This should be the name the game or application uses for this user.

Created Date

The date this token was first created. (linux format)

Version

Currently always set 1.

Reading Names from the Blockchain

Enjin provides the Enjin Platformarrow-up-right which enables using GraphQL to easily query blockchain state. You can use these queries to easily read Multiverse Name Service tokens which indicate the names a wallet has registered. All name tokens are in collection id 2090. So, you can use the following query to read them...

query GetWallet {
  GetWallet(account: "efPetN9bRqsaNNUs7YomL26umjhXBUtP7jDKoQoP6MP8eX2W8") {
    id
    account {
      publicKey
      address
    }
    tokenAccounts(collectionIds: 2090) {
      edges {
        node {
          balance
          token {
            tokenId
            attributes {
              key
              value
            }
          }
        }
      }
    }
  }
}

This call will give the following response...

Using this response, you can easily parse out the name tokens. The only critical attribute is the name and the rest of the attributes can generally be ignored.

Collaboration

We are always looking for collaborations with other blockchain developers. Please reach out to us if you have any proposals. Also, if you have implemented Multiverse Name Service into your game or app then let us know so that we can feature you on our page!

Last updated