@bankofbots/skill 0.0.1 → 0.2.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
@@ -1,330 +1,53 @@
1
1
  ---
2
2
  name: bankofbots
3
- description: Autonomous agent banking — wallets, payments, transfers, and spend policies via the Bank of Bots CLI
3
+ description: >
4
+ Trust scoring for AI agents. Log transactions and submit payment proofs to
5
+ build a verifiable BOB Score — a trust score (think FICO but for AI Agents)
6
+ that other agents and services can check to give them confidence before doing
7
+ business with yours.
8
+ metadata: '{"openclaw":{"requires":{"env":["BOB_API_KEY","BOB_AGENT_ID"]},"optional":{"env":["BOB_API_URL"]},"primaryEnv":"BOB_API_KEY"}}'
4
9
  ---
5
10
 
6
- You have access to `bob`, the Bank of Bots CLI for managing agent wallets, payments, and transactions. Requires `BOB_API_KEY` environment variable 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.
7
12
 
8
- All commands output structured JSON with an `ok` field and `next_actions` that suggest follow-up commands.
13
+ **Rails: `lightning` and `onchain` only. BTC only. All amounts in satoshis.**
9
14
 
10
- **Supported rails: `lightning` and `onchain` (BTC only).** USD and USDC rails are not available.
11
-
12
- ## Core concepts
13
-
14
- - **Agent**: An AI agent with its own identity, wallets, and spending policies
15
- - **Wallet**: Holds a BTC balance on a specific rail (lightning or onchain)
16
- - **Policy**: Spend limits, rate limits, and kill switches that constrain agent behavior
17
- - **Transaction**: A record of money moving in or out of a wallet
18
- - **Service Gate**: A priced action that callers unlock by presenting a completed payment intent
19
-
20
- ## Commands
21
-
22
- ### Check your identity
23
-
24
- ```bash
25
- bob auth me
26
- ```
27
-
28
- Returns your role (agent or operator), identity details, and role-aware `next_actions`.
29
-
30
- ### Agent details and wallet balances
31
-
32
- ```bash
33
- bob agent get <agent-id>
34
- ```
35
-
36
- Response includes a `wallets` array with each wallet's balance, currency, rail, and status.
37
-
38
- ### Wallet management
39
-
40
- ```bash
41
- # List wallets for an agent
42
- bob wallet list <agent-id>
43
-
44
- # Get/set wallet budget (sats)
45
- bob wallet budget get <agent-id> --wallet-id <id>
46
- bob wallet budget set <agent-id> --wallet-id <id> --amount <sats>
47
- ```
48
-
49
- `bob wallet list` includes a `bob_address` field when a default agent address is available.
50
-
51
- ### One-shot send (auto-quote + execute)
52
-
53
- ```bash
54
- bob send <agent-id> <destination> --amount <sats> [--currency BTC]
55
- ```
56
-
57
- Destination is auto-detected:
58
- - `jade@bankofbots.ai` → routes as `bob_address` (BTC)
59
- - `lnbc...` → Lightning invoice
60
- - `bc1.../tb1...` → on-chain BTC address
61
-
62
- | Flag | Description |
63
- |---|---|
64
- | `--amount` | Required. Satoshis |
65
- | `--priority` | cheapest, fastest, or balanced (default: balanced) |
66
- | `--description` | Optional payment note |
67
- | `--max-fee` | Maximum acceptable fee in sats |
68
- | `--rail` | Pin to lightning or onchain |
69
- | `--destination-type` | Override auto-detection: `raw` or `bob_address` |
70
-
71
- Quotes then executes in one step. Returns `intent_id`, `payment_id`, and `quote_summary`. On failure, `next_actions` includes exact recovery commands.
72
-
73
- ### CLI config introspection
74
-
75
- ```bash
76
- # Show active api_url, platform, config file path and source (env/config/default)
77
- bob config show
78
-
79
- # Update a single config value without re-init
80
- bob config set api-url <url>
81
- bob config set platform <generic|openclaw|claude>
82
- ```
83
-
84
- ### Record a transaction (spend from your wallet)
85
-
86
- ```bash
87
- bob tx record <agent-id> --amount <sats> --currency BTC
88
- ```
89
-
90
- | Flag | Description |
91
- |---|---|
92
- | `--amount` | Required. Satoshis |
93
- | `--currency` | BTC (only supported currency) |
94
- | `--rail` | lightning or onchain (default: auto) |
95
- | `--endpoint` | Target endpoint or merchant identifier |
96
- | `--wallet-id` | Specific wallet to debit (auto-selected if omitted) |
97
-
98
- ### Transfer BTC to another agent
99
-
100
- ```bash
101
- bob tx transfer <from-agent-id> --to-agent-id <to-agent-id> --amount <sats> --currency BTC
102
- ```
103
-
104
- | Flag | Description |
105
- |---|---|
106
- | `--to-agent-id` | Required. Destination agent ID |
107
- | `--amount` | Required. Satoshis |
108
- | `--description` | Optional note |
109
-
110
- ### Quote and execute payments (intent workflow)
111
-
112
- The intent workflow quotes routes before executing, giving you visibility into fees, ETAs, and available rails.
113
-
114
- ```bash
115
- # Quote routes for a payment
116
- bob intent quote <agent-id> --amount <sats> --destination-type raw --destination-ref <lnbc...|bc1...>
117
-
118
- # Execute a quoted intent (uses best quote by default)
119
- bob intent execute <agent-id> <intent-id> [--quote-id <id>]
120
-
121
- # Check intent status and route details
122
- bob intent get <agent-id> <intent-id>
123
-
124
- # List recent intents
125
- bob intent list <agent-id>
126
- ```
127
-
128
- | Flag | Description |
129
- |---|---|
130
- | `--amount` | Required. Satoshis |
131
- | `--destination-type` | `raw` or `bob_address` |
132
- | `--destination-ref` | Lightning invoice, on-chain address, or `alias@bankofbots.ai` |
133
- | `--priority` | `cheapest`, `fastest`, or `balanced` (default: balanced) |
134
- | `--execution-mode` | `auto` or `pinned` (default: auto) |
135
- | `--rail` | Pin to `lightning` or `onchain` |
136
- | `--wallet-id` | Pin to a specific wallet |
137
- | `--max-fee` | Maximum acceptable fee in sats |
138
-
139
- ### Non-custodial proof submission
140
-
141
- Submit proof of BTC payment to verify settlement and build your BOB Score:
142
-
143
- ```bash
144
- # On-chain transaction proof
145
- bob intent submit-proof <agent-id> <intent-id> --txid <txid>
146
-
147
- # Lightning payment hash proof
148
- bob intent submit-proof <agent-id> <intent-id> --payment-hash <hash>
149
-
150
- # Lightning preimage proof (strongest verification)
151
- bob intent submit-proof <agent-id> <intent-id> --preimage <hex> --proof-ref <payment-hash>
152
-
153
- # With optional BOLT11 invoice for amount verification
154
- bob intent submit-proof <agent-id> <intent-id> --preimage <hex> --proof-ref <payment-hash> --invoice <lnbc...>
155
-
156
- # Historical proof import for credit building
157
- bob agent credit-import <agent-id> --preimage <hex> --proof-ref <payment-hash> --amount <sats> --direction inbound --invoice <lnbc...>
158
- ```
159
-
160
- | Proof Type | Description |
161
- |---|---|
162
- | `btc_onchain_tx` | On-chain transaction ID |
163
- | `btc_lightning_payment_hash` | Lightning payment hash |
164
- | `btc_lightning_preimage` | Lightning preimage (SHA256 verified against payment hash, strongest proof) |
165
-
166
- ### Query history
167
-
168
- ```bash
169
- # Transactions
170
- bob tx list <agent-id> --status complete --direction outbound --limit 10
171
-
172
- # Transfers
173
- bob tx transfers <agent-id>
174
-
175
- # Spend summary
176
- bob spend list <agent-id>
177
- ```
178
-
179
- ### View policies
180
-
181
- ```bash
182
- bob policy list <agent-id>
183
- ```
184
-
185
- ### Agent credit score and history
15
+ ## Setup
186
16
 
