@keeperhub/wallet 0.1.3 → 0.1.4

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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: keeperhub-wallet
3
3
  description: Pay x402 and MPP 402 responses with a server-proxied Turnkey wallet. Auto-pays Base USDC + Tempo USDC.e. Includes check balance, fund wallet, and three-tier safety hook (auto/ask/block). Install with `npx @keeperhub/wallet skill install`.
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  license: Apache-2.0
6
6
  ---
7
7
 
@@ -46,7 +46,6 @@ Direct npm package invocation:
46
46
  - `npx @keeperhub/wallet add` — provision a new agentic wallet (no KeeperHub account required).
47
47
  - `npx @keeperhub/wallet info` — print `subOrgId` and `walletAddress` for the current wallet.
48
48
  - `npx @keeperhub/wallet fund` — print a Coinbase Onramp URL (Base USDC) and a Tempo deposit address.
49
- - `npx @keeperhub/wallet link` — link the current wallet to a KeeperHub account (requires `KH_SESSION_COOKIE`).
50
49
  - `npx @keeperhub/wallet balance` — print on-chain balance across Base USDC and Tempo USDC.e.
51
50
 
52
51
  Equivalent Go CLI wrappers (thin pass-through; delegate to the npm package):
@@ -54,19 +53,38 @@ Equivalent Go CLI wrappers (thin pass-through; delegate to the npm package):
54
53
  - `kh wallet add`
55
54
  - `kh wallet info`
56
55
  - `kh wallet fund`
57
- - `kh wallet link`
58
56
 
59
57
  ## Safety
60
58
 
61
59
  Three-tier PreToolUse hook enforced on every signing call:
62
60
 
63
- - **auto** — amount below `auto_approve_max_usd` signs without prompting.
64
- - **ask** — amount between `auto_approve_max_usd` and `ask_threshold_usd` surfaces an approval prompt in-chat.
65
- - **block** — amount above `block_threshold_usd` or contract not in `allowlisted_contracts` denies outright.
61
+ - **auto** — amount at or below `auto_approve_max_usd` signs without prompting.
62
+ - **ask** — amount above `auto_approve_max_usd` and at or below `block_threshold_usd` returns `{decision: "ask"}` so Claude Code surfaces an inline prompt in the agent chat.
63
+ - **block** — amount above `block_threshold_usd`, or a contract not in `allowlisted_contracts`, is denied without calling `/sign`.
66
64
 
67
65
  Thresholds live in `~/.keeperhub/safety.json` (chmod 0o644). The `npx @keeperhub/wallet skill install` path registers the `keeperhub-wallet-hook` PreToolUse entry in `~/.claude/settings.json` automatically. For agents without auto-registration support (Cursor, Cline, Windsurf, OpenCode), the installer prints a copy-paste notice with the hook invocation.
68
66
 
69
- The hook reads only `tool_input.amount`, `tool_input.unit`, and `tool_input.to` forged fields such as `trust-level hint`, `is-safe boolean`, or `admin-override bit` on the tool input are ignored by design (GUARD-05).
67
+ The hook reads only the payment-challenge fields `amount`, `unit`, and the asset contract address from the tool payload. Forged fields like `trust-level hint`, `is-safe boolean`, or `admin-override bit` are ignored by design (GUARD-05).
68
+
69
+ ### Default safety config
70
+
71
+ Used when `~/.keeperhub/safety.json` is absent:
72
+
73
+ ```json
74
+ {
75
+ "auto_approve_max_usd": 5,
76
+ "block_threshold_usd": 100,
77
+ "allowlisted_contracts": [
78
+ "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
79
+ "0x20C000000000000000000000B9537D11c60E8b50"
80
+ ]
81
+ }
82
+ ```
83
+
84
+ - `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` — **Base USDC**. Canonical Circle USDC contract on Base mainnet (chain id 8453). Used by x402 challenges from KeeperHub and any other x402-compliant service.
85
+ - `0x20C000000000000000000000B9537D11c60E8b50` — **Tempo USDC.e**. USDC bridge token on Tempo mainnet (chain id 4217). Used by MPP challenges from KeeperHub paid workflows that settle on Tempo.
86
+
87
+ These two addresses are the only tokens the hook will authorise by default. Adding other ERC-20 contracts to `allowlisted_contracts` allows your agent to sign against them too — at your own risk. To check any address, paste it into [BaseScan](https://basescan.org) (Base) or the Tempo block explorer; the contract page shows the token name, issuer, and whether it is verified.
70
88
 
71
89
  ## Storage
72
90