From 0d4526173c97f5c6b81cc1137cae83ed499ec1d3 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Wed, 7 Aug 2024 15:30:45 -0400 Subject: [PATCH 1/2] feat(relay): request in connection URL --- docs/specs/servers/relay/relay-server-api.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/specs/servers/relay/relay-server-api.md b/docs/specs/servers/relay/relay-server-api.md index e6cb8c0f..8ecda690 100644 --- a/docs/specs/servers/relay/relay-server-api.md +++ b/docs/specs/servers/relay/relay-server-api.md @@ -2,12 +2,16 @@ ## WebSocket -WebSocket supports JSON-RPC methods. For more details, please visit [Relay RPC docs](./relay-server-rpc.md). +The `/` endpoint is used to establish WebSocket connections. Messages sent are JSON-RPC requests and responses are JSON-RPC responses. See [supported JSON-RPC methods](./relay-server-rpc.md) for valid JSON-RPC payloads. -## HTTP +### Query parameters -### JSON-RPC +- `auth` (required) - a JWT for the client +- `projectId` (required) - the project ID +- `request` - a base64-encoded [JSON-RPC method](./relay-server-rpc.md) +- `ua` - a user agent string +- `useOnCloseEvent` - unused? -Used to request JSON-RPC methods. For more details, please visit [Relay RPC docs](./relay-server-rpc.md). +## HTTP RPC -`POST /rpc` +`POST /rpc` can be used to perform JSON-RPC requests. See [supported JSON-RPC methods](./relay-server-rpc.md) on what JSON-RPC methods are supported as POST bodies. From 8c7ccbcb1ab25582c3290ffaae64b2a5e8ef17c9 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Wed, 7 Aug 2024 15:35:40 -0400 Subject: [PATCH 2/2] chore: tweaks --- docs/specs/servers/relay/relay-server-api.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/specs/servers/relay/relay-server-api.md b/docs/specs/servers/relay/relay-server-api.md index 8ecda690..fd148d01 100644 --- a/docs/specs/servers/relay/relay-server-api.md +++ b/docs/specs/servers/relay/relay-server-api.md @@ -6,10 +6,10 @@ The `/` endpoint is used to establish WebSocket connections. Messages sent are J ### Query parameters -- `auth` (required) - a JWT for the client -- `projectId` (required) - the project ID -- `request` - a base64-encoded [JSON-RPC method](./relay-server-rpc.md) -- `ua` - a user agent string +- `auth` (required) - A JWT for the client +- `projectId` (required) - The project ID +- `request` - A base64-encoded [JSON-RPC method](./relay-server-rpc.md) to be executed in-parallel with the connection being established. The JSON-RPC response is sent over the WebSocket connection to the client. +- `ua` - A user agent string - `useOnCloseEvent` - unused? ## HTTP RPC