JSON-RPC

Armchain exposes a standard Ethereum-compatible JSON-RPC API over HTTP and WebSocket. If you've used Ethereum's JSON-RPC before, everything works the same way: same method names, same parameters, same response format.

Endpoint

HTTP:      http://localhost:18545   (or https://www.armchain.org/devnet for devnet)
WebSocket: ws://localhost:18546     (or wss://www.armchain.org/devnet for devnet)

Request Format

curl -X POST <RPC_URL> \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "<METHOD>",
    "params": [<PARAMS>],
    "id": 1
  }'

eth Namespace

eth_blockNumber

Returns the latest block number.

Response:


eth_getBalance

Returns the balance of an address in wei.

Parameters:

  1. address: 20-byte address

  2. blockTag: Block number or "latest", "earliest", "pending"

Response:


eth_getTransactionCount

Returns the number of transactions sent from an address (nonce).

Parameters:

  1. address: 20-byte address

  2. blockTag: Block number or tag


eth_sendRawTransaction

Submits a signed transaction for broadcast.

Parameters:

  1. data: Signed transaction data (hex). Must be a Type 3 PQC transaction.

Response:


eth_call

Executes a call without creating a transaction (read-only).

Parameters:

  1. transaction: Transaction call object

  2. blockTag: Block number or tag


eth_estimateGas

Estimates gas for a transaction.

Parameters:

  1. transaction: Transaction call object


eth_getBlockByNumber

Returns block information by block number.

Parameters:

  1. blockNumber: Block number (hex) or tag

  2. fullTransactions: If true, returns full transaction objects


eth_getTransactionByHash

Returns transaction details by hash.

Parameters:

  1. transactionHash: 32-byte transaction hash

Response (Type 3 PQC Transaction):


eth_getTransactionReceipt

Returns the receipt of a mined transaction.

Parameters:

  1. transactionHash: 32-byte transaction hash


eth_getLogs

Returns logs matching a filter.

Parameters:

  1. filter: Filter object with fromBlock, toBlock, address, topics


eth_chainId

Returns the chain ID.

Response:


eth_gasPrice

Returns the current gas price.


eth_getCode

Returns the code at a given address (for contracts).

Parameters:

  1. address: Contract address

  2. blockTag: Block number or tag


Other Standard Methods

Method
Description

eth_accounts

Returns list of owned addresses

eth_sign

Signs data with account key

eth_signTransaction

Signs a transaction without sending

eth_getBlockByHash

Get block by hash

eth_getTransactionByBlockHashAndIndex

Get tx by block hash and index

eth_getTransactionByBlockNumberAndIndex

Get tx by block number and index

eth_getStorageAt

Get storage value at position

eth_syncing

Returns sync status

eth_mining

Returns whether node is mining/validating

eth_coinbase

Returns validator address


net Namespace

Method
Description

net_version

Returns network ID

net_listening

Whether node is listening for connections

net_peerCount

Number of connected peers


web3 Namespace

Method
Description

web3_clientVersion

Returns client version string

web3_sha3

Returns Keccak-256 of input


txpool Namespace

Method
Description

txpool_status

Returns pending and queued tx counts

txpool_content

Returns all pending and queued txs

txpool_inspect

Returns textual summary of pool


personal Namespace

Warning: Only use on local/private nodes. Never expose on public endpoints.

Method
Description

personal_newAccount

Create a new account

personal_unlockAccount

Unlock an account for signing

personal_lockAccount

Lock an account

personal_listAccounts

List all accounts

personal_sendTransaction

Sign and send a transaction


admin Namespace

Method
Description

admin_nodeInfo

Returns node information

admin_peers

Returns connected peers

admin_addPeer

Add a peer by enode URL

admin_removePeer

Remove a peer

admin_datadir

Returns the data directory path


WebSocket Subscriptions

Subscribe to New Blocks

Subscribe to Logs

Subscribe to Pending Transactions

Unsubscribe


Rate Limits

Public RPC endpoints may enforce rate limits.

Further Reading

Last updated