LFG

API Routes

The Next.js API surface backing tipping claims, IPFS pinning, and more.

LFG Pad's frontend is a Next.js app, and a handful of server-side routes exist specifically because they hold secrets or need Node-only APIs that must never ship to the client bundle.

POST /api/tipping/sign-claim

Given an OAuth-verified (platform, handle), signs the claim attestation digest described in Oracle Signing, authorizing claimerAddress to sweep that creator's tipping escrow on Robinhood Chain. Runs on the Node.js runtime (not Edge) since it needs viem/accounts' secp256k1 signer and an HTTP RPC read for the current nonce.

FieldTypeNotes
platformstringMust be one of the configured tipping platform IDs.
handlestringLeading @ is stripped before hashing, matching the tipping UI's normalization.
claimerAddress0x addressWhere claimTips will pay out to.
chainIdnumberRobinhood Chain mainnet, 4663. The signature is bound to that chain's OmniTippingEscrow.
accessTokenstring (optional)OAuth access token for platform — required unless the deployment has no oracle signer configured, in which case the route responds in a safe simulated demo mode instead of erroring.

Note

When ORACLE_SIGNER_PRIVATE_KEY isn't configured on a given deployment, this route returns { simulated: true, signature: null } rather than throwing — the same 'explicit demo mode, not a silent failure' pattern used elsewhere in the app for unconfigured integrations.

Why these live server-side

  • Secret custody — ORACLE_SIGNER_PRIVATE_KEY must never reach client-bundled code; only a server route can hold it.
  • Independent verification — OAuth access tokens are checked against the platform's own identity API server-side, so a compromised or spoofed client can't just assert a handle it doesn't control.
  • Node-only dependencies — signing and RPC reads use APIs that either don't exist or don't behave identically on the Edge runtime.