For the complete documentation index, see llms.txt. This page is also available as Markdown.

Getting Started

Connect EVM tooling to Onyx Mainnet safely.

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

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

Service
URL

JSON-RPC

https://rpc.onyx.org

Markets and OpenAPI

https://markets.onyx.org

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

Add Onyx programmatically

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

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://explorer.onyx.org"]
  }]
});

Verify the network before signing:

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.

  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.

Last updated