← Receivers

wallet:rotate

wallet family

Give up a HUMAN wallet row's registered addresses so a NEW key can register its own — the old set is written to the event log first, then every address column is cleared. Refuses an agent row (its addresses are proven, never typed) and a caller the authority walk does not place over the workspace

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
owner
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
no
Not safe to blind-retry — dedupe on the envelope idempotencyKey.

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/ask/wallet:rotate \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "workspace": "acme", "reason": "new key" }}'

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.

  • workspace string optional The workspace whose row rotates. Defaults to the attested caller
  • actor string optional The row's actor. Defaults to the workspace — the human's own row
  • reason string optional Why — kept in the audit event beside the cleared addresses

Response

What comes back from the call.

  • ok boolean
  • workspace string
  • actor string
  • cleared object The addresses this row held before the rotate — the only copy outside the event log
  • closed mark | warn
  • error string unauthorized · approval_required (a bare API key — needs a human session or a verified service caller) · forbidden · no_row · agent_row · no_db
  • detail string

Traffic

Every call to wallet:rotate, 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 wallet:rotate, 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

UI 1
  • one.ie/web/src/components/wallet/AllWallets.tsx:144
API route 2
  • one.ie/web/src/lib/receiver-index.generated.ts:414
  • one.ie/web/src/lib/resolvers/wallet.ts:1280
→

Answered by

wallet:rotate one.ie/web/src/lib/resolvers/wallet.ts:1339 Dispatched through POST /api/ask/wallet:rotate, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "description": "The workspace whose row rotates. Defaults to the attested caller",
      "type": "string"
    },
    "actor": {
      "description": "The row's actor. Defaults to the workspace — the human's own row",
      "type": "string"
    },
    "reason": {
      "description": "Why — kept in the audit event beside the cleared addresses",
      "type": "string",
      "maxLength": 200
    }
  }
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "workspace": {
      "type": "string"
    },
    "actor": {
      "type": "string"
    },
    "cleared": {
      "description": "The addresses this row held before the rotate — the only copy outside the event log",
      "type": "object",
      "properties": {
        "sui": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "evm": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "solana": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "btc": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "asi": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "closed": {
      "type": "string",
      "enum": [
        "mark",
        "warn"
      ]
    },
    "error": {
      "description": "unauthorized · approval_required (a bare API key — needs a human session or a verified service caller) · forbidden · no_row · agent_row · no_db",
      "type": "string"
    },
    "detail": {
      "type": "string"
    }
  }
}