@bankofbots/skill 0.1.0 → 0.3.0

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.
package/SKILL.md CHANGED
@@ -5,339 +5,49 @@ description: >
5
5
  build a verifiable BOB Score — a trust score (think FICO but for AI Agents)
6
6
  that other agents and services can check to give them confidence before doing
7
7
  business with yours.
8
- metadata: '{"openclaw":{"requires":{"env":["BOB_API_KEY","BOB_AGENT_ID"]},"primaryEnv":"BOB_API_KEY"}}'
8
+ metadata: '{"openclaw":{"requires":{"env":["BOB_API_KEY","BOB_AGENT_ID"]},"optional":{"env":["BOB_API_URL"]},"primaryEnv":"BOB_API_KEY"}}'
9
9
  ---
10
10
 
11
- You have access to `bob`, the Bank of Bots CLI for managing agent wallets, payments, and transactions. Requires `BOB_API_KEY` and `BOB_AGENT_ID` environment variables to be set. Optionally set `BOB_API_URL` to point to a custom backend.
11
+ You are a BOB (Bank of Bots) agent. You use `bob`, the Bank of Bots CLI, to manage wallets, send BTC payments, and build your BOB Score through verified payment history.
12
12
 
13
- All commands output structured JSON with an `ok` field and `next_actions` that suggest follow-up commands.
14
-
15
- **Supported rails: `lightning` and `onchain` (BTC only).** USD and USDC rails are not available.
13
+ **Rails: `lightning` and `onchain` only. BTC only. All amounts in satoshis.**
16
14
 
17
15
  ## Setup
18
16
 
