DOCUMENTATION

Getting Started

Connect EVM tooling to Onyx Mainnet safely.

Documentation

Onyx Mainnet accepts signed EVM transactions through JSON-RPC on Chain ID 327.

javascript

import { JsonRpcProvider } from "ethers";

const provider = new JsonRpcProvider("https://rpc.onyx.org", 327);
const network = await provider.getNetwork();

if (network.chainId !== 327n) throw new Error("Wrong network");
console.log(await provider.getBlockNumber());

Mainnet endpoints

ServiceURL
JSON-RPChttps://rpc.onyx.org
Explorerhttps://onyxscan.org
Markets and OpenAPIhttps://markets.onyx.org

End users can also add Onyx with one click from Onyx Scan (bottom-left Add Onyx Network button). See Quick Start.

Add Onyx programmatically

For wallet dApps and browser providers, request the chain with EIP-3085:

javascript

await window.ethereum.request({
  method: "wallet_addEthereumChain",
  params: [{
    chainId: "0x147",
    chainName: "Onyx Mainnet",
    nativeCurrency: { name: "XCN", symbol: "XCN", decimals: 18 },
    rpcUrls: ["https://rpc.onyx.org"],
    blockExplorerUrls: ["https://onyxscan.org"]
  }]
});

Verify the network before signing:

bash

curl -sS https://rpc.onyx.org \
  -H 'content-type: application/json' \
  --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'

The result must be 0x147 (decimal 327).

Before sending value

  1. Verify eth_chainId returns 0x147.
  2. Use eth_estimateGas for every transaction, especially transfers to unused addresses.
  3. Use the gas price returned by the RPC. See Network Fees for the current snapshot, calculation, and USD denomination.
  4. Keep native XCN values aligned to the ledger's 8-decimal precision.
  5. Wait for a successful transaction receipt and reconcile balances through an independent read path.

Onyx supports the commonly used EVM read, transaction, contract-call, log, and subscription methods documented in EVM JSON-RPC. It does not claim complete parity with every Ethereum client extension.