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
{{ message }}
Repository navigation
Proof relay: carry the proof and bind it to a Stellar address #17
The relay takes the proof produced by a Reclaim session in the creator's browser and submits it to the advance contract with the borrower's Stellar address bound in.
Not a parameter sitting next to it. See #9: a binding the witness did not sign is not a binding — it is a field the attacker fills in. If the Stellar address is not inside the bytes covered by the attestor's signature, anyone can take someone else's proof and point the disbursement at their own wallet.
The relay's job is to get the address into the claim before it is signed, not to attach it afterwards.
Done when
A proof produced in a real browser session reaches the contract through the relay and disburses on testnet, with a transaction hash.
Working agreement
One issue, one owner. 2. Branch per issue, named above — not the GitHub-suggested one. 3. MCP Stellar Raven for any Stellar/Soroban fact that gets written down. 4. Merge through PR review by Axel (PM); no self-merge. If an ACC has not arrived within two days on something already verified, merge and say so in the PR. 5. Deploys need evidence: contract address or tx hash on stellar.expert, recorded in docs/deployments.md. 6. Secrets live in .env, gitignored, chmod 600 — never printed, never committed, never pasted into an issue or PR. Only public G… and C… addresses appear anywhere. 7. Issues, commits and PRs in English.
Scope: instawards/Forepay Instawards SOW.pdf. Timeline assumes 2026-10-09 → 2026-11-08; tell Axel if the real window differs.
@Lin1er, the front end side of #17 is ready to plug in. #57 (#20, Prove and accept) calls one seam, proveRevenue(borrower, onStage) in fe/src/lib/reclaim/, which must resolve to an AdvanceRequest (fe/src/lib/stellar/contract.ts: revenueUsd, pubId, windowStart, windowEnd, timestampS, epoch, signature, recoveryId).
While NEXT_PUBLIC_RELAY_URL is empty, a mock walks through the session stages and returns fixed values. That proof is refused by the deployed contract, as it should be.
Everything after the seam is real: request_advance is simulated before the offer, then signed and sent, and every contract code has its own words.
What I need from you:
The browser flow: popup, QR or redirect, and which Reclaim SDK. ARCHITECTURE.md says not to install one before you choose.
The relay's API: what it takes (at least the borrower's G…, which must end up inside the signed claim as contextAddress) and what it returns.
Also for the #5 gate, the AdSense account: if someone with an active AdSense website account agrees to help, can they just send you an access token from the OAuth 2.0 Playground (adsense.readonly, valid about one hour) for you to run pnpm -C be prove:adsense? And through which channel would you like to receive it, so the token is never posted anywhere public?
@Nabil-Aufa answers to both questions are in #73 (stacked on #66). The full reference is docs/api.md → "The proof relay".
1. Browser flow. Google's own sign-in popup, through the Google Identity Services token client, asking for adsense.readonly only. No Reclaim SDK in the browser, so there's nothing to install on the Reclaim side. The proving happens on the relay, because snarkjs needs about 330 MB of circuit files and roughly 10 minutes of CPU per proof. For your ProveStage:
waiting is while Google's popup is open;
reading runs from POST /proofs until the job ends.
2. Relay API.
Request:POST /proofs with { borrower, accessToken, publisherId? }. It answers 202 { id, stage }.
Polling: poll GET /proofs/:id every few seconds. The job ends at done or failed.
On done:request is your AdvanceRequest, except timestampS and epoch arrive as strings, so pass them through BigInt().
On failed: the job carries error.code:
token: the creator signs in again;
account: no READY AdSense account;
provider, prove, audit, internal: our side, show a retry.
The front end needs two values: NEXT_PUBLIC_RELAY_URL, plus a Google OAuth Web client id with your origins listed as authorized JavaScript origins.
On the AdSense token for #5: yes, an OAuth Playground token works. Send it to me in a private DM, never on GitHub. It expires within an hour anyway. Once your side calls the relay, the helper can sign in themselves through the popup, and nobody has to pass a token by hand.
Still blocked, as before: a READY AdSense account, and the encoding decision on #6 before #61 can pin the template.
Activity
test(#18): prove on chain that a bound proof cannot be spent by anoth…
Nabil-Aufa commentedon Oct 16, 2026
@Lin1er, the front end side of #17 is ready to plug in. #57 (#20, Prove and accept) calls one seam,
proveRevenue(borrower, onStage)infe/src/lib/reclaim/, which must resolve to anAdvanceRequest(fe/src/lib/stellar/contract.ts:revenueUsd,pubId,windowStart,windowEnd,timestampS,epoch,signature,recoveryId).NEXT_PUBLIC_RELAY_URLis empty, a mock walks through the session stages and returns fixed values. That proof is refused by the deployed contract, as it should be.request_advanceis simulated before the offer, then signed and sent, and every contract code has its own words.What I need from you:
G…, which must end up inside the signed claim ascontextAddress) and what it returns.Also for the #5 gate, the AdSense account: if someone with an active AdSense website account agrees to help, can they just send you an access token from the OAuth 2.0 Playground (
adsense.readonly, valid about one hour) for you to runpnpm -C be prove:adsense? And through which channel would you like to receive it, so the token is never posted anywhere public?feat(#20): Reclaim seam with a mock, the proof check and the board's …
feat(#20): Reclaim seam with a mock, the proof check and the board's …
Lin1er commentedon Oct 20, 2026
@Nabil-Aufa answers to both questions are in #73 (stacked on #66). The full reference is
docs/api.md→ "The proof relay".1. Browser flow. Google's own sign-in popup, through the Google Identity Services token client, asking for
adsense.readonlyonly. No Reclaim SDK in the browser, so there's nothing to install on the Reclaim side. The proving happens on the relay, becausesnarkjsneeds about 330 MB of circuit files and roughly 10 minutes of CPU per proof. For yourProveStage:waitingis while Google's popup is open;readingruns fromPOST /proofsuntil the job ends.2. Relay API.
POST /proofswith{ borrower, accessToken, publisherId? }. It answers202 { id, stage }.GET /proofs/:idevery few seconds. The job ends atdoneorfailed.done:requestis yourAdvanceRequest, excepttimestampSandepocharrive as strings, so pass them throughBigInt().failed: the job carrieserror.code:token: the creator signs in again;account: noREADYAdSense account;provider,prove,audit,internal: our side, show a retry.request_advanceas it does now.The front end needs two values:
NEXT_PUBLIC_RELAY_URL, plus a Google OAuth Web client id with your origins listed as authorized JavaScript origins.On the AdSense token for #5: yes, an OAuth Playground token works. Send it to me in a private DM, never on GitHub. It expires within an hour anyway. Once your side calls the relay, the helper can sign in themselves through the popup, and nobody has to pass a token by hand.
Still blocked, as before: a
READYAdSense account, and the encoding decision on #6 before #61 can pin the template.docs(#17): the API and the relay, public at api-forepay.jameshub.fun
Lin1er commentedon Oct 20, 2026
@Nabil-Aufa the relay is live for testing:
https://api-forepay.jameshub.fun. It also serves the #16 routes.NEXT_PUBLIC_API_URLandNEXT_PUBLIC_RELAY_URLto it.proveRevenue, stacked on your #20 Prove revenue, see the offer with its derivation, accept #57. Merge or cherry-pick it as you prefer. Wording and illustrations for the three new failures (googleSignIn,noAdsense,relayFailed) are yours to change.http://localhost:3000is allowed for now. Send me the deployed front end origin (Deploy the front end and capture the screenshots #22) and I'll add it.Still missing before a real run: a Google OAuth Web client id (see #5) and a
READYAdSense account (#5).docs(#17): proving takes about a minute on the relay host, not ten
fix(#76): rebuild the claim in the encoding AdSense actually produces (…
feat(#20): Reclaim seam with a mock, the proof check and the board's …
#20 Prove revenue, see the offer with its derivation, accept (#57)
10 remaining items
feat(#17): front end relay client behind proveRevenue
fix(#17): resume a running proof, and name relay failures as the relay's
fix(#17): end a kept job the relay no longer has, instead of signing …
feat(#17): load Google's sign-in while 2a is open, so the press opens…
feat(#17): words for the Google sign-in, the minute-long wait and the…
test(#17): e2e for proving through the relay
fix(#17): relay panels say only what is true, and coming back never f…
test(#17): pin the relay's remaining panels, the preload and the resu…
fix(#17): Back with a kept job waits on it, and noAdsense's title fit…
docs(#17): the relay host runs feat/admob-relay at 3102f64, for AdMob…
#17 Front end relay client behind proveRevenue (#75)
docs(#17): the relay host runs feat/admob-relay rebased onto main, at 1…
docs(#17): #107 is on the relay host, at 8097128, before #106's upgrade
docs(#17): the relay host is back on main, at 2ea1e15
docs(#17): the relay host runs main, at 2ea1e15 (#99)