bsv-mcp 0.2.15 → 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/CHANGELOG.md +83 -10
- package/README.md +13 -13
- package/dist/app.html +483 -106
- package/dist/index.js +227181 -117395
- package/index.ts +463 -57
- package/package.json +24 -15
- package/prompts/bsvSdk/auth.ts +1 -1
- package/prompts/bsvSdk/cryptography.ts +1 -1
- package/prompts/bsvSdk/overview.ts +1 -1
- package/prompts/bsvSdk/primitives.ts +1 -1
- package/prompts/bsvSdk/script.ts +1 -1
- package/prompts/bsvSdk/transaction.ts +1 -1
- package/prompts/bsvSdk/wallet.ts +1 -1
- package/prompts/ordinals.ts +1 -1
- package/test-mcp-server.ts +26 -4
- package/tools/a2b/discover.ts +2 -2
- package/tools/bap/friend.ts +17 -24
- package/tools/bap/generate.test.ts +34 -32
- package/tools/bap/generate.ts +48 -43
- package/tools/bap/getCurrentAddress.ts +1 -3
- package/tools/bap/getId.test.ts +18 -10
- package/tools/bap/getId.ts +8 -6
- package/tools/bap/utils.ts +1 -1
- package/tools/bsocial/bmapReadPosts.ts +16 -2
- package/tools/bsocial/createPost.ts +21 -10
- package/tools/bsocial/readPosts.ts +10 -4
- package/tools/bsv/decodeTransaction.ts +1 -1
- package/tools/bsv/explore.ts +0 -4
- package/tools/bsv/getPrice.ts +1 -1
- package/tools/bsv/token.ts +14 -6
- package/tools/constants.ts +6 -2
- package/tools/index.ts +10 -10
- package/tools/mnee/getBalance.ts +1 -1
- package/tools/mnee/parseTx.ts +1 -1
- package/tools/mnee/sendMnee.ts +30 -8
- package/tools/ordinals/getInscription.ts +1 -3
- package/tools/ordinals/getTokenByIdOrTicker.ts +1 -3
- package/tools/ordinals/index.ts +4 -1
- package/tools/ordinals/marketListings.ts +1 -1
- package/tools/ordinals/marketSales.ts +1 -1
- package/tools/ordinals/searchInscriptions.ts +1 -1
- package/tools/utils/aip.ts +31 -22
- package/tools/utils/installAgentMaster.ts +8 -9
- package/tools/utils/toolRegistration.ts +21 -22
- package/tools/utils/transactionBuilder.ts +21 -14
- package/tools/wallet/a2bPublishMcp.ts +15 -5
- package/tools/wallet/brc100.ts +541 -310
- package/tools/wallet/cancelListing.ts +29 -37
- package/tools/wallet/createOrdinals.ts +43 -27
- package/tools/wallet/fetchPaymentUtxos.ts +7 -5
- package/tools/wallet/gatherCollectionInfo.ts +3 -5
- package/tools/wallet/getAddress.ts +1 -4
- package/tools/wallet/getBalance.ts +15 -15
- package/tools/wallet/{getBalanceDroplet.ts → getBalanceDroplit.ts} +6 -6
- package/tools/wallet/getBsv21Balances.ts +20 -14
- package/tools/wallet/getLockData.ts +11 -11
- package/tools/wallet/getOrdinals.ts +26 -20
- package/tools/wallet/integratedWallet.ts +55 -53
- package/tools/wallet/listOrdinal.ts +40 -39
- package/tools/wallet/listTokens.ts +18 -17
- package/tools/wallet/lockBsv.ts +36 -22
- package/tools/wallet/mintCollection.ts +15 -10
- package/tools/wallet/opnsDeregister.ts +29 -39
- package/tools/wallet/opnsRegister.ts +29 -39
- package/tools/wallet/purchaseListing.test.ts +27 -0
- package/tools/wallet/purchaseListing.ts +59 -40
- package/tools/wallet/refreshUtxos.ts +1 -1
- package/tools/wallet/schemas.ts +0 -13
- package/tools/wallet/sendAllBsv.ts +26 -20
- package/tools/wallet/sendBsv.ts +107 -0
- package/tools/wallet/setupDroplit.ts +157 -0
- package/tools/wallet/signBsm.ts +18 -18
- package/tools/wallet/sweepBsv.ts +48 -27
- package/tools/wallet/sweepBsv21.ts +42 -28
- package/tools/wallet/sweepOrdinals.ts +38 -26
- package/tools/wallet/tools.ts +11 -13
- package/tools/wallet/transactionHelper.ts +13 -5
- package/tools/wallet/transferOrdToken.ts +72 -84
- package/tools/wallet/unlockBsv.ts +23 -17
- package/tools/wallet/utxo.ts +1 -0
- package/tools/wallet/wallet.ts +1 -13
- package/tools/wallet/sendToAddress.ts +0 -74
- package/tools/wallet/setupDroplet.ts +0 -161
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,78 @@
|
|
|
1
1
|
# BSV MCP Server Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.0] - 2026-07-30
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- **Spending now requires approval.** `WalletPermissionsManager` was constructed
|
|
8
|
+
with `seekSpendingPermissions: false`, so no spend was ever gated. It is armed,
|
|
9
|
+
and a handler is bound to `onSpendingAuthorizationRequested`. Clients that
|
|
10
|
+
support elicitation prompt the user with the exact satoshi amount and itemised
|
|
11
|
+
line items; approval grants that amount ephemerally. **On a client without
|
|
12
|
+
elicitation support, spends are denied.** The refusal names the amount and the
|
|
13
|
+
reason. This is deliberate — a confirmation gate that silently passes when the
|
|
14
|
+
client cannot be asked is not a gate.
|
|
15
|
+
- `wallet_setupDroplit` is replaced by three tools —
|
|
16
|
+
`wallet_registerDroplitKey`, `wallet_createDroplitFaucet`, and
|
|
17
|
+
`wallet_checkDroplitFaucetStatus`. It had put three unrelated operations behind
|
|
18
|
+
an `action` enum, which made every argument conditional.
|
|
19
|
+
- `wallet_purchaseListing` no longer accepts `description`. The underlying
|
|
20
|
+
purchase actions have no parameter for it, so it was advertised and discarded.
|
|
21
|
+
|
|
22
|
+
### Security
|
|
23
|
+
|
|
24
|
+
- **`DISABLE_BROADCASTING` did nothing for the tools that move money.** The
|
|
25
|
+
startup banner printed `Broadcasting: Disabled` while the flag reached only the
|
|
26
|
+
BAP tools; `wallet_sendBsv`, `sendAllBsv`, the three sweeps, `purchaseListing`
|
|
27
|
+
and `sendMnee` never received it. Setting the variable, reading "Disabled", and
|
|
28
|
+
calling `wallet_sendBsv` moved real money. Sixteen transaction-submitting tools
|
|
29
|
+
now assert through one guard that reads the same environment variable the
|
|
30
|
+
banner reads.
|
|
31
|
+
- **WIF redaction covered one of three exit paths.** The sweep tools each defined
|
|
32
|
+
a sanitizer commented "sanitize WIF from any error output" and applied it only
|
|
33
|
+
in the `catch`. The `result.error` branch and the serialised success payload
|
|
34
|
+
both returned raw, on tools that take a raw WIF as an argument. One shared
|
|
35
|
+
redactor now covers all three exits in all three tools, and additionally
|
|
36
|
+
catches testnet WIFs and xprvs.
|
|
37
|
+
- The admin originator was the package name, `bsv-mcp` — the exact string a
|
|
38
|
+
caller reaches for when a parameter named `originator` wants a value. Passing
|
|
39
|
+
it would have bypassed the spending gate while the configuration reported it
|
|
40
|
+
armed.
|
|
41
|
+
- Two identity-key paths caught an invalid WIF, logged a warning, and continued
|
|
42
|
+
unsigned. Both now fail.
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- Audit log at `~/.bsv-mcp/audit.log` (JSON Lines, directory `0700`, file
|
|
47
|
+
`0600`), routed through the key redactor. A failed write reports to stderr and
|
|
48
|
+
does not break a payment the user already approved.
|
|
49
|
+
- Amount validation on the money-moving tools. `sendBsv`, `sendMnee`, `lockBsv`
|
|
50
|
+
and `listOrdinal` took a bare `z.number()`, so negative, zero and NaN amounts
|
|
51
|
+
reached the SDK; a negative USD amount converted to a negative satoshi count.
|
|
52
|
+
|
|
53
|
+
### Fixed
|
|
54
|
+
|
|
55
|
+
- `wallet_createOrdinals` accepted `destinationAddress` and never forwarded it,
|
|
56
|
+
so an ordinal minted to a named address silently locked to a wallet-derived
|
|
57
|
+
self key.
|
|
58
|
+
- Droplit authentication was hand-rolled and could never have succeeded. It is
|
|
59
|
+
now BRC-103/104 via `AuthFetch`, verified against the live service.
|
|
60
|
+
- Five packages the code imports were never declared, `zod` among them, so a
|
|
61
|
+
clean install of the published package could not resolve them.
|
|
62
|
+
- The stdio guard was dead code. Its replacement is a first-position side-effect
|
|
63
|
+
import, since ES imports evaluate before any top-level statement.
|
|
64
|
+
- `purchaseListing`'s marketplace-rate arithmetic is a pure function, so a fee
|
|
65
|
+
bug can be told apart from an execution bug.
|
|
66
|
+
|
|
67
|
+
### Changed
|
|
68
|
+
|
|
69
|
+
- Core SDKs to current: `@modelcontextprotocol/sdk` 1.27.1 → 1.29.0,
|
|
70
|
+
`@modelcontextprotocol/ext-apps` 1.2.0 → 1.7.5, `@1sat/actions` 0.0.41 →
|
|
71
|
+
0.0.192, `@bsv/sdk` 2.0.6 → 2.2.0, `bsv-bap` 0.1.23 → 0.3.4.
|
|
72
|
+
- `Droplet` is spelled `Droplit` throughout, matching droplit.dev. Environment
|
|
73
|
+
variables are now `DROPLIT_API_URL` and `DROPLIT_FAUCET_NAME`.
|
|
74
|
+
- Test coverage 15 → 45.
|
|
75
|
+
|
|
3
76
|
## [0.2.15] - 2026-03-10
|
|
4
77
|
|
|
5
78
|
### Fixed
|
|
@@ -129,29 +202,29 @@
|
|
|
129
202
|
- Improved error handling with standardized error types
|
|
130
203
|
- Better code organization with new utility modules
|
|
131
204
|
|
|
132
|
-
## v0.1.0 -
|
|
205
|
+
## v0.1.0 - Droplit API Integration & Claude Code CLI Support
|
|
133
206
|
|
|
134
207
|
### Major Features
|
|
135
|
-
- **
|
|
208
|
+
- **Droplit API Integration**: Added support for running without local keys using Droplit faucet API
|
|
136
209
|
- New `IntegratedWallet` class supports both local and remote wallet modes
|
|
137
|
-
- BSM (Bitcoin Signed Message) authentication for
|
|
138
|
-
- Environment variable configuration: `
|
|
139
|
-
- Automatic faucet funding and transaction broadcasting through
|
|
210
|
+
- BSM (Bitcoin Signed Message) authentication for Droplit API communication
|
|
211
|
+
- Environment variable configuration: `USE_DROPLIT_API`, `DROPLIT_API_URL`, `DROPLIT_FAUCET_NAME`
|
|
212
|
+
- Automatic faucet funding and transaction broadcasting through Droplit service
|
|
140
213
|
- **Claude Code CLI Compatibility**: Fixed stdio transport configuration for seamless Claude Code integration
|
|
141
214
|
- Updated smithery.yaml configuration for proper MCP CLI operation
|
|
142
215
|
- Enhanced testing and debugging workflows with Claude CLI
|
|
143
216
|
|
|
144
217
|
### Technical Improvements
|
|
145
|
-
- Created `
|
|
146
|
-
- Added comprehensive error handling and validation for
|
|
218
|
+
- Created `DroplitClient` class for robust API communication with go-faucet-api
|
|
219
|
+
- Added comprehensive error handling and validation for Droplit operations
|
|
147
220
|
- Enhanced documentation with testing instructions and troubleshooting guides
|
|
148
221
|
- Improved dual-mode wallet architecture maintaining backward compatibility
|
|
149
222
|
- Updated development documentation with detailed testing workflows
|
|
150
223
|
|
|
151
224
|
### Environment Variables
|
|
152
|
-
- `
|
|
153
|
-
- `
|
|
154
|
-
- `
|
|
225
|
+
- `USE_DROPLIT_API`: Enable Droplit API mode (default: false)
|
|
226
|
+
- `DROPLIT_API_URL`: Droplit service endpoint (default: http://localhost:4000)
|
|
227
|
+
- `DROPLIT_FAUCET_NAME`: Faucet name for API operations (required in Droplit mode)
|
|
155
228
|
- `TRANSPORT`: MCP transport mode (stdio/http) for Claude Code compatibility
|
|
156
229
|
|
|
157
230
|
## v0.0.37 - Resource Updates
|
package/README.md
CHANGED
|
@@ -576,34 +576,34 @@ The BSV MCP server can be customized using environment variables to enable or di
|
|
|
576
576
|
| `IDENTITY_KEY_WIF` | `not set` | Optional WIF for identity key; if set, ordinals inscriptions will be signed with sigma-protocol for authentication, curation, and web-of-trust. |
|
|
577
577
|
| `DISABLE_BROADCASTING` | `false` | Set to `true` to disable transaction broadcasting; returns raw transaction hex instead - useful for testing and transaction review before broadcasting |
|
|
578
578
|
|
|
579
|
-
###
|
|
579
|
+
### Droplit API Configuration
|
|
580
580
|
|
|
581
|
-
The BSV MCP server supports running in
|
|
581
|
+
The BSV MCP server supports running in Droplit API mode, which allows operation without local private keys by using a remote faucet service:
|
|
582
582
|
|
|
583
583
|
| Environment Variable | Default | Description |
|
|
584
584
|
| -------------------- | ------- | ----------- |
|
|
585
|
-
| `
|
|
586
|
-
| `
|
|
587
|
-
| `
|
|
585
|
+
| `USE_DROPLIT_API` | `false` | Set to `true` to enable Droplit API mode for remote wallet operations |
|
|
586
|
+
| `DROPLIT_API_URL` | `http://localhost:4000` | Base URL for the Droplit faucet API service |
|
|
587
|
+
| `DROPLIT_FAUCET_NAME` | `not set` | Name of the faucet to use (required when `USE_DROPLIT_API` is true) |
|
|
588
588
|
| `TRANSPORT` | `stdio` | MCP transport mode (stdio/http) - automatically set to stdio for Claude Code compatibility |
|
|
589
589
|
|
|
590
|
-
####
|
|
590
|
+
#### Droplit API Mode
|
|
591
591
|
|
|
592
|
-
When `
|
|
592
|
+
When `USE_DROPLIT_API=true` is set, the server operates in remote mode:
|
|
593
593
|
|
|
594
594
|
- **No Local Keys Required**: The server doesn't need `PRIVATE_KEY_WIF` or local key files
|
|
595
|
-
- **Remote Wallet Operations**: Transactions are funded and broadcast through the
|
|
595
|
+
- **Remote Wallet Operations**: Transactions are funded and broadcast through the Droplit API
|
|
596
596
|
- **BSM Authentication**: Uses Bitcoin Signed Message (BSM) authentication for secure API communication
|
|
597
597
|
- **Automatic Funding**: The faucet automatically provides UTXOs for transactions
|
|
598
598
|
- **Seamless Integration**: All existing wallet tools work transparently with the remote service
|
|
599
599
|
|
|
600
|
-
#### Example
|
|
600
|
+
#### Example Droplit Configuration
|
|
601
601
|
|
|
602
602
|
```bash
|
|
603
|
-
# Enable
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
603
|
+
# Enable Droplit API mode
|
|
604
|
+
USE_DROPLIT_API=true
|
|
605
|
+
DROPLIT_API_URL=https://your-droplit-service.com
|
|
606
|
+
DROPLIT_FAUCET_NAME=your-faucet-name
|
|
607
607
|
TRANSPORT=stdio
|
|
608
608
|
```
|
|
609
609
|
|