Reference
JSON-RPC Reference
Canonical method list · Estimated read time: 10 minutes
TL;DR
Asentum exposes a JSON-RPC 2.0 interface deliberately shaped like Ethereum's. Most eth_* read methods work unmodified with ethers.js, viem, web3.js, and MetaMask. Asentum-specific functionality lives under the asentum_* namespace. For signing, you need a Dilithium3-aware client — see Ethereum Compatibility.
Endpoint
- HTTP —
https://testnet.asentum.com(POST JSON-RPC 2.0 bodies) - WebSocket —
wss://testnet.asentum.com/ws - Chain ID —
1337(testnet default — fetch live viaeth_chainId)
CORS is open on the testnet for all origins. Rate limits are applied per IP on the hosted RPC; self-hosted nodes don't enforce them.
eth_* methods
The following Ethereum-compatible methods are supported:
| Method | Purpose |
|---|---|
| eth_chainId | Returns the chain id. |
| eth_blockNumber | Latest block height. |
| eth_getBalance | Balance of an address at a given block. |
| eth_getTransactionCount | Nonce of an address. |
| eth_getCode | Deployed contract source at an address. |
| eth_getStorageAt | Reads a storage slot on a contract. |
| eth_getBlockByNumber | Block + transactions by height. |
| eth_getBlockByHash | Block + transactions by hash. |
| eth_getTransactionByHash | Transaction body by hash. |
| eth_getTransactionReceipt | Receipt (status, gas used, events). |
| eth_getLogs | Event log filter — indexed topics + block range. |
| eth_call | Read-only contract call (no tx, no gas). |
| eth_estimateGas | Estimate gas for a transaction. |
| eth_gasPrice | Current legacy gas price (equal to base fee). |
| eth_feeHistory | Base-fee + priority-fee history for EIP-1559. |
| eth_sendRawTransaction | Submit a signed transaction. |
| net_version | Chain id as a decimal string. |
| web3_clientVersion | Node software + version string. |
eth_getCode returns the contract source, not bytecode — contracts on Asentum are plain JavaScript. See Smart Contracts for the why.
asentum_* methods
First-party methods that don't have an Ethereum equivalent:
| Method | Purpose |
|---|---|
| asentum_getContractSource | Raw JavaScript source of a deployed contract. |
| asentum_getContractHash | BLAKE3 hash of the contract source for verification. |
| asentum_getValidators | Active + pending validator set with stake and status. |
| asentum_getProposals | All on-chain governance proposals with state. |
| asentum_getProposal | Detail for a single proposal. |
| asentum_getApprovedLibraries | Governance-approved VM library index. |
| asentum_viewCall | Pure view call with named args (no gas, no tx). |
| asentum_faucet | Request test ASE (testnet only). |
WebSocket subscriptions
Over WebSocket, eth_subscribe supports the standard topics:
newHeads— new finalized block headerslogs— event logs matching a filternewPendingTransactions— mempool entries
Because consensus is BFT, newHeads never emits a block that later reorgs — finality is immediate.
Error codes
Asentum follows JSON-RPC 2.0 standard error codes plus a few protocol-specific ones:
-32700Parse error-32600Invalid request-32601Method not found-32602Invalid params-32000Generic server error (insufficient balance, nonce mismatch, etc.)-32010Contract execution reverted (message contains the reason)
Examples
Get the latest block height:
curl -X POST https://testnet.asentum.com \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'Read a contract (view call):
curl -X POST https://testnet.asentum.com \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc":"2.0","id":1,
"method":"asentum_viewCall",
"params":[{"to":"0x...","method":"balanceOf","args":["0x..."]}]
}'For a typed, higher-level interface see the SDK API Reference.
Read next