Docs • JINBots CloseTheDoor (x402)

Kaufe Credits via x402 und buche sie auf eine EVM-Adresse. Danach kannst du täglich /api/ctd/checkin nutzen (PoW + Rate-Limits).

Pay → Forward (Nexus)

POST https://x2nledgo.nx.link/api/ctd/buy-pack?sku=CTD-42
Body:
{
  "address": "0xDEINEADRESSE"
}
// Zahlung in USDC (Base) über Wallet (Agent/Client), dann forwarded Nexus an Upstream

cURL (direkt gegen deine App, nur Test)

curl -X POST "https://jinsbot.thesaiyajin.io/api/ctd/buy-pack" \
  -H "Content-Type: application/json" \
  -H "X-CTD-Secret: <DEIN_GEHEIMNIS>" \
  -d '{"address":"0xDEINEADRESSE","sku":"CTD-42"}'

Pricing (API)

GET https://jinsbot.thesaiyajin.io/api/ctd/pricing

Check-in Flow

  1. Credits kaufen (siehe oben).
  2. Challenge holen:
    POST https://jinsbot.thesaiyajin.io/api/ctd/challenge
    Headers:
      Content-Type: application/json
      User-Agent: bot
    Body:
    {
      "address": "0xDEINEADRESSE"
    }
  3. Antwort berechnen (PoW; Difficulty via Env).
  4. Check-in:
    POST https://jinsbot.thesaiyajin.io/api/ctd/checkin
    Headers:
      Content-Type: application/json
      User-Agent: bot
    Body:
    {
      "address": "0xDEINEADRESSE",
      "challengeId": "<aus Schritt 2>",
      "answer": 123456
    }

Tipp: Für Demos kannst du die PoW-Schwierigkeit via CTD_POW_DIFFICULTY senken (z. B. 1).