Documentation

JSON-RPC API

The remote procedure call interface exposed by VirBiCoin nodes.

VirBiCoin nodes expose a JSON-RPC 2.0 interface that lets applications read chain state and submit transactions. The same set of methods is available over three transports — IPC, HTTP and WebSocket. For how to enable and secure each transport on the gvbc client, see the JSON-RPC Server page in the Gvbc wiki.

Network parameters

ParameterValue
Chain ID329
Network ID329
Default HTTP endpointhttp://127.0.0.1:8329
Default WebSocket endpointws://127.0.0.1:8330
Native currencyVBC (18 decimals)

Request format

Every request is a JSON object with four fields: jsonrpc (always "2.0"), method, params and an id chosen by the caller.

curl -X POST -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
  http://127.0.0.1:8329

The response echoes the request id and carries either a result or an error:

{ "jsonrpc": "2.0", "id": 1, "result": "0x4b7" }

Namespaces

Methods are grouped into namespaces by their prefix. The publicly exposed namespaces are:

NamespacePurpose
ethBlocks, transactions, accounts, balances, logs and contract calls
netNetwork/peer information
web3Client version and utility helpers such as hashing

Administrative namespaces (admin, debug, miner, personal, txpool) are available over IPC by default and should only be exposed over HTTP/WS on trusted networks.

Common methods

MethodDescription
eth_blockNumberNumber of the most recent block
eth_getBalanceBalance of an account at a given block
eth_getTransactionByHashLook up a transaction by its hash
eth_sendRawTransactionSubmit a signed transaction to the network
eth_callExecute a read-only contract call without creating a transaction
net_versionCurrent network id (329)
VirBiCoin is EVM-compatible, so the method semantics follow the standard Ethereum JSON-RPC conventions. Existing tooling and libraries can be pointed at a VirBiCoin endpoint by setting the chain/network id to 329.

See also