Asentum

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

  • HTTPhttps://testnet.asentum.com (POST JSON-RPC 2.0 bodies)
  • WebSocketwss://testnet.asentum.com/ws
  • Chain ID1337 (testnet default — fetch live via eth_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:

MethodPurpose
eth_chainIdReturns the chain id.
eth_blockNumberLatest block height.
eth_getBalanceBalance of an address at a given block.
eth_getTransactionCountNonce of an address.
eth_getCodeDeployed contract source at an address.
eth_getStorageAtReads a storage slot on a contract.
eth_getBlockByNumberBlock + transactions by height.
eth_getBlockByHashBlock + transactions by hash.
eth_getTransactionByHashTransaction body by hash.
eth_getTransactionReceiptReceipt (status, gas used, events).
eth_getLogsEvent log filter — indexed topics + block range.
eth_callRead-only contract call (no tx, no gas).
eth_estimateGasEstimate gas for a transaction.
eth_gasPriceCurrent legacy gas price (equal to base fee).
eth_feeHistoryBase-fee + priority-fee history for EIP-1559.
eth_sendRawTransactionSubmit a signed transaction.
net_versionChain id as a decimal string.
web3_clientVersionNode 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:

MethodPurpose
asentum_getContractSourceRaw JavaScript source of a deployed contract.
asentum_getContractHashBLAKE3 hash of the contract source for verification.
asentum_getValidatorsActive + pending validator set with stake and status.
asentum_getProposalsAll on-chain governance proposals with state.
asentum_getProposalDetail for a single proposal.
asentum_getApprovedLibrariesGovernance-approved VM library index.
asentum_viewCallPure view call with named args (no gas, no tx).
asentum_faucetRequest test ASE (testnet only).

WebSocket subscriptions

Over WebSocket, eth_subscribe supports the standard topics:

  • newHeads — new finalized block headers
  • logs — event logs matching a filter
  • newPendingTransactions — 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:

  • -32700 Parse error
  • -32600 Invalid request
  • -32601 Method not found
  • -32602 Invalid params
  • -32000 Generic server error (insufficient balance, nonce mismatch, etc.)
  • -32010 Contract 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