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

introduce relay watch webhooks #127

Merged
merged 11 commits into from
Mar 8, 2024
25 changes: 3 additions & 22 deletions docs/specs/servers/relay/relay-server-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,8 @@ WebSocket supports JSON-RPC methods. For more details, please visit [Relay RPC d

## HTTP

### Register Webhook
### JSON-RPC

Used to register a webhook that would return an incoming message to the webhook.
Used to request JSON-RPC methods. For more details, please visit [Relay RPC docs](./relay-server-rpc.md).

`POST /register-webhook`

Body:

```jsonc
{
"clientId": string,
"webhook": string
}
```



### Message Id

A Relay message is globally available and it's always an utf8 string. Therefore the message id is derived as the sha256 hash.

```sh
message_id = sha256(message)
```
`POST /rpc`
Loading