Skip to main content

system_chain - JSON-RPC Method

Description#

Returns the human-readable name of the Enjin Matrix network that the node is connected to. Use this method in smoke tests and connection validators to make sure your client is talking to Matrix mainnet or the correct canary network before sending transactions.

Parameters#

This method does not require any parameters.

Returns#

FieldTypeDescription
resultstringName of the connected chain

Request Example#

{
"jsonrpc": "2.0",
"method": "system_chain",
"params": [],
"id": 1
}

Response Example#

{
"jsonrpc": "2.0",
"result": "Enjin Matrixchain",
"id": 1
}

Code Examples#

curl https://api-enjin-matrixchain.n.dwellir.com/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "system_chain",
"params": [],
"id": 1
}'

Use Cases#

  • Safety checks – verify that production services are still pinned to Matrix mainnet after configuration changes.
  • Multi-network tooling – dynamically load type bundles or custom RPC definitions per chain name.
  • Monitoring – alert if a node begins reporting an unexpected chain identifier.