187
17
  ```bash
188
- # View credit score, tier, and effective policy limits
189
- bob agent credit <agent-id>
190
-
191
- # View credit event timeline
192
- bob agent credit-events <agent-id> [--limit 50] [--offset 0]
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
193
24
  ```
194
25
 
195
- 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.
196
-
197
- ### Agent routing profile (autonomous rail preference)
26
+ ## Core commands
198
27
 
199
28
  ```bash
200
- # Inspect current weighting and preferred rail order
201
- bob agent routing-profile <agent-id>
202
-
203
- # Update balanced-scoring weights + preferred rails
204
- bob agent routing-profile set <agent-id> \
205
- --cost-weight 0.6 \
206
- --eta-weight 0.4 \
207
- --reliability-weight 0.2 \
208
- --liquidity-weight 0.1 \
209
- --preferred-btc lightning,onchain
210
- ```
211
-
212
- Routing profile influences quote ranking for `priority=balanced` and is applied during intent quote + execute.
29
+ # Send BTC (one-shot: auto-quotes and executes)
30
+ bob send $BOB_AGENT_ID <destination> --amount <sats>
213
31
 
214
- ### Agent webhooks and event stream
32
+ # Submit payment proof (builds BOB Score)
33
+ bob intent submit-proof $BOB_AGENT_ID <intent-id> --preimage <hex> --proof-ref <payment-hash>
215
34
 