19
- Download the latest `bob` binary from **https://github.com/bankofbots/bob-cli/releases/latest** and place it on your PATH. Then set:
20
- - `BOB_API_KEY` — your agent API key
21
- - `BOB_AGENT_ID` — your agent ID
22
- - `BOB_API_URL` — `https://api.bankofbots.ai/api/v1`
23
-
24
- ## Core concepts
25
-
26
- - **Agent**: An AI agent with its own identity, wallets, and spending policies
27
- - **Wallet**: Holds a BTC balance on a specific rail (lightning or onchain)
28
- - **Policy**: Spend limits, rate limits, and kill switches that constrain agent behavior
29
- - **Transaction**: A record of money moving in or out of a wallet
30
- - **Service Gate**: A priced action that callers unlock by presenting a completed payment intent
31
-
32
- ## Commands
33
-
34
- ### Check your identity
35
-
36
- ```bash
37
- bob auth me
38
- ```
39
-
40
- Returns your role (agent or operator), identity details, and role-aware `next_actions`.
41
-
42
- ### Agent details and wallet balances
43
-
44
- ```bash
45
- bob agent get <agent-id>
46
- ```
47
-
48
- Response includes a `wallets` array with each wallet's balance, currency, rail, and status.
49
-
50
- ### Wallet management
51
-
52
- ```bash
53
- # List wallets for an agent
54
- bob wallet list <agent-id>
55
-
56
- # Get/set wallet budget (sats)
57
- bob wallet budget get <agent-id> --wallet-id <id>
58
- bob wallet budget set <agent-id> --wallet-id <id> --amount <sats>
59
- ```
60
-
61
- `bob wallet list` includes a `bob_address` field when a default agent address is available.
62
-
63
- ### One-shot send (auto-quote + execute)
64
-
65
- ```bash
66
- bob send <agent-id> <destination> --amount <sats> [--currency BTC]
67
- ```
68
-
69
- Destination is auto-detected:
70
- - `jade@bankofbots.ai` → routes as `bob_address` (BTC)
71
- - `lnbc...` → Lightning invoice
72
- - `bc1.../tb1...` → on-chain BTC address
73
-
74
- | Flag | Description |
75
- |---|---|
76
- | `--amount` | Required. Satoshis |
77
- | `--priority` | cheapest, fastest, or balanced (default: balanced) |
78
- | `--description` | Optional payment note |
79
- | `--max-fee` | Maximum acceptable fee in sats |
80
- | `--rail` | Pin to lightning or onchain |
81
- | `--destination-type` | Override auto-detection: `raw` or `bob_address` |
82
-
83
- Quotes then executes in one step. Returns `intent_id`, `payment_id`, and `quote_summary`. On failure, `next_actions` includes exact recovery commands.
84
-
85
- ### CLI config introspection
86
-
87
- ```bash
88
- # Show active api_url, platform, config file path and source (env/config/default)
89
- bob config show
90
-
91
- # Update a single config value without re-init
92
- bob config set api-url <url>
93
- bob config set platform <generic|openclaw|claude>
94
- ```
95
-
96
- ### Record a transaction (spend from your wallet)
97
-
98
- ```bash
99
- bob tx record <agent-id> --amount <sats> --currency BTC
100
- ```
101
-
102
- | Flag | Description |
103
- |---|---|
104
- | `--amount` | Required. Satoshis |
105
- | `--currency` | BTC (only supported currency) |
106
- | `--rail` | lightning or onchain (default: auto) |
107
- | `--endpoint` | Target endpoint or merchant identifier |
108
- | `--wallet-id` | Specific wallet to debit (auto-selected if omitted) |
109
-
110
- ### Transfer BTC to another agent
111
-
112
- ```bash
113
- bob tx transfer <from-agent-id> --to-agent-id <to-agent-id> --amount <sats> --currency BTC
114
- ```
115
-
116
- | Flag | Description |
117
- |---|---|
118
- | `--to-agent-id` | Required. Destination agent ID |
119
- | `--amount` | Required. Satoshis |
120
- | `--description` | Optional note |
121
-
122
- ### Quote and execute payments (intent workflow)
123
-
124
- The intent workflow quotes routes before executing, giving you visibility into fees, ETAs, and available rails.
125
-
126
- ```bash
127
- # Quote routes for a payment
128
- bob intent quote <agent-id> --amount <sats> --destination-type raw --destination-ref <lnbc...|bc1...>
129
-
130
- # Execute a quoted intent (uses best quote by default)
131
- bob intent execute <agent-id> <intent-id> [--quote-id <id>]
132
-
133
- # Check intent status and route details
134
- bob intent get <agent-id> <intent-id>
135
-
136
- # List recent intents
137
- bob intent list <agent-id>
138
- ```
139
-
140
- | Flag | Description |
141
- |---|---|
142
- | `--amount` | Required. Satoshis |
143
- | `--destination-type` | `raw` or `bob_address` |
144
- | `--destination-ref` | Lightning invoice, on-chain address, or `alias@bankofbots.ai` |
145
- | `--priority` | `cheapest`, `fastest`, or `balanced` (default: balanced) |
146
- | `--execution-mode` | `auto` or `pinned` (default: auto) |
147
- | `--rail` | Pin to `lightning` or `onchain` |
148
- | `--wallet-id` | Pin to a specific wallet |
149
- | `--max-fee` | Maximum acceptable fee in sats |
150
-
151
- ### Non-custodial proof submission
152
-
153
- Submit proof of BTC payment to verify settlement and build your BOB Score:
154
-
155
- ```bash
156
- # On-chain transaction proof
157
- bob intent submit-proof <agent-id> <intent-id> --txid <txid>
158
-
159
- # Lightning payment hash proof
160
- bob intent submit-proof <agent-id> <intent-id> --payment-hash <hash>
161
-
162
- # Lightning preimage proof (strongest verification)
163
- bob intent submit-proof <agent-id> <intent-id> --preimage <hex> --proof-ref <payment-hash>
164
-
165
- # With optional BOLT11 invoice for amount verification
166
- bob intent submit-proof <agent-id> <intent-id> --preimage <hex> --proof-ref <payment-hash> --invoice <lnbc...>
167
-
168
- # Historical proof import for credit building
169
- bob agent credit-import <agent-id> --preimage <hex> --proof-ref <payment-hash> --amount <sats> --direction inbound --invoice <lnbc...>
170
- ```
171
-
172
- | Proof Type | Description |
173
- |---|---|
174
- | `btc_onchain_tx` | On-chain transaction ID |
175
- | `btc_lightning_payment_hash` | Lightning payment hash |
176
- | `btc_lightning_preimage` | Lightning preimage (SHA256 verified against payment hash, strongest proof) |
177
-
178
- ### Query history
179
-
180
- ```bash
181
- # Transactions
182
- bob tx list <agent-id> --status complete --direction outbound --limit 10
183
-
184
- # Transfers
185
- bob tx transfers <agent-id>
186
-
187
- # Spend summary
188
- bob spend list <agent-id>
189
- ```
190
-
191
- ### View policies
192
-
193
- ```bash
194
- bob policy list <agent-id>
195
- ```
196
-
197
- ### Agent credit score and history
198
-
199
- ```bash
200
- # View credit score, tier, and effective policy limits
201
- bob agent credit <agent-id>
202
-
203
- # View credit event timeline
204
- bob agent credit-events <agent-id> [--limit 50] [--offset 0]
205
- ```
206
-
207
- The BOB Score runs from 0–1000. New operators start at **350**. Tiers: **Legendary** (925+), **Elite** (800+), **Trusted** (650+, 1.5x limits), **Established** (500+, 1.2x limits), **Verified** (400+, 1.0x limits), **New** (300+, 1.0x limits), **Unverified** (150+, 0.6x limits), **Blacklisted** (0+, 0.6x limits). When credit tier enforcement is enabled, the tier multiplier adjusts spend and rate limits up or down from the base policy values.
208
-
209
- ### Agent routing profile (autonomous rail preference)
210
-
211
- ```bash
212
- # Inspect current weighting and preferred rail order
213
- bob agent routing-profile <agent-id>
214
-
215
- # Update balanced-scoring weights + preferred rails
216
- bob agent routing-profile set <agent-id> \
217
- --cost-weight 0.6 \
218
- --eta-weight 0.4 \
219
- --reliability-weight 0.2 \
220
- --liquidity-weight 0.1 \
221
- --preferred-btc lightning,onchain
222
- ```
223
-
224
- Routing profile influences quote ranking for `priority=balanced` and is applied during intent quote + execute.
225
-
226
- ### Agent webhooks and event stream
227
-
228
- ```bash
229
- # Create/list/get/update/delete webhooks scoped to one agent
230
- bob agent webhooks create <agent-id> --url https://example.com/hook --events payment_intent.complete,payment.failed
231
- bob agent webhooks list <agent-id>
232
- bob agent webhooks get <agent-id> <webhook-id>
233
- bob agent webhooks update <agent-id> <webhook-id> --active true
234
- bob agent webhooks delete <agent-id> <webhook-id>
235
-
236
- # Pull recent agent events (paginated)
237
- bob agent events <agent-id> --limit 30 --offset 0
238
- ```
239
-
240
- Agent-scoped webhooks/events include payment intent lifecycle events (`quoted`, `executing`, `submitted`, `complete`, `failed`) so agents can react asynchronously without polling.
241
-
242
- ### Operator credit controls
243
-
244
17
  ```bash
245
- # View current operator credit posture
246
- bob operator credit summary
247
-
248
- # Force snapshot recompute
249
- bob operator credit refresh
250
-
251
- # Toggle runtime enforcement of credit tier multipliers
252
- bob operator credit enforcement set --enabled=true
253
- ```
254
-
255
- ### Operator payment addresses
256
-
257
- ```bash
258
- # Create and inspect address aliases
259
- bob address create --handle ops
260
- bob address list
261
-
262
- # Bind destination endpoints
263
- bob address add-endpoint <address-id> --currency BTC --rail lightning --destination-type raw --destination-ref <lnbc...>
264
-
265
- # Enable/disable a bound endpoint
266
- bob address set-endpoint-status <address-id> <endpoint-id> --status disabled
267
-
268
- # Resolve live routing capabilities
269
- bob address resolve --address ops@bankofbots.ai --currency BTC
18
+ # Install: download bob binary from https://github.com/bankofbots/bob-cli/releases/latest
19
+ # Required env: BOB_API_KEY, BOB_AGENT_ID
20
+ # Optional env: BOB_API_URL (default: https://api.bankofbots.ai/api/v1)
21
+ bob auth me # verify connection
22
+ bob wallet list $BOB_AGENT_ID # check wallets and funding status
23
+ bob agent credit $BOB_AGENT_ID # check BOB Score
270
24
  ```
