Skip to content

Commit

Permalink
rename msg_key to msg_ref
Browse files Browse the repository at this point in the history
  • Loading branch information
mycognosist committed Dec 5, 2022
1 parent 4f4dc82 commit f846d9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The server currently supports HTTP.
| --- | --- | --- | --- |
| `ping` | | `pong!` | Responds if the JSON-RPC server is running |
| `whoami` | | `<@...=.ed25519>` | Returns the public key of the local node |
| `publish` | `<content>` | `{ msg_key: <%...=.sha256>, next_seq: <int> }` | Publishes a message and returns the key (message hash) and sequence number |
| `publish` | `<content>` | `{ "msg_ref": "<%...=.sha256>", "seq": <int> }` | Publishes a message and returns the reference (message hash) and sequence number |

`curl` can be used to invoke the available methods from the commandline:

Expand All @@ -95,7 +95,7 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method"
```
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "publish", "params": {"type": "about", "about": "@o8lWpyLeSqV/BJV9pbxFhKpwm6Lw5k+sqexYK+zT9Tc=.ed25519", "name": "solar_glyph", "description": "glyph's experimental solar (rust) node"}, "id":1 }' 127.0.0.1:3030
{"jsonrpc":"2.0","result":{"msg_key": "", "seq": "","id":1}
{"jsonrpc":"2.0","result":{"msg_ref":"%ZwYwLxMHgU8eC43HOziJvYURjZzAzwFk3v5RYS/NbQY=.sha256","seq": 3,"id":1}
```

_Note: You might find it easier to save your JSON to file and pass that to `curl` instead._
Expand Down

0 comments on commit f846d9a

Please sign in to comment.