diff --git a/apps/hubble/src/rpc/httpServer.ts b/apps/hubble/src/rpc/httpServer.ts index f0a142583b..4909a5346e 100644 --- a/apps/hubble/src/rpc/httpServer.ts +++ b/apps/hubble/src/rpc/httpServer.ts @@ -219,7 +219,7 @@ export class HttpAPIServer { initHandlers() { //================connect================ - // @doc-tag: /connect + // @doc-tag: /connect?message=...&signature=... this.app.post<{ Body: { message: string; signature: string } }>("/v1/connect", async (request, reply) => { const { message, signature } = request.body; const verifierOpts = getVerifier(this.l2PublicClient); diff --git a/apps/hubble/www/docs/docs/httpapi/connect.md b/apps/hubble/www/docs/docs/httpapi/connect.md new file mode 100644 index 0000000000..90555d5f4b --- /dev/null +++ b/apps/hubble/www/docs/docs/httpapi/connect.md @@ -0,0 +1,29 @@ +# Farcaster Connect API + +## connect +Verify a Farcaster Connect message and signature. + + +**Body Parameters** +| Parameter | Description | +| --------- | ----------- | +| message | Farcaster Connect sign in message | +| signature | ERC-191 signature | + + +**Example** +```bash +curl http://127.0.0.1:2281/v1/connect \ + -H 'Content-Type: application/json' \ + -d'{"message": "msg", "signature": "sig"} + +``` + + +**Response** +```json +{ + "fid": 20943, + "success": true +} +```