216
- ```bash
217
- # Create/list/get/update/delete webhooks scoped to one agent
218
- bob agent webhooks create <agent-id> --url https://example.com/hook --events payment_intent.complete,payment.failed
219
- bob agent webhooks list <agent-id>
220
- bob agent webhooks get <agent-id> <webhook-id>
221
- bob agent webhooks update <agent-id> <webhook-id> --active true
222
- bob agent webhooks delete <agent-id> <webhook-id>
223
-
224
- # Pull recent agent events (paginated)
225
- bob agent events <agent-id> --limit 30 --offset 0
35
+ # Check score and history
36
+ bob agent credit $BOB_AGENT_ID
37
+ bob agent credit-events $BOB_AGENT_ID
226
38
  ```
227
39
 
228
- Agent-scoped webhooks/events include payment intent lifecycle events (`quoted`, `executing`, `submitted`, `complete`, `failed`) so agents can react asynchronously without polling.
229
-
230
- ### Operator credit controls
231
-
232
- ```bash
233
- # View current operator credit posture
234
- bob operator credit summary
235
-
236
- # Force snapshot recompute
237
- bob operator credit refresh
238
-
239
- # Toggle runtime enforcement of credit tier multipliers
240
- bob operator credit enforcement set --enabled=true
241
- ```
242
-
243
- ### Operator payment addresses
244
-
245
- ```bash
246
- # Create and inspect address aliases
247
- bob address create --handle ops
248
- bob address list
249
-
250
- # Bind destination endpoints
251
- bob address add-endpoint <address-id> --currency BTC --rail lightning --destination-type raw --destination-ref <lnbc...>
252
-
253
- # Enable/disable a bound endpoint
254
- bob address set-endpoint-status <address-id> <endpoint-id> --status disabled
255
-
256
- # Resolve live routing capabilities
257
- bob address resolve --address ops@bankofbots.ai --currency BTC
258
- ```
259
-
260
- ### Service gates (pay-to-access)
261
-
262
- ```bash
263
- # Create a priced gate (agent must have a payment address)
264
- bob gate create <agent-id> --name "premium-api" --price 1000 --currency BTC
265
-
266
- # List active gates
267
- bob gate list <agent-id>
268
-
269
- # Get gate details
270
- bob gate get <agent-id> <gate-id>
271
-
272
- # Disable/re-enable a gate
273
- bob gate update <agent-id> <gate-id> --status disabled
274
-
275
- # Unlock a gate (caller presents a completed payment intent targeting the gate owner)
276
- bob gate unlock <owner-agent-id> <gate-id> --intent-id <payment-intent-id>
277
-
278
- # View unlock history
279
- bob gate unlocks <agent-id> <gate-id>
280
-
281
- # List gates this agent has unlocked as a caller
282
- bob gate my-unlocks <agent-id>
283
-
284
- # Discover another agent's active gates
285
- bob gate discover <agent-id>
286
- ```
287
-
288
- | Flag | Description |
289
- |---|---|
290
- | `--name` | Required. Human-readable gate name |
291
- | `--price` | Required. Minimum payment amount in sats |
292
- | `--currency` | BTC |
293
- | `--intent-id` | Required for unlock. Completed payment intent ID |
294
- | `--status` | For update: active or disabled |
295
-
296
- ## Output format
297
-
298
- Every command returns JSON with this structure:
299
-
300
- ```json
301
- {
302
- "ok": true,
303
- "command": "bob tx record",
304
- "data": { ... },
305
- "next_actions": [
306
- {
307
- "command": "bob tx list <agent-id>",
308
- "description": "View transaction history"
309
- }
310
- ]
311
- }
312
- ```
313
-
314
- Always check `ok` before using `data`. When `ok` is false, `data.error` contains the error message and `next_actions` provides recovery suggestions.
315
-
316
- ## Error recovery
317
-
318
- When `ok` is false, `next_actions` provides context-aware recovery suggestions. Key patterns:
40
+ ## Rules
319
41
 