271
25
 
272
- ### Service gates (pay-to-access)
26
+ ## Core commands
273
27
 
274
28
  ```bash
275
- # Create a priced gate (agent must have a payment address)
276
- bob gate create <agent-id> --name "premium-api" --price 1000 --currency BTC
277
-
278
- # List active gates
279
- bob gate list <agent-id>
280
-
281
- # Get gate details
282
- bob gate get <agent-id> <gate-id>
283
-
284
- # Disable/re-enable a gate
285
- bob gate update <agent-id> <gate-id> --status disabled
286
-
287
- # Unlock a gate (caller presents a completed payment intent targeting the gate owner)
288
- bob gate unlock <owner-agent-id> <gate-id> --intent-id <payment-intent-id>
289
-
290
- # View unlock history
291
- bob gate unlocks <agent-id> <gate-id>
29
+ # Send BTC (one-shot: auto-quotes and executes)
30
+ bob send $BOB_AGENT_ID <destination> --amount <sats>
292
31
 
293
- # List gates this agent has unlocked as a caller
294
- bob gate my-unlocks <agent-id>
32
+ # Submit payment proof (builds BOB Score)
33
+ bob intent submit-proof $BOB_AGENT_ID <intent-id> --preimage <hex> --proof-ref <payment-hash>
295
34
 
296
- # Discover another agent's active gates
297
- bob gate discover <agent-id>
35
+ # Check score and history
36
+ bob agent credit $BOB_AGENT_ID
37
+ bob agent credit-events $BOB_AGENT_ID
298
38
  ```
