Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JSON-RPC server params #95

Merged
merged 24 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,31 +132,31 @@ While running, a solar node can be queried using JSON-RPC over HTTP.

| Method | Parameters | Response | Description |
| --- | --- | --- | --- |
| `blocks` | `"<@...=.ed25519>"` | `[<@...=.ed25519>]` | Returns an array of public keys |
| `blockers` | `"<@...=.ed25519>"` | `[<@...=.ed25519>]` | Returns an array of public keys |
| `descriptions` | `"<@...=.ed25519>"` | `[<description>]` | Returns an array of descriptions |
| `self_descriptions` | `"<@...=.ed25519>"` | `[<description>]` | Returns an array of descriptions |
| `latest_description` | `"<@...=.ed25519>"` | `<description>` | Returns a single description |
| `latest_self_description` | `"<@...=.ed25519>"` | `<description>` | Returns a single description |
| `feed` | `"<@...=.ed25519>"` | `[{ "key": "<%...=.sha256>", "value": <value>, "timestamp": <timestamp>, "rts": null }]` | Returns an array of message KVTs (key, value, timestamp) from the local database |
| `follows` | `"<@...=.ed25519>"` | `[<@...=.ed25519>]` | Returns an array of public keys |
| `followers` | `"<@...=.ed25519>"` | `[<@...=.ed25519>]` | Returns an array of public keys |
| `is_following` | `{ "peer_a": "<@...=.ed25519>", "peer_b": "<@...=.ed25519>" }` | `[<@...=.ed25519>]` | Returns a boolean |
| `friends` | `"<@...=.ed25519>"` | `[<@...=.ed25519>]` | Returns an array of public keys |
| `images` | `"<@...=.ed25519>"` | `[<&...=.sha256>]` | Returns an array of image references |
| `self_images` | `"<@...=.ed25519>"` | `[<&...=.sha256>]` | Returns an array of image references |
| `latest_image` | `"<@...=.ed25519>"` | `<&...=.sha256>` | Returns a single image reference |
| `latest_self_image` | `"<@...=.ed25519>"` | `<&...=.sha256>` | Returns a single image reference |
| `message` | `"<%...=.sha256>"` | `{ "key": "<%...=.sha256>", "value": <value>, "timestamp": <timestamp>, "rts": null }` | Returns a single message KVT (key, value, timestamp) from the local database |
| `names` | `"<@...=.ed25519>"` | `[<name>]` | Returns an array of names |
| `self_names` | `"<@...=.ed25519>"` | `[<name>]` | Returns an array of names |
| `latest_name` | `"<@...=.ed25519>"` | `<name>` | Returns a single name |
| `latest_self_name` | `"<@...=.ed25519>"` | `<name>` | Returns a single name |
| `blocks` | `["<@...=.ed25519>"]` | `[<@...=.ed25519>]` | Returns an array of public keys |
| `blockers` | `["<@...=.ed25519>"]` | `[<@...=.ed25519>]` | Returns an array of public keys |
| `descriptions` | `["<@...=.ed25519>"]` | `[<description>]` | Returns an array of descriptions |
| `self_descriptions` | `["<@...=.ed25519>"]` | `[<description>]` | Returns an array of descriptions |
| `latest_description` | `["<@...=.ed25519>"]` | `<description>` | Returns a single description |
| `latest_self_description` | `["<@...=.ed25519>"]` | `<description>` | Returns a single description |
| `feed` | `["<@...=.ed25519>"]` | `[{ "key": "<%...=.sha256>", "value": <value>, "timestamp": <timestamp>, "rts": null }]` | Returns an array of message KVTs (key, value, timestamp) from the local database |
| `follows` | `["<@...=.ed25519>"]` | `[<@...=.ed25519>]` | Returns an array of public keys |
| `followers` | `["<@...=.ed25519>"]` | `[<@...=.ed25519>]` | Returns an array of public keys |
| `is_following` | `["<@...=.ed25519>", "<@...=.ed25519>"]` | `<bool>` | Returns a boolean |
| `friends` | `["<@...=.ed25519>"]` | `[<@...=.ed25519>]` | Returns an array of public keys |
| `images` | `["<@...=.ed25519>"]` | `[<&...=.sha256>]` | Returns an array of image references |
| `self_images` | `["<@...=.ed25519>"]` | `[<&...=.sha256>]` | Returns an array of image references |
| `latest_image` | `["<@...=.ed25519>"]` | `<&...=.sha256>` | Returns a single image reference |
| `latest_self_image` | `["<@...=.ed25519>"]` | `<&...=.sha256>` | Returns a single image reference |
| `message` | `["<%...=.sha256>"]` | `{ "key": "<%...=.sha256>", "value": <value>, "timestamp": <timestamp>, "rts": null }` | Returns a single message KVT (key, value, timestamp) from the local database |
| `names` | `["<@...=.ed25519>"]` | `[<name>]` | Returns an array of names |
| `self_names` | `["<@...=.ed25519>"]` | `[<name>]` | Returns an array of names |
| `latest_name` | `["<@...=.ed25519>"]` | `<name>` | Returns a single name |
| `latest_self_name` | `["<@...=.ed25519>"]` | `<name>` | Returns a single name |
| `peers` | | `[{ "pub_key": "<@...=.ed25519>", "seq_num": <int> }` | Returns an array of public key and latest sequence number for each peer in the local database |
| `ping` | | `pong!` | Responds if the JSON-RPC server is running |
| `publish` | `<content>` | `{ "msg_ref": "<%...=.sha256>", "seq_num": <int> }` | Publishes a message and returns the reference (message hash) and sequence number |
| `subscribers` | `"<channel>"` | `[<@...=.ed25519>]` | Returns an array of public keys |
| `subscriptions` | `"<@...=.ed25519>"` | `[<channel>]` | Returns an array of channel names |
| `subscribers` | `["<channel>"]` | `[<@...=.ed25519>]` | Returns an array of public keys |
| `subscriptions` | `["<@...=.ed25519>"]` | `[<channel>]` | Returns an array of channel names |
| `whoami` | | `<@...=.ed25519>` | Returns the public key of the local node |

### Examples
Expand Down
Loading
Loading