320
- 1. **Kill switch active**: STOP all transactions immediately. Run `bob policy list <agent-id>` to confirm.
321
- 2. **Spend/rate limit exceeded**: Check `bob spend list <agent-id>` to see current usage vs limits.
322
- 3. **Insufficient balance**: Check `bob wallet list <agent-id>` to see available funds.
323
- 4. **403 Forbidden**: Check `bob auth me` to verify your identity and role.
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.
324
47
 
325
- ## Important rules
48
+ ## Reference files
326
49
 
327
- 1. **Amounts** are always in satoshis (BTC).
328
- 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.
329
- 3. **Kill switch**: If you receive a kill switch denial, stop all transaction attempts immediately. The operator has frozen your spending.
330
- 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.0.1",
3
+ "version": "0.2.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,49 @@
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 (strongest → weakest)
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
+ | `btc_lightning_payment_hash` | `--payment-hash <hash>` | Payment hash known (weaker — hash alone doesn't prove payment) |
12
+
13
+ ## Submit proof against a payment intent
14
+
15
+ ```bash
16
+ # On-chain
17
+ bob intent submit-proof <agent-id> <intent-id> --txid <txid>
18
+
19
+ # Lightning payment hash
20
+ bob intent submit-proof <agent-id> <intent-id> --payment-hash <hash>
21
+
22
+ # Lightning preimage (strongest — add invoice for amount verification)
23
+ bob intent submit-proof <agent-id> <intent-id> \
24
+ --preimage <hex> \
25
+ --proof-ref <payment-hash> \
26
+ [--invoice <lnbc...>]
27
+ ```
28
+
29
+ ## Import historical proofs (credit building)
30
+
31
+ For payments that happened before BOB tracking was set up:
32
+
33
+ ```bash
34
+ bob agent credit-import <agent-id> \
35
+ --preimage <hex> \
36
+ --proof-ref <payment-hash> \
37
+ --amount <sats> \
38
+ --direction inbound \
39
+ --invoice <lnbc...>
40
+ ```
41
+
42
+ Historical imports are capped — they count toward score but cannot substitute for ongoing payment history.
43
+
44
+ ## How proofs affect BOB Score
45
+
46
+ - Verified proofs emit `payment.proof_imported.btc` credit events
47
+ - Preimage proofs bound to a BoP (Bound Ownership Proof) attestation earn the highest confidence tier
48
+ - Amount thresholds: floor is 1,000 sats; $10+ payments earn 2× credit delta; $100+ earn 3×
49
+ - 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
+ ```