You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@
18
18
- The `pkgs/ui-elements` workspace package (`@farcaster/snap-ui-elements`) defines the json-render catalog; the emulator depends on it to render snaps.
19
19
- Local dev ports: emulator on 3000, `snap-template` on 3003; example apps under `examples/` use ports 3010 and higher with a distinct port per app.
20
20
- For snap HTTP GET, send `Accept: application/json+farcaster-snap`; example servers typically expose JSON on `/snap`, not on bare `/`.
21
-
- Local `registerSnapHandler` skips JFS when `NODE_ENV` is not `production` (unsigned JSON POSTs, including from `apps/emulator`). Set `SKIP_JFS_VERIFICATION=no` to require JFS anyway, or `=yes` / `=1` to force bypass in production (dev-only).
21
+
- Local `registerSnapHandler` skips JFS **signature** verification when `NODE_ENV` is not `production`, but POST bodies must still be JFS-shaped JSON (`header` / `payload` / `signature`), including from `apps/emulator`. Set `SKIP_JFS_VERIFICATION=no` to require verification anyway, or `=yes` / `=1` to force bypass in production (dev-only).
22
22
- When using `FARCASTER_HUB_URL`, include the port (e.g. `https://rho.farcaster.xyz:3381`).
23
23
- Set `SNAP_PUBLIC_BASE_URL` to the canonical HTTPS origin (no trailing slash) so `page.buttons[].target` URLs resolve correctly.
24
24
- Snap hub verification uses the Hubble **HTTP** API only (no gRPC client). Hub URL helpers accept `http`/`https` with an explicit port or bare `host:port`; `grpc:`/`grpcs:` are invalid.
Copy file name to clipboardExpand all lines: template/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,14 +17,14 @@ Then set dependencies in `package.json` to published versions of `@farcaster/sna
17
17
18
18
- Hono app with `@farcaster/snap-hono` (`registerSnapHandler`) for GET/POST handling and validation
19
19
- Vercel entrypoint at `api/index.ts`
20
-
-`registerSnapHandler`uses JFS verification in production (`NODE_ENV=production`); locally it accepts the same unsigned JSON body the emulator sends (override with `SKIP_JFS_VERIFICATION=no` to force JFS, or `=yes` to force bypass)
20
+
-`registerSnapHandler`verifies JFS signatures in production (`NODE_ENV=production`); locally it skips verification for the same JFS-shaped dev envelope the emulator sends (override with `SKIP_JFS_VERIFICATION=no` to require verification, or `=yes` to force bypass)
21
21
- Vercel deployment via `vercel.json`
22
22
23
23
## Endpoints
24
24
25
25
-`GET /` without `Accept: application/json+farcaster-snap` returns a short plain-text hint for browsers
26
26
-`GET /` with the snap Accept header returns the first page (counter demo starting at 0)
27
-
-`POST /` accepts a snap interaction payload (unsigned JSON in non-production; JFS in production) and returns the next page
27
+
-`POST /` accepts a JFS-shaped snap interaction payload (signature verified in production only by default) and returns the next page
28
28
- Response pages are kept within current spec limits (max 5 elements, text length constraints)
0 commit comments