@did-btcr2/cli 0.18.1 → 0.19.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/README.md +7 -5
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/index.js +37 -5
- package/dist/esm/src/cli.js +7 -1
- package/dist/esm/src/cli.js.map +1 -1
- package/dist/esm/src/config-schema.js +4 -0
- package/dist/esm/src/config-schema.js.map +1 -1
- package/dist/esm/src/config.js +31 -1
- package/dist/esm/src/config.js.map +1 -1
- package/dist/types/src/cli.d.ts.map +1 -1
- package/dist/types/src/config-schema.d.ts.map +1 -1
- package/dist/types/src/config.d.ts +13 -2
- package/dist/types/src/config.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +1 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/cli.ts +7 -1
- package/src/config-schema.ts +18 -10
- package/src/config.ts +81 -35
- package/src/types.ts +23 -20
package/README.md
CHANGED
|
@@ -287,10 +287,10 @@ Override precedence, highest wins: CLI flags, then environment variables, then c
|
|
|
287
287
|
| `--btc-rest <url>` | Override Bitcoin REST endpoint (Esplora API) |
|
|
288
288
|
| `--btc-rpc-url <url>` | Override Bitcoin Core RPC endpoint |
|
|
289
289
|
| `--btc-rpc-user <user>` | Bitcoin Core RPC username |
|
|
290
|
-
| `--btc-rpc-pass <pass>` | Bitcoin Core RPC password (accepts an `env:<VAR>` or `file:<path>` secret reference) |
|
|
291
290
|
| `--btc-rpc-wallet <name>` | Bitcoin Core wallet name for wallet-scoped RPCs (`/wallet/<name>`) |
|
|
292
|
-
| `--btc-rpc-header <header>` | Extra Bitcoin Core RPC header `"Key: Value"` (repeatable) |
|
|
293
|
-
| `--btc-
|
|
291
|
+
| `--btc-rpc-header <header>` | Extra Bitcoin Core RPC header `"Key: Value"` (repeatable). A credential passed here is on argv: prefer `btc.rpcHeaders` in a profile |
|
|
292
|
+
| `--btc-signal-discovery <mode>` | Where beacon signals are read from `<indexer\|fullnode>` (default: `indexer`; `fullnode` scans blocks over Bitcoin Core RPC) |
|
|
293
|
+
| `--btc-rest-header <header>` | Extra Bitcoin REST header `"Key: Value"` (repeatable). A credential passed here (an API key, a bearer token) is on argv and readable through `ps`: prefer `btc.headers` in a profile |
|
|
294
294
|
| `--btc-timeout <ms>` | Bitcoin REST/RPC request timeout in milliseconds (default: unbounded) |
|
|
295
295
|
| `--cas-gateway <url>` | IPFS HTTP gateway for CAS reads (read-only) |
|
|
296
296
|
| `--cas-rpc-url <url>` | IPFS HTTP RPC endpoint for a writable CAS (reads + writes; enables `--publish-to-cas`) |
|
|
@@ -306,10 +306,11 @@ Override precedence, highest wins: CLI flags, then environment variables, then c
|
|
|
306
306
|
| `BTCR2_BTC_REST` | `--btc-rest` |
|
|
307
307
|
| `BTCR2_BTC_RPC_URL` | `--btc-rpc-url` |
|
|
308
308
|
| `BTCR2_BTC_RPC_USER` | `--btc-rpc-user` |
|
|
309
|
-
| `BTCR2_BTC_RPC_PASS` |
|
|
309
|
+
| `BTCR2_BTC_RPC_PASS` | no flag: a password on argv is readable through `ps` and shell history |
|
|
310
310
|
| `BTCR2_BTC_RPC_PASS_FILE` | file whose contents are the RPC password |
|
|
311
311
|
| `BTCR2_CAS_GATEWAY` | `--cas-gateway` |
|
|
312
312
|
| `BTCR2_CAS_RPC_URL` | `--cas-rpc-url` |
|
|
313
|
+
| `BTCR2_BTC_SIGNAL_DISCOVERY` | `--btc-signal-discovery` |
|
|
313
314
|
| `BTCR2_BTC_TIMEOUT` | `--btc-timeout` |
|
|
314
315
|
| `BTCR2_CAS_TIMEOUT` | `--cas-timeout` |
|
|
315
316
|
| `BTCR2_FEE_RATE` | `--fee-rate` |
|
|
@@ -365,7 +366,8 @@ Profiles are matched by network name when `--profile` is not specified. For exam
|
|
|
365
366
|
Field notes:
|
|
366
367
|
|
|
367
368
|
- **`defaults`**: `profile` selects the active profile; `network` fixes the network `create` encodes when `-n` is absent; `output` sets the default output format. `schemaVersion` is stamped on every write; a file written by a newer CLI is refused.
|
|
368
|
-
- **`btc`**: `rest`/`rpcUrl`/`rpcUser`/`rpcPass` are endpoints and credentials; `wallet` targets a Bitcoin Core wallet (`/wallet/<name>`); `headers`/`rpcHeaders` add REST/RPC headers; `feeRate` (sats/vByte), `changeAddress`, and `timeoutMs` set broadcast and request behavior
|
|
369
|
+
- **`btc`**: `rest`/`rpcUrl`/`rpcUser`/`rpcPass` are endpoints and credentials; `wallet` targets a Bitcoin Core wallet (`/wallet/<name>`); `headers`/`rpcHeaders` add REST/RPC headers; `feeRate` (sats/vByte), `changeAddress`, and `timeoutMs` set broadcast and request behavior;
|
|
370
|
+
`signalDiscovery` (`"indexer"` or `"fullnode"`) picks where beacon signals are read from. The RPC url, user, and pass are resolved as one atomic unit, so a URL from a higher-precedence layer never inherits credentials from a lower one.
|
|
369
371
|
- **`cas`**: `gateway` is a read-only IPFS HTTP gateway; `cas.rpcUrl` is a writable IPFS HTTP RPC endpoint (enables `--publish-to-cas`; `rpcUrl` wins over `gateway`); `timeoutMs` bounds CAS operations (`0` disables).
|
|
370
372
|
- **`identity`**: `keystore` points the profile at its own keystore file, and `default` is the profile's default signing key. Both fall **below** the corresponding `--keystore` / `--signing-key` flags.
|
|
371
373
|
|