Armchain API

Beyond the standard Ethereum JSON-RPC methods, Armchain provides additional API namespaces for querying DAG data, epoch information, and validator state. These are useful when you need to interact with Armchain's consensus layer directly.

arm Namespace

The arm namespace provides Armchain-specific methods. These are available when arm is enabled in --http.api.

arm_getBalance

Returns the balance at a given address (alias for eth_getBalance).

curl -X POST http://localhost:4000 -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"arm_getBalance","params":["0xADDRESS","latest"],"id":1}'

arm_getTransactionCount

Returns the transaction count (nonce) for an address.

curl -X POST http://localhost:4000 -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"arm_getTransactionCount","params":["0xADDRESS","latest"],"id":1}'

arm_sendTransaction

Send a transaction (account must be unlocked on the node).

curl -X POST http://localhost:4000 -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0",
    "method":"arm_sendTransaction",
    "params":[{
      "from": "0xFROM",
      "to": "0xTO",
      "value": "0xDE0B6B3A7640000"
    }],
    "id":1
  }'

dag Namespace

The dag namespace provides access to the DAG (Directed Acyclic Graph) data structures that underpin Lachesis consensus.

dag_getEvent

Returns a DAG event by its hash.

Parameters:

  1. eventHash: 32-byte event hash

Response:

dag_getEventsByEpoch

Returns events in a specific epoch.

Parameters:

  1. epoch: Epoch number

dag_getEpochStats

Returns statistics for the current or specified epoch.

Parameters:

  1. epoch: (optional) Epoch number. Defaults to current epoch.

dag_getHeads

Returns the current head events in the DAG (latest events from each validator).


aBFT Information

abft_getValidators

Returns the current validator set.

Response:

abft_getDowntime

Returns downtime information for a validator.

Parameters:

  1. validatorId: Validator ID

abft_getEpoch

Returns the current epoch number.


debug Namespace

debug_traceTransaction

Replays a transaction and returns execution traces.

Parameters:

  1. txHash: Transaction hash

  2. options: (optional) Tracing options

debug_traceCall

Traces a call without executing it on-chain.


Transaction Object Fields (Type 3)

When querying Type 3 PQC transactions, the response includes these fields:

Field
Type
Description

type

string

"0x3" - PQC transaction type

hash

string

Transaction hash

from

string

Sender address (derived from ML-DSA44 public key)

to

string

Recipient address (or null for contract creation)

value

string

Transfer value in wei

nonce

string

Sender nonce

gas / gasLimit

string

Gas limit

maxFeePerGas

string

Maximum total fee per gas

maxPriorityFeePerGas

string

Priority fee per gas

input / data

string

Transaction input data

chainId

string

Chain ID

blockNumber

string

Block number (when mined)

blockHash

string

Block hash (when mined)

transactionIndex

string

Index in block

Note: Type 3 transactions do not have v, r, s fields. Signature data is in the signatureBlob field.


Enabling API Namespaces

Security: Only enable personal, admin, and debug on trusted/local networks.

Further Reading

Last updated