← Receivers

rewards:enroll

rewards family

Bind a referrer wallet to a referred wallet at signup, as a weighted Path written with `mark`. FIRST BINDING WINS — an existing inbound path to the referred wallet is never re-routed, so a later spoof cannot redirect a payout. Accepts the two addresses either flat or under `content` (the shape pay/backend sends). Self-referral is refused.

Effect
signal
Fire-and-forget — the call returns once accepted, not once done.
Caller
agent_key
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
no
This cannot be undone. Dry-run it first where the contract allows.
Idempotent
yes
Safe to retry as-is.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/signal/rewards:enroll \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "content": { "referrer": "0xabc…", "referred": "0xdef…" }, "tags": [ "rewards", "enroll" ] }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • content object optional The nested shape pay/backend's enrollReferrer posts
  • referrer string optional Referrer wallet address, flat form
  • referred string optional Referred wallet address, flat form
  • tags string[] optional Carried through from the signal envelope; not read by the handler

Response

The acknowledgement shape — the work itself completes after the call returns.

  • ok boolean
  • bound created | existing `existing` = the referred wallet was already bound and nothing moved
  • referrer string
  • referred string
  • error string

Traffic

Every call to rewards:enroll, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names rewards:enroll, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 1
  • one.ie/web/src/lib/receiver-index.generated.ts:266

Answered by

rewards:enroll one.ie/web/src/lib/resolvers/rewards.ts:65 Dispatched through POST /api/signal/rewards:enroll, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "content": {
      "description": "The nested shape pay/backend's enrollReferrer posts",
      "type": "object",
      "properties": {
        "referrer": {
          "type": "string",
          "description": "Referrer wallet address"
        },
        "referred": {
          "type": "string",
          "description": "Referred wallet address"
        }
      },
      "required": [
        "referrer",
        "referred"
      ]
    },
    "referrer": {
      "description": "Referrer wallet address, flat form",
      "type": "string"
    },
    "referred": {
      "description": "Referred wallet address, flat form",
      "type": "string"
    },
    "tags": {
      "description": "Carried through from the signal envelope; not read by the handler",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "bound": {
      "description": "`existing` = the referred wallet was already bound and nothing moved",
      "type": "string",
      "enum": [
        "created",
        "existing"
      ]
    },
    "referrer": {
      "type": "string"
    },
    "referred": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}