← Receivers

wallet:update

wallet family

mcp

Set an agent's spending limit in credits a month (0 pauses it). Lowering is open to the people who control the workspace and to the agent for itself (never a sibling); raising needs a person — a signed-in session or the owner's own key, never an agent key

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
member
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
yes
The effect can be undone by a later call.
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/ask/wallet:update \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "actor": "scout", "limit": 5000 }}'

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.

  • actor string required The agent whose limit is set — its wallets row (kind 'agent') in `workspace`
  • limit number required The spending limit in credits per month. 0 pauses the agent (every spend refused, liftable by the owner). 1000 credits = $1
  • workspace string optional The workspace that holds the agent's wallet; defaults to the attested caller

Response

What comes back from the call.

  • ok boolean
  • workspace string
  • actor string
  • monthlyCredits number
  • spentCredits number What this period has used against the limit
  • paused boolean
  • changed boolean
  • raised boolean
  • closed mark | warn | dissolve
  • detail string
  • error string unauthorized | actor_required | no_db | bad_limit | forbidden | not_an_agent_wallet | zeroed_on_chain (the on-chain Zero is final) | human_presence_required (a raise from an agent or a bare key) | write_unconfirmed

Traffic

Every call to wallet:update, 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:update, 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/AgentWalletControls.tsx:99
API route 1
  • one.ie/web/src/lib/receiver-index.generated.ts:458
CLI 1
  • packages/cli/src/wallet.ts:226
Docs 3
  • one.ie/web/src/content/docs/cli.md:261
  • one.ie/web/src/content/docs/sdk.md:268
  • one.ie/web/src/content/docs/wallets.md:308
→

Answered by

wallet:update one.ie/web/src/lib/resolvers/wallet.ts:2474 Dispatched through POST /api/ask/wallet:update, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "actor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "The agent whose limit is set — its wallets row (kind 'agent') in `workspace`"
    },
    "limit": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000000,
      "description": "The spending limit in credits per month. 0 pauses the agent (every spend refused, liftable by the owner). 1000 credits = $1"
    },
    "workspace": {
      "description": "The workspace that holds the agent's wallet; defaults to the attested caller",
      "type": "string"
    }
  },
  "required": [
    "actor",
    "limit"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "workspace": {
      "type": "string"
    },
    "actor": {
      "type": "string"
    },
    "monthlyCredits": {
      "type": "number"
    },
    "spentCredits": {
      "description": "What this period has used against the limit",
      "type": "number"
    },
    "paused": {
      "type": "boolean"
    },
    "changed": {
      "type": "boolean"
    },
    "raised": {
      "type": "boolean"
    },
    "closed": {
      "type": "string",
      "enum": [
        "mark",
        "warn",
        "dissolve"
      ]
    },
    "detail": {
      "type": "string"
    },
    "error": {
      "description": "unauthorized | actor_required | no_db | bad_limit | forbidden | not_an_agent_wallet | zeroed_on_chain (the on-chain Zero is final) | human_presence_required (a raise from an agent or a bare key) | write_unconfirmed",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}