Files
herolib/lib/hero/heromodels
2025-09-18 06:57:59 +02:00
..
...
2025-09-14 07:19:52 +02:00
...
2025-09-17 05:52:09 +02:00
...
2025-09-18 06:57:59 +02:00
...
2025-09-18 06:57:59 +02:00
...
2025-09-18 06:14:08 +02:00
...
2025-09-18 06:14:08 +02:00
...
2025-09-18 06:14:08 +02:00
...
2025-09-18 06:14:08 +02:00
2025-09-15 17:44:09 +03:00
...
2025-09-18 06:57:59 +02:00
...
2025-09-18 06:14:08 +02:00
...
2025-09-18 06:14:08 +02:00
...
2025-09-18 06:14:08 +02:00
...
2025-09-14 14:54:24 +02:00
...
2025-09-18 06:57:59 +02:00
...
2025-09-18 06:57:59 +02:00
...
2025-09-18 06:30:26 +02:00

http based RPC server


curl -s http://localhost:9933/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "comment_set",
    "params": {
      "comment": "Hello world!",
      "parent": 0,
      "author": 42
    },
    "id": 1
  }' | jq .

{
  "jsonrpc": "2.0",
  "result": "46",
  "id": 1
}

rpc discovery:

curl -s http://localhost:9933/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"rpc.discover","params":[],"id":99}' | jq .

unix socket based RPC server

# to test the discover function, this returns the openrpc specification:
echo '{"jsonrpc":"2.0","method":"rpc.discover","params":[],"id":1}' | nc -U /tmp/heromodels

# to test interactively:

nc -U /tmp/heromodels

# then e.g. paste following in

{"jsonrpc":"2.0","method":"comment_set","params":{"comment":"Hello world!","parent":0,"author":42},"id":1}

needs to be on one line for openrpc to work

see lib/hero/heromodels/rpc/openrpc.json for the full openrpc specification