@1claw/sdk 0.61.17 → 0.61.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +28 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -438,6 +438,34 @@ When `execution_require_tee` is true:
438
438
 
439
439
  Both require `intents_api_enabled` / `execution_intents_enabled` to be on first.
440
440
 
441
+ ### Agent pairing with a fingerprint
442
+
443
+ An agent can enrol itself with its own Ed25519 public key. The vault returns an SSH-style `SHA256:` fingerprint the human compares on the approval page, and the agent collects its API key itself once approved — nothing travels by email.
444
+
445
+ ```typescript
446
+ import { AgentsResource } from "@1claw/sdk";
447
+
448
+ const result = await AgentsResource.pair(
449
+ "https://api.1claw.co",
450
+ { name: "my-agent", public_key: "ssh-ed25519 AAAA…" },
451
+ (fingerprint, approvalUrl) => console.log(`Show the human: ${fingerprint}\n${approvalUrl}`),
452
+ );
453
+ // result.status === "approved" → result.api_key (shown once)
454
+ ```
455
+
456
+ ### Passkey-owned Safes: spend under a grant
457
+
458
+ When a human owns an EVM Safe with a passkey (`custody: passkey_owner`) and has granted this agent an on-chain allowance (Safe Allowance Module), the agent spends within it without a touch; the module enforces the cap.
459
+
460
+ ```typescript
461
+ const spend = await client.agents.spendFromPasskeySafe(agentId, safeId, {
462
+ to: "0xRecipient…",
463
+ amount: "10000000000000000", // base units (0.01 ETH)
464
+ // token: "0xUSDC…" // omit for the native token
465
+ });
466
+ console.log(spend.data.tx_hash, spend.data.remaining_after);
467
+ ```
468
+
441
469
  ### Agent-to-Agent Delegation
442
470
 
443
471
  Human-controlled authorization for inter-agent task delegation. Agents cannot delegate to other agents without an explicit delegation record created by a human.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1claw/sdk",
3
- "version": "0.61.17",
3
+ "version": "0.61.18",
4
4
  "description": "TypeScript SDK for 1Claw Vault \u2014 secret management for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",