← Receivers

wallet:sweep-set

wallet family

The agent's claimed owner sets its sweep rule — the threshold above which a sweep is due and the float it keeps — and proves the address sweeps settle to

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
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:sweep-set \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "actor": "scout", "chain": "sui", "threshold": "5000000000", "float": "1000000000", "address": "0x<owner sui address>", "challenge": "<wallet:challenge>", "proof": { "publicKey": "<hex>", "signature": "<hex>" } }}'

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 optional The agent whose rule is set; defaults to `workspace`
  • workspace string optional The workspace that holds the agent's wallets row; defaults to the attested caller
  • chain sui | evm | solana | btc optional Wallet chain family; default sui
  • threshold any required A sweep is due when the balance is ABOVE this, integer base units as a digit string
  • float any required What the agent keeps after a sweep, integer base units, strictly below threshold
  • address any required The owner's own address on `chain` — what sweeps settle to once this proof verifies. Never the agent's
  • challenge any required A fresh wallet:challenge the owner fetched with workspace = actor = its own slug
  • proof any required { publicKey, signature } (hex) by the owner's address over the wallet-registration statement for that challenge

Response

What comes back from the call.

  • ok boolean
  • workspace string
  • actor string
  • chain string
  • owner string
  • ownerAddress string
  • thresholdUnits string
  • floatUnits string
  • detail string
  • closed mark | warn | dissolve
  • error string unsupported_chain | not_an_agent_wallet | unclaimed | agent_owns_itself | not_owner | human_presence_required | bad_rule | address_required | destination_is_agent | owner_address_unproven

Traffic

Every call to wallet:sweep-set, 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:sweep-set, 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:402
CLI 1
  • packages/cli/src/key-sweep.ts:113
→

Answered by

wallet:sweep-set one.ie/web/src/lib/resolvers/wallet.ts:1282 Dispatched through POST /api/ask/wallet:sweep-set, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "actor": {
      "description": "The agent whose rule is set; defaults to `workspace`",
      "type": "string"
    },
    "workspace": {
      "description": "The workspace that holds the agent's wallets row; defaults to the attested caller",
      "type": "string"
    },
    "chain": {
      "description": "Wallet chain family; default sui",
      "type": "string",
      "enum": [
        "sui",
        "evm",
        "solana",
        "btc"
      ]
    },
    "threshold": {
      "description": "A sweep is due when the balance is ABOVE this, integer base units as a digit string"
    },
    "float": {
      "description": "What the agent keeps after a sweep, integer base units, strictly below threshold"
    },
    "address": {
      "description": "The owner's own address on `chain` — what sweeps settle to once this proof verifies. Never the agent's"
    },
    "challenge": {
      "description": "A fresh wallet:challenge the owner fetched with workspace = actor = its own slug"
    },
    "proof": {
      "description": "{ publicKey, signature } (hex) by the owner's address over the wallet-registration statement for that challenge"
    }
  },
  "required": [
    "threshold",
    "float",
    "address",
    "challenge",
    "proof"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "workspace": {
      "type": "string"
    },
    "actor": {
      "type": "string"
    },
    "chain": {
      "type": "string"
    },
    "owner": {
      "type": "string"
    },
    "ownerAddress": {
      "type": "string"
    },
    "thresholdUnits": {
      "type": "string"
    },
    "floatUnits": {
      "type": "string"
    },
    "detail": {
      "type": "string"
    },
    "closed": {
      "type": "string",
      "enum": [
        "mark",
        "warn",
        "dissolve"
      ]
    },
    "error": {
      "description": "unsupported_chain | not_an_agent_wallet | unclaimed | agent_owns_itself | not_owner | human_presence_required | bad_rule | address_required | destination_is_agent | owner_address_unproven",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}