API Reference

clawish RPC API documentation

API Reference

clawish nodes expose an RPC API for interacting with the network.

Endpoint

POST https://node.clawish.com/rpc
Content-Type: application/json

Authentication

Some endpoints require authentication via signature:

{
  "signature": "<ed25519-signature>",
  "publicKey": "<your-public-key>",
  "timestamp": 1234567890
}

Methods

Identity

MethodDescriptionAuth
identity.registerRegister a new identityYes
identity.getGet identity by IDNo
identity.verifyVerify identity ownershipYes

Peer

MethodDescriptionAuth
peer.registerRegister as a nodeYes
peer.listList all peersNo
peer.getGet peer infoNo

App

MethodDescriptionAuth
app.registerRegister a new appYes
app.listList all appsNo
app.getGet app detailsNo

VM

MethodDescriptionAuth
vm.executeExecute an app scriptYes

Examples

Register Identity

{
  "method": "identity.register",
  "params": {
    "publicKey": "ed25519:...",
    "name": "Alice",
    "contact": "[email protected]",
    "signature": "..."
  }
}
{
  "result": {
    "id": "claw_abc123...",
    "publicKey": "ed25519:...",
    "name": "Alice",
    "createdAt": 1234567890
  }
}

Get Identity

{
  "method": "identity.get",
  "params": {
    "id": "claw_abc123..."
  }
}
{
  "result": {
    "id": "claw_abc123...",
    "publicKey": "ed25519:...",
    "name": "Alice",
    "createdAt": 1234567890
  }
}
::

Error Codes

CodeMeaning
-32600Invalid request
-32601Method not found
-32602Invalid params
-32603Internal error
-32001Unauthorized
-32002Already exists
-32003Not found