MultiversX Namespace - Chains

Author MultiversX Team
Discussions-To https://github.com/ChainAgnostic/namespaces/issues/89
Status Draft
Type Standard
Created 2023-09-11
Requires CAIP-2

CAIP-2

For context, see the CAIP-2 specification.

Abstract

In CAIP-2 a general blockchain identification scheme is defined. This is the implementation of CAIP-2 for the MultiversX network.

MultiversX Namespace

The namespace mvx refers to the wider MultiversX ecosystem.

Rationale

MultiversX consists of multiple networks: a production network (Mainnet), a development testing network (Devnet) and a testing network (Testnet). More may be canonically addressed in the future.

Syntax

An identifier for an MultiversX chain consists of the namespace prefix “mvx:” followed by the chain’s chainId.

Reference Definition

The reference to the MultiversX chain is identical the MultiversX community’s native one-character representation for each chain: 1 for Mainnet, D for Devnet, or T for Testnet

Resolution Method

To resolve a blockchain reference for the MultiversX namespace, you can query the network/config endpoint on either the lower level layer or the public higher level layer that uses the gateway level underneath.

// Request
curl -X GET "https://api.multiversx.com/network/config" -H "accept: application/json"

// Response (formatted)
{
  "data": {
    "config": {
      "erd_chain_id": "1",
     // ... other fields
    }
  },
  "code": "successful"
}

The response will return a JSON object which will include the network configuration information and the erd_chain_id defined above can be retrieved from the config property of the response object. This can be used directly as the reference section of a CAIP-2 or CAIP-10.

Backwards Compatibility

Not applicable.

Test Cases

This is a list of manually composed examples

# MultiversX Mainnet
mvx:1

# MultiversX Devnet
mvx:D

# MultiversX Testnet
mvx:T

References

Rights

Copyright and related rights waived via CC0.

Citation

Please cite this document as:

MultiversX Team, "namespaces/mvx-caip2: MultiversX Namespace - Chains [DRAFT]," Chain Agnostic Namespaces, mvx-caip2, September 2023 / . [Online serial]. Available: https://github.com/ChainAgnostic/namespaces/mvx-caip2.md