Round 1 against STRATEGY-2026-10-23.md's backlog: - Wire register_agent/stake/set_credit_score/deposit_liquidity to the real Casper Testnet contracts (lib/casper/live_bridge.ts), verified live against the real RPC node with a freshly generated (unfunded) keypair (npm run casper:keygen). Honesty flags built in for the Odra payable calling convention and the admin-gated set_credit_score call. - Unblock NEAR's paid x402 route (npm run near:keygen generates a real implicit account id); QIE stays correctly flagged as blocked on unconfirmed external facts (asset contract, facilitator), not env plumbing. - New public Home tab: live-stats hero, how-it-works, a real competitor comparison table, and a "90-second proof" that calls the real API live in the browser (verified end-to-end with gstack browse). - Cold-start UX: visible retry state in X402Playground + the TS SDK, plus a keep-warm self-ping (lib/services/keepalive.ts) so the free Render dyno rarely idles out from under a real first-time caller. - New GET /v1/credit-score/:agentId alias + docs/integrations/ samples for Skyfire/Nevermined/Coinbase x402. - Self-hosting quickstart: root docker-compose.yml + scripts/bootstrap.sh, both run for real; fixed a real EACCES crash-loop bug in infra/Dockerfile (non-root user never owned the /data volume mount) found while verifying. 450/450 tests pass, typecheck clean, frontend build clean.
105 lines
5.4 KiB
YAML
105 lines
5.4 KiB
YAML
# Render Blueprint for the Cred402 API (the always-on backend the Vercel console
|
||
# talks to). Render runs long-lived processes, so the node:http server + SSE event
|
||
# stream + in-memory ledger work as-is — unlike serverless.
|
||
#
|
||
# Deploy: Render dashboard → New → Blueprint → connect caelum0x/cred402 → Apply.
|
||
# Live at https://cred402-1.onrender.com (pre-wired in the Vercel rewrites). No
|
||
# secrets required for sim mode; add the p8–p10 keys as environment variables to
|
||
# enable the live Testnet / Stripe / Plaid paths.
|
||
services:
|
||
- type: web
|
||
name: cred402
|
||
runtime: node
|
||
region: oregon
|
||
# Free tier, deliberately, with eyes open. Mainnet only requires CRED402_DATA_DIR
|
||
# to be set, not to be a mounted disk, so the paid path does enable here -- and
|
||
# the facilitator (not this service) is the system of record for settlements, so
|
||
# Bazaar listing, settle counts and leaderboard standing survive a restart.
|
||
#
|
||
# What the free tier costs us, accepted:
|
||
# * the x402 replay barrier lives on the ephemeral filesystem, so a restart
|
||
# clears it and a previously-spent payment proof could be replayed once more
|
||
# (bounded: one free report per replayed proof, at 0.01 USDC each);
|
||
# * /v1/x402/algorand/usage and the finalized receipt projection reset to empty
|
||
# on every restart, so local history understates real volume;
|
||
# * the instance sleeps, and a cold start can be slow enough that a buyer's
|
||
# paid request times out -- which costs real challenge volume, not eligibility.
|
||
#
|
||
# Upgrading to a paid plan and attaching a disk at /var/data fixes all three.
|
||
plan: free
|
||
# tsx + typescript live in devDependencies, so install them too (Render sets
|
||
# NODE_ENV=production, which would otherwise skip dev deps).
|
||
buildCommand: npm install --include=dev
|
||
startCommand: npm start
|
||
healthCheckPath: /v1/health
|
||
autoDeploy: true
|
||
envVars:
|
||
- key: NODE_VERSION
|
||
value: "20"
|
||
# Satisfies the Mainnet durability gate. Ephemeral on free -- see the note above.
|
||
- key: CRED402_DATA_DIR
|
||
value: /tmp/cred402
|
||
# Algorand x402 is fail-closed until the receiver is entered in the Render
|
||
# dashboard. Render ignores new sync:false values on an existing Blueprint, so
|
||
# operators must confirm this variable manually. Once set on Mainnet, keep it
|
||
# stable: discovery, receipts and leaderboard rankings all key on this address.
|
||
- key: CRED402_ALGORAND_PAY_TO
|
||
sync: false
|
||
# Deliberately not committed. Mainnet stays 503 until an operator types this
|
||
# into the dashboard, exactly as I_ACKNOWLEDGE_REAL_USDC_MAINNET_PAYMENTS.
|
||
# Putting the acknowledgement in source would defeat the gate it exists to be.
|
||
- key: CRED402_ALGORAND_MAINNET_RELEASE_ACK
|
||
sync: false
|
||
# CRED402_ENV=mainnet turns auth on and demands a webhook secret. Without BOTH of
|
||
# these loadConfig throws at import time and the service crash-loops before it
|
||
# ever binds a port -- it does not degrade to a 503. Set them in the dashboard.
|
||
- key: CRED402_ADMIN_API_KEY
|
||
sync: false
|
||
- key: CRED402_WEBHOOK_SECRET
|
||
sync: false
|
||
- key: CRED402_ALGORAND_NETWORK
|
||
value: mainnet
|
||
# Must match the network or the paid path refuses to enable.
|
||
- key: CRED402_ENV
|
||
value: mainnet
|
||
- key: CRED402_ALGORAND_PRICE_MICRO_USDC
|
||
value: "10000"
|
||
- key: CRED402_ALGORAND_FACILITATOR_URL
|
||
value: https://facilitator.goplausible.xyz
|
||
- key: CRED402_ALGORAND_FACILITATOR_TIMEOUT_MS
|
||
value: "10000"
|
||
# Independently confirms USDC finality instead of trusting the facilitator.
|
||
- key: CRED402_ALGORAND_INDEXER_URL
|
||
value: https://mainnet-idx.algonode.cloud
|
||
# Required because Render runs with NODE_ENV=production. This prevents
|
||
# forwarded host headers from rewriting the Bazaar resource URL.
|
||
- key: CRED402_PUBLIC_URL
|
||
value: https://cred402-1.onrender.com
|
||
# Casper live write path (p8): `npm run casper:keygen` generates a key
|
||
# offline, fund it free at https://testnet.cspr.live/tools/faucet, then
|
||
# paste the PEM contents here (owner/captcha step — see BUILD-LOG-2026-10-23.md).
|
||
- key: CRED402_CASPER_NODE_URL
|
||
value: https://node.testnet.casper.network/rpc
|
||
- key: CRED402_CASPER_SECRET_KEY_PEM
|
||
sync: false
|
||
# NEAR x402 credit-score route (no facilitator needed — self-verified against
|
||
# NEAR RPC): `npm run near:keygen` prints a ready-to-fund implicit account id;
|
||
# fund it free at https://near-faucet.io (owner/captcha step), then paste it here.
|
||
- key: CRED402_NEAR_PAY_TO
|
||
sync: false
|
||
- key: CRED402_NEAR_NETWORK
|
||
value: testnet
|
||
# QIE x402 credit-score route stays 503 — CRED402_QIE_ASSET_ADDRESS (QUSDC's
|
||
# ERC-20 contract on QIE testnet) and CRED402_QIE_FACILITATOR_URL (no public
|
||
# x402 facilitator for QIE is confirmed to exist) are both still unconfirmed
|
||
# externally; see .env.example and docs/qie_x402.md before setting these.
|
||
- key: CRED402_QIE_PAY_TO
|
||
sync: false
|
||
- key: CRED402_QIE_ASSET_ADDRESS
|
||
sync: false
|
||
- key: CRED402_QIE_FACILITATOR_URL
|
||
sync: false
|
||
# Sim/free mode by default otherwise. Also available:
|
||
# STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, PLAID_CLIENT_ID, PLAID_SECRET,
|
||
# CRED402_X402_FACILITATOR_URL, CRED402_SIDECAR_URL
|