trac-peer RPC API v1
Status summary for the running peer and its embedded MSB client view.
Useful for UIs to display:
peer identity (pubKeyHex, writerKeyHex, msbAddress)
subnet info (bootstrap/channel, signed/unsigned lengths)
MSB view (bootstrapHex, networkId, signedLength)
OK
Error
GET /v1/status HTTP/1.1
Host: 127.0.0.1:5001
Accept: */*
{
"peer": {
"pubKeyHex": "text",
"writerKeyHex": "text",
"msbAddress": "text",
"baseWritable": true,
"isIndexer": true,
"isWriter": true,
"subnetBootstrapHex": "text",
"subnetChannelUtf8": "text",
"subnetSignedLength": 1,
"subnetUnsignedLength": 1,
"admin": "text",
"chatStatus": "on",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"msb": {
"ready": true,
"bootstrapHex": "text",
"networkId": 1,
"signedLength": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}ABI-like discovery document for wallets/dApps.
Includes:
supported contract transaction types (
contract.txTypes)per-op input schema hints (
contract.ops)protocol API method schema (
api.methods)
OK
Error
GET /v1/contract/schema HTTP/1.1
Host: 127.0.0.1:5001
Accept: */*
{
"schemaVersion": 1,
"schemaFormat": "json-schema",
"contract": {
"contractClass": "text",
"protocolClass": "text",
"txTypes": [
"text"
],
"ops": {
"ANY_ADDITIONAL_PROPERTY": {
"key": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"value": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"ANY_ADDITIONAL_PROPERTY": "anything"
}
},
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"api": {
"methods": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Generates a nonce used in the wallet signing payload.
OK
32-byte hex string (64 hex chars)
^[0-9a-fA-F]{64}$Error
GET /v1/contract/nonce HTTP/1.1
Host: 127.0.0.1:5001
Accept: */*
{
"nonce": "text"
}Returns the MSB tx context required for wallets to compute the contract tx hash.
The wallet typically signs a payload derived from:
{ prepared_command, nonce, context }
OK
Error
GET /v1/contract/tx/context HTTP/1.1
Host: 127.0.0.1:5001
Accept: */*
{
"msb": {
"networkId": 1,
"txv": "text",
"iw": "text",
"bs": "text",
"mbs": "text",
"operationType": 1
}
}Submits a wallet-signed contract transaction.
Notes:
Tx submission is opt-in; operators must start the peer with
--api-tx-exposed.Use
sim=truefirst (preflight) and only broadcast (sim=false) if simulation succeeds.
32-byte hex string (64 hex chars)
^[0-9a-fA-F]{64}$32-byte hex string (64 hex chars)
^[0-9a-fA-F]{64}$64-byte hex string (128 hex chars)
^[0-9a-fA-F]{128}$32-byte hex string (64 hex chars)
^[0-9a-fA-F]{64}$falseOK
Error
Error
Error
POST /v1/contract/tx HTTP/1.1
Host: 127.0.0.1:5001
Content-Type: application/json
Accept: */*
Content-Length: 161
{
"tx": "text",
"prepared_command": {
"type": "text",
"value": null,
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"address": "text",
"signature": "text",
"nonce": "text",
"sim": false
}{
"result": null,
"ANY_ADDITIONAL_PROPERTY": "anything"
}Reads one key from subnet state.
confirmed=truereads from the subnet signed view (final snapshots).confirmed=falsereads from the latest local view (fast UI updates).
Exact Hyperbee key
If true, reads from signed view; if false, reads from latest (unsigned) view
trueOK
Error
Error
GET /v1/state?key=text HTTP/1.1
Host: 127.0.0.1:5001
Accept: */*
{
"key": "text",
"confirmed": true,
"value": null
}Last updated