← Receivers

wallet:lock-publish

wallet family

Publish the caller's message lock (age1…) under their own name, proven by a Sui signature. The holder signs the exact text "ONE message lock v1\n<slug>\n<lock>" with the Sui key their account registered; the server rebuilds that text, checks the signature and that the signer IS the registered Sui address, then stores lock + signer + signature. The name is the attested session's, never the body's. An AGENT publishes its own lock with `agent` set to its id (the Bearer key's attested actor — a person, even the owner, is refused `not_the_agent`): the text is "ONE message lock v1\n<workspace>/<agent>\n<lock>" and the signer must be the Sui address on the agent's own wallet row. Refusals: unauthorized · bad_lock · bad_agent · not_the_agent · no_sui_address · bad_signature · wrong_signer

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:lock-publish \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "lock": "age1…", "signature": "AB…" }}'

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.

  • lock string required The lock: age1 followed by 58 bech32 characters, as shown on /keys
  • signature string required Sui personal-message signature (base64) over lockMessage(slug, lock), or agentLockMessage(workspace, agent, lock) for an agent — see lib/key/lock-lookup.ts
  • agent string optional Agent form only: the agent's own id. Must equal the attested caller (ctx.actorId); never chooses whose lock is written
  • workspace string optional Agent form only: the workspace of the agent's wallet row. Defaults to the agent's id (a self-registered agent). Selects a row, grants nothing

Response

What comes back from the call.

  • ok boolean
  • lock string
  • suiAddress string
  • publishedAt string
  • error string

Traffic

Every call to wallet:lock-publish, 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:lock-publish, 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 3
  • one.ie/web/src/lib/key/lock-lookup.ts:7
  • one.ie/web/src/lib/receiver-index.generated.ts:413
  • one.ie/web/src/lib/resolvers/wallet.ts:1366
CLI 1
  • packages/cli/src/key-publish.ts:7
SDK 1
  • packages/sdk/src/message-lock.ts:4
→

Answered by

wallet:lock-publish one.ie/web/src/lib/resolvers/wallet.ts:1433 Dispatched through POST /api/ask/wallet:lock-publish, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "lock": {
      "type": "string",
      "description": "The lock: age1 followed by 58 bech32 characters, as shown on /keys"
    },
    "signature": {
      "type": "string",
      "description": "Sui personal-message signature (base64) over lockMessage(slug, lock), or agentLockMessage(workspace, agent, lock) for an agent — see lib/key/lock-lookup.ts"
    },
    "agent": {
      "description": "Agent form only: the agent's own id. Must equal the attested caller (ctx.actorId); never chooses whose lock is written",
      "type": "string"
    },
    "workspace": {
      "description": "Agent form only: the workspace of the agent's wallet row. Defaults to the agent's id (a self-registered agent). Selects a row, grants nothing",
      "type": "string"
    }
  },
  "required": [
    "lock",
    "signature"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "lock": {
      "type": "string"
    },
    "suiAddress": {
      "type": "string"
    },
    "publishedAt": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}