299
39
 
300
- | Flag | Description |
301
- |---|---|
302
- | `--name` | Required. Human-readable gate name |
303
- | `--price` | Required. Minimum payment amount in sats |
304
- | `--currency` | BTC |
305
- | `--intent-id` | Required for unlock. Completed payment intent ID |
306
- | `--status` | For update: active or disabled |
307
-
308
- ## Output format
309
-
310
- Every command returns JSON with this structure:
311
-
312
- ```json
313
- {
314
- "ok": true,
315
- "command": "bob tx record",
316
- "data": { ... },
317
- "next_actions": [
318
- {
319
- "command": "bob tx list <agent-id>",
320
- "description": "View transaction history"
321
- }
322
- ]
323
- }
324
- ```
325
-
326
- Always check `ok` before using `data`. When `ok` is false, `data.error` contains the error message and `next_actions` provides recovery suggestions.
327
-
328
- ## Error recovery
329
-
330
- When `ok` is false, `next_actions` provides context-aware recovery suggestions. Key patterns:
40
+ ## Rules
331
41
 
332
- 1. **Kill switch active**: STOP all transactions immediately. Run `bob policy list <agent-id>` to confirm.
333
- 2. **Spend/rate limit exceeded**: Check `bob spend list <agent-id>` to see current usage vs limits.
334
- 3. **Insufficient balance**: Check `bob wallet list <agent-id>` to see available funds.
335
- 4. **403 Forbidden**: Check `bob auth me` to verify your identity and role.
336
- 5. **409 Conflict**: Resource already exists (e.g., agent already registered). Do not retry run `bob agent get <agent-id>` to confirm current state.
42
+ 1. **Always check `ok`** before using `data`. On failure, read `data.error` and follow `next_actions`.
43
+ 2. **Kill switch**: If denied with kill switch reason, stop all transactions immediately. Do not retry.
44
+ 3. **409 Conflict**: Do not retry resource already exists. Inspect current state first.
45
+ 4. **`tx record`** debits wallet balance only run when wallet has sufficient funds.
46
+ 5. **Never invent amounts, txids, or payment hashes.** Use only values returned by the API or provided by the user.
337
47
 
338
- ## Important rules
48
+ ## Reference files
339
49
 
340
- 1. **Amounts** are always in satoshis (BTC).
341
- 2. **Policies** set by your operator constrain your spending. If a transaction is denied, `data.error` explains why. Do not retry denied transactions without changing the parameters.
342
- 3. **Kill switch**: If you receive a kill switch denial, stop all transaction attempts immediately. The operator has frozen your spending.
343
- 4. **next_actions**: Every response includes suggested follow-up commands. Use them to discover what to do next.
50
+ - [Full command reference](references/commands.md) all commands and flags
51
+ - [Proof submission](references/proofs.md) proof types, submission flow, historical import
52
+ - [BOB Score & tiers](references/scoring.md) tiers, credit events, how to build score
53
+ - [Error recovery](references/errors.md) hard stops, recoverable errors, output format
package/index.js CHANGED
@@ -2,9 +2,11 @@ const fs = require("fs");
2
2
  const path = require("path");
3
3
 
4
4
  const skillPath = path.join(__dirname, "SKILL.md");
5
+ const referencesDir = path.join(__dirname, "references");
5
6
 
6
7
  module.exports = {
7
8
  skillPath,
9
+ referencesDir,
8
10
  get content() {
9
11
  return fs.readFileSync(skillPath, "utf8");
10
12
  },
package/install.js CHANGED
@@ -9,9 +9,11 @@ const skillPath = path.join(__dirname, "SKILL.md");
9
9
 
10
10
  console.log("\n@bankofbots/skill installed.");
11
11
  console.log("Skill file: " + skillPath);
12
- console.log("\nTo activate for your platform, copy SKILL.md to:");
13
- console.log(" Claude Code : .claude/skills/bankofbots/SKILL.md");
14
- console.log(" OpenClaw : ~/.openclaw/skills/bankofbots/SKILL.md");
12
+ console.log("\nTo activate for your platform, copy the skill directory to:");
13
+ console.log(" Claude Code : .claude/skills/bankofbots/");
14
+ console.log(" OpenClaw : ~/.openclaw/skills/bankofbots/");
15
+ console.log("\nQuick copy (from your project root):");
16
+ console.log(" cp -r node_modules/@bankofbots/skill/SKILL.md node_modules/@bankofbots/skill/references .claude/skills/bankofbots/");
15
17
  console.log("\nOr read it programmatically:");
16
- console.log(' require("@bankofbots/skill") // returns { skillPath, content }');
18
+ console.log(' require("@bankofbots/skill") // returns { skillPath, referencesDir, content }');
17
19
  console.log("");
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@bankofbots/skill",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Bank of Bots skill file for AI agents (Claude Code, OpenClaw, and compatible platforms)",
5
5
  "main": "index.js",
6
6
  "files": [
7
7
  "SKILL.md",
8
+ "references/",
8
9
  "README.md",
9
10
  "index.js",
10
11
  "install.js"
@@ -0,0 +1,123 @@
1
+ # BOB CLI — Full Command Reference
2
+
3
+ ## Identity
4
+
5
+ ```bash
6
+ bob auth me # your role, agent/operator ID, next_actions
7
+ bob config show # active api_url, platform, config file path
8
+ bob config set api-url <url>
9
+ bob config set platform <generic|openclaw|claude>
10
+ ```
11
+
12
+ ## Agent
13
+
14
+ ```bash
15
+ bob agent get <agent-id> # details + wallets array with balances
16
+ bob agent credit <agent-id> # BOB Score, tier, effective policy limits
17
+ bob agent credit-events <agent-id> [--limit 50] [--offset 0]
18
+ bob agent routing-profile <agent-id>
19
+ bob agent routing-profile set <agent-id> \
20
+ --cost-weight 0.6 --eta-weight 0.4 \
21
+ --reliability-weight 0.2 --liquidity-weight 0.1 \
22
+ --preferred-btc lightning,onchain
23
+ ```
24
+
25
+ ## Wallets
26
+
27
+ ```bash
28
+ bob wallet list <agent-id> # balances, rails, status; includes bob_address
29
+ bob wallet budget get <agent-id> --wallet-id <id>
30
+ bob wallet budget set <agent-id> --wallet-id <id> --amount <sats>
31
+ ```
32
+
33
+ ## Sending (one-shot)
34
+
35
+ ```bash
36
+ bob send <agent-id> <destination> --amount <sats>
37
+ ```
38
+
39
+ Destination auto-detected: `jade@bankofbots.ai` → bob_address, `lnbc...` → Lightning, `bc1...` → onchain.
40
+
41
+ | Flag | Description |
42
+ |---|---|
43
+ | `--amount` | Required. Satoshis |
44
+ | `--priority` | cheapest, fastest, balanced (default: balanced) |
45
+ | `--description` | Optional payment note |
46
+ | `--max-fee` | Max fee in sats |
47
+ | `--rail` | Pin to lightning or onchain |
48
+ | `--destination-type` | Override: raw or bob_address |
49
+
50
+ ## Intent workflow (quote → inspect → execute)
51
+
52
+ ```bash
53
+ bob intent quote <agent-id> --amount <sats> --destination-type raw --destination-ref <dest>
54
+ bob intent execute <agent-id> <intent-id> [--quote-id <id>]
55
+ bob intent get <agent-id> <intent-id>
56
+ bob intent list <agent-id>
57
+ ```
58
+
59
+ | Flag | Description |
60
+ |---|---|
61
+ | `--amount` | Required. Satoshis |
62
+ | `--destination-type` | raw or bob_address |
63
+ | `--destination-ref` | Lightning invoice, onchain address, or alias@bankofbots.ai |
64
+ | `--priority` | cheapest, fastest, balanced |
65
+ | `--execution-mode` | auto or pinned |
66
+ | `--rail` | Pin to lightning or onchain |
67
+ | `--wallet-id` | Pin to specific wallet |
68
+ | `--max-fee` | Max fee in sats |
69
+
70
+ ## Transactions
71
+
72
+ ```bash
73
+ bob tx record <agent-id> --amount <sats> --currency BTC [--rail lightning|onchain] [--endpoint <url>]
74
+ bob tx list <agent-id> [--status complete] [--direction outbound] [--limit 10]
75
+ bob tx transfer <from-agent-id> --to-agent-id <to-id> --amount <sats> --currency BTC
76
+ bob tx transfers <agent-id>
77
+ bob spend list <agent-id>
78
+ ```
79
+
80
+ `tx record` debits wallet balance — requires funded wallet.
81
+
82
+ ## Policies
83
+
84
+ ```bash
85
+ bob policy list <agent-id>
86
+ ```
87
+
88
+ ## Webhooks & events
89
+
90
+ ```bash
91
+ bob agent webhooks create <agent-id> --url <url> --events payment_intent.complete,payment.failed
92
+ bob agent webhooks list <agent-id>
93
+ bob agent webhooks get <agent-id> <webhook-id>
94
+ bob agent webhooks update <agent-id> <webhook-id> --active true
95
+ bob agent webhooks delete <agent-id> <webhook-id>
96
+ bob agent events <agent-id> [--limit 30] [--offset 0]
97
+ ```
98
+
99
+ ## Service gates
100
+
101
+ ```bash
102
+ bob gate create <agent-id> --name "premium-api" --price 1000 --currency BTC
103
+ bob gate list <agent-id>
104
+ bob gate get <agent-id> <gate-id>
105
+ bob gate update <agent-id> <gate-id> --status disabled
106
+ bob gate unlock <owner-agent-id> <gate-id> --intent-id <intent-id>
107
+ bob gate unlocks <agent-id> <gate-id>
108
+ bob gate my-unlocks <agent-id>
109
+ bob gate discover <agent-id>
110
+ ```
111
+
112
+ ## Operator commands
113
+
114
+ ```bash
115
+ bob operator credit summary
116
+ bob operator credit refresh
117
+ bob operator credit enforcement set --enabled=true
118
+ bob address create --handle ops
119
+ bob address list
120
+ bob address add-endpoint <address-id> --currency BTC --rail lightning --destination-type raw --destination-ref <dest>
121
+ bob address set-endpoint-status <address-id> <endpoint-id> --status disabled
122
+ bob address resolve --address ops@bankofbots.ai --currency BTC
123
+ ```
@@ -0,0 +1,38 @@
1
+ # BOB CLI — Error Recovery
2
+
3
+ Every failed command returns `ok: false` with `data.error` and `next_actions`. Always follow `next_actions` before retrying.
4
+
5
+ ## Hard stops — do not retry
6
+
7
+ | Error | Action |
8
+ |---|---|
9
+ | Kill switch active | **STOP all transactions immediately.** Run `bob policy list <agent-id>` to confirm. Do not retry until operator lifts the freeze. |
10
+ | 403 Forbidden | Run `bob auth me`. Key may be invalid or agent not approved. |
11
+ | Policy violation (tx denied) | Do not retry with same parameters. Read `data.error` — change amount, endpoint, or rail. |
12
+
13
+ ## Recoverable errors
14
+
15
+ | Error | Action |
16
+ |---|---|
17
+ | Insufficient balance | Run `bob wallet list <agent-id>` to check available funds. Wait for incoming payment or ask operator to fund. |
18
+ | Spend/rate limit exceeded | Run `bob spend list <agent-id>` to see usage vs limits. Wait for window reset or request limit increase. |
19
+ | 409 Conflict | Resource already exists. Do not retry — run `bob agent get <agent-id>` or `bob intent get` to confirm current state. |
20
+ | Wallet not provisioned | Agent has no wallet for requested currency/rail. Contact operator to provision. |
21
+ | Wallet not ready | Wallet exists but is pending. Run `bob wallet list <agent-id>` and wait for status=ready. |
22
+ | Lightning invoice expired | Re-request a fresh invoice from the payee and retry. |
23
+ | Proof already submitted | Duplicate proof ref — already counted. Check `bob agent credit-events`. |
24
+
25
+ ## Output format
26
+
27
+ ```json
28
+ {
29
+ "ok": true | false,
30
+ "command": "bob <subcommand>",
31
+ "data": { ... },
32
+ "next_actions": [
33
+ { "command": "bob ...", "description": "..." }
34
+ ]
35
+ }
36
+ ```
37
+
38
+ `ok: false` → `data.error` has the reason. `next_actions` always present — execute them in order.
@@ -0,0 +1,45 @@
1
+ # BOB Score — Proof Submission
2
+
3
+ Submitting payment proofs verifies settlement on-chain and awards BOB Score credit. Stronger proof types earn more credit.
4
+
5
+ ## Proof types
6
+
7
+ | Type | Command flag | What it proves |
8
+ |---|---|---|
9
+ | `btc_lightning_preimage` | `--preimage <hex> --proof-ref <payment-hash>` | SHA256(preimage) == payment hash — cryptographically irrefutable |
10
+ | `btc_onchain_tx` | `--txid <txid>` | On-chain transaction confirmed |
11
+
12
+ ## Submit proof against a payment intent
13
+
14
+ ```bash
15
+ # On-chain
16
+ bob intent submit-proof <agent-id> <intent-id> --txid <txid>
17
+
18
+ # Lightning preimage (add invoice for amount verification)
19
+ bob intent submit-proof <agent-id> <intent-id> \
20
+ --preimage <hex> \
21
+ --proof-ref <payment-hash> \
22
+ [--invoice <lnbc...>]
23
+ ```
24
+
25
+ ## Import historical proofs (credit building)
26
+
27
+ For payments that happened before BOB tracking was set up:
28
+
29
+ ```bash
30
+ bob agent credit-import <agent-id> \
31
+ --preimage <hex> \
32
+ --proof-ref <payment-hash> \
33
+ --amount <sats> \
34
+ --direction inbound \
35
+ --invoice <lnbc...>
36
+ ```
37
+
38
+ Historical imports are capped — they count toward score but cannot substitute for ongoing payment history.
39
+
40
+ ## How proofs affect BOB Score
41
+
42
+ - Verified proofs emit `payment.proof_imported.btc` credit events
43
+ - Preimage proofs bound to a BoP (Bound Ownership Proof) attestation earn the highest confidence tier
44
+ - Amount thresholds: floor is 1,000 sats; $10+ payments earn 2× credit delta; $100+ earn 3×
45
+ - Duplicate proof refs are deduplicated — submitting the same txid/hash twice doesn't double-count
@@ -0,0 +1,43 @@
1
+ # BOB Score — Tiers, Credit Events, and Building History
2
+
3
+ ## Score tiers (0–1000)
4
+
5
+ | Tier | Range | Spend multiplier |
6
+ |---|---|---|
7
+ | Legendary | 925+ | — |
8
+ | Elite | 800+ | — |
9
+ | Trusted | 650+ | 1.5× limits |
10
+ | Established | 500+ | 1.2× limits |
11
+ | Verified | 400+ | 1.0× limits |
12
+ | New | 300+ | 1.0× limits |
13
+ | Unverified | 150+ | 0.6× limits |
14
+ | Blacklisted | 0+ | 0.6× limits |
15
+
16
+ New agents start at 350 (Verified tier). Tier multipliers only apply when credit enforcement is enabled by the operator.
17
+
18
+ ## Credit events
19
+
20
+ Positive events:
21
+ - `agent.activated` +10 — first activation
22
+ - `tx.completed` +1 — successful spend
23
+ - `transfer.sent` / `transfer.received` +1 — agent-to-agent transfer
24
+ - `payment.proof_imported.btc` — varies by proof type and amount
25
+ - `wallet.funded` +1 — wallet received funds
26
+
27
+ Negative events:
28
+ - `tx.denied` −2 to −3 — policy violation or insufficient balance
29
+ - `payment.denied` −2 — payment blocked
30
+
31
+ ## How to build score fast
32
+
33
+ 1. **Submit payment proofs** — historical and ongoing Lightning/onchain proofs are the highest-signal path
34
+ 2. **Complete transactions** — every successful spend adds credit
35
+ 3. **Use preimage proofs** — strongest proof type, highest confidence tier
36
+ 4. **Consistent counterparty diversity** — varied endpoints/recipients signals healthy economic activity
37
+
38
+ ## Check your score
39
+
40
+ ```bash
41
+ bob agent credit <agent-id> # score, tier, multiplier, enforcement status
42
+ bob agent credit-events <agent-id> # full event timeline with deltas
43
+ ```