API

The node’s JSON-RPC 2.0 API: methods, parameters, errors and limits.

Introduction

The Parmeton node exposes a JSON-RPC 2.0 API over HTTP. Each request is a POST with a JSON body; the response contains either result or error.

API verified in node 0.2.52 RC2. Eleven read methods are implemented on a single HTTP route, POST /. There is no separate REST route yet.

Examplecurl
curl -s http://127.0.0.1:19201/ \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"node.getStatus"}'

Run this example on the node or through a private tunnel. The public site only publishes a JSON snapshot from the seed.

Conventions

Field namesState responses (node, dag, network, mining) use camelCase. The parameters and coins of wallet and utxo use snake_case.
AmountsAmounts are strings of digits expressed in atoms. The nativeDecimals field gives the number of decimals of PMN.
32-byte identifiersIn parameters, an identifier (network, public key, transaction) is written as an array of 32 integers between 0 and 255. State responses return hexadecimal strings instead. This format matches the current node version and may change when the API is secured.

Methods

economics.getInfo

Monetary policy and the node’s emission and burn counters.

Parameters
Aucun.
Result
Schema PMN_ECONOMICS_V4. The fields nativeExistingAtoms, calendarMintedAtoms, tailMintedAtoms, burnedAtoms and baseFeeAtoms are expressed in atoms. The burn includes network fees and tax. Annual metrics require a historical index.

node.getStatus

General node state: version, network, uptime, persistent state, network activity, mining and money supply.

Parameters
None. Omit params, or send null, [] or {}.
Result
Object: softwareVersion, environment, networkId, genesisId, stateRoot, uptimeMs, blockCount, peerCount, syncIdle, protocolVersion, blockVersion, p2pVersion, miningMode, miningPhase, mintedSupplyAtoms, nativeDecimals, journal counters and process resources. proofPipeline exposes the latency of the replay workers. The node’s admission times are available through network.getInfo.

dag.getInfo

State of the block graph.

Parameters
None. Omit params, or send null, [] or {}.
Result
Object: blockCount, tipCount, tips, tipsTruncated, selectedParent, virtualDaaScore, finalizedBlock, finalizedDaaScore. The tips list is limited to 64 entries.

network.getInfo

Network counters: peers, orphan blocks, pending transactions, history synchronisation.

Parameters
None. Omit params, or send null, [] or {}.
Result
Object: peerCount, orphanBlocks, mempoolTransactions, mempoolBytes, outstandingRequests, historyPagesReceived, pendingBlockCandidates, futureBlocks, controlOverflows, transactionDrops…

network.getPeers

The node’s peer mesh.

Parameters
None. Omit params, or send null, [] or {}.
Result
Object with schema PMN_PEER_MESH_V1. If the mesh is disabled: enabled: false, with networkId and genesisId.

mining.getInfo

Mining counters: block templates issued, submissions, blocks accepted and rejected by cause.

Parameters
None. Omit params, or send null, [] or {}.
Result
Object: generation, daaScore, difficultyTarget, templatesIssued, submissions, accepted, staleRejected, pomCheapRejected, stateRejected…

mining.getCapabilities

Capabilities declared by the miner.

Parameters
None. Omit params, or send null, [] or {}.
Result
The node verifies the signature of the declaration. The information about the GPU, the memory and the model remains declarative. The hardwareVerified field is false.

mining.getDiagnostics

Detailed miner diagnostics.

Parameters
None. Omit params, or send null, [] or {}.
Result
Diagnostics object for the proof and validation pipeline, or null if unavailable. This method is for technical monitoring of the miner, not for submitting blocks.

wallet.getBalance

Total balance of one or more public keys, immature outputs included.

Parameters
network_id: network identifier.
public_keys: 1 to 64 valid, distinct ed25519 keys.
include_maturity: boolean, false by default.
snapshot_request: 32-byte identifier, null by default.
Result
Object with schema PMN_WALLET_BALANCE_V1: totalAtoms (string), utxoCount, stateRoot, daaScore, nativeDecimals, maturitySnapshot (or null).
Errors
-32602 if a parameter is invalid; -32007 if the state is unreadable.

wallet.getCoins

List of the unspent coins of the requested keys, with a locked and unlocked summary.

Parameters
Same as wallet.getBalance.
Result
Coin snapshot: txid, output_index, amount_atoms, public_key, lock_daa_score, with a summary. The V4 schema includes origin and created_daa_score to establish the provenance and age of the output. With the optional coin index of 0.2.52, every read checks that the totals match the state tree; any discrepancy returns -32007.
Errors
-32005 if the snapshot is being prepared: retry the same request. -32007 if the computation fails or exceeds its budget.

utxo.get

Reads unspent outputs from their outpoint.

Parameters
network_id: network identifier.
outpoints: 1 to 64 distinct { txid, output_index } objects.
Result
Object with schema PMN_WALLET_COINS_V4_9: coins, state_root, daa_score.
Errors
-32004 if an output does not exist or is already spent; -32602 if a parameter is invalid.

Error codes

CodeMessageMeaning
-32700parse errorThe body is not valid JSON.
-32600invalid requestMalformed or oversized request, version ≠ 2.0, invalid identifier or method.
-32601method not foundThe method does not exist.
-32602invalid paramsMissing, malformed, duplicate or out-of-range parameters.
-32000internal errorInternal node error.
-32004unspent output not foundThe requested output does not exist or has been spent.
-32005wallet snapshot pendingThe snapshot is being prepared: retry.
-32007state read failedThe state could not be read, or the snapshot failed.

Limits

The exposed surface is strictly read-only: no method signs a transaction, broadcasts a transaction or submits a block. The current API also provides no general historical lookup by height, address or block identifier.

Request16 KiB maximum
Response64 KiB maximum
Timeout2 seconds per request
id identifiernumber, or string of 64 bytes at most
Method name64 bytes at most
Connections16 simultaneous

Try it

The response will appear here.