@1sat/cli 0.0.97 → 0.0.98
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/package.json +6 -6
- package/src/commands/serve.ts +5 -4
- package/src/config.ts +8 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1sat/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.98",
|
|
4
4
|
"description": "CLI for 1Sat Ordinals SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/cli.ts",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
],
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@1sat/actions": "0.0.
|
|
30
|
-
"@1sat/client": "0.0.
|
|
29
|
+
"@1sat/actions": "0.0.196",
|
|
30
|
+
"@1sat/client": "0.0.49",
|
|
31
31
|
"@1sat/types": "0.0.39",
|
|
32
|
-
"@1sat/wallet-node": "0.0.
|
|
33
|
-
"@1sat/wallet-server": "0.0.
|
|
32
|
+
"@1sat/wallet-node": "0.0.68",
|
|
33
|
+
"@1sat/wallet-server": "0.0.44",
|
|
34
34
|
"@bsv/sdk": "^2.1.9",
|
|
35
|
-
"@bsv/wallet-toolbox": "2.4.
|
|
35
|
+
"@bsv/wallet-toolbox": "2.4.4",
|
|
36
36
|
"chalk": "^5.0.0",
|
|
37
37
|
"@clack/prompts": "^0.8.0",
|
|
38
38
|
"bitcoin-backup": "^0.0.11",
|
package/src/commands/serve.ts
CHANGED
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
|
|
56
56
|
const DEFAULT_HOST = '127.0.0.1'
|
|
57
57
|
const DEFAULT_PORT = 8100
|
|
58
|
-
const
|
|
58
|
+
const DEFAULT_STACK_URL = 'https://api.1sat.app'
|
|
59
59
|
const DEFAULT_BASELINE_BYTES = 1024 * 1024 * 1024 // 1 GB
|
|
60
60
|
const DEFAULT_PURCHASE_UNIT_BYTES = 1_073_741_824 // 1 GB chunks for production
|
|
61
61
|
const DEFAULT_SATS_PER_UNIT = 1_000_000
|
|
@@ -69,7 +69,7 @@ interface ResolvedServe {
|
|
|
69
69
|
chain: 'main' | 'test'
|
|
70
70
|
host: string
|
|
71
71
|
port: number
|
|
72
|
-
|
|
72
|
+
stackUrl: string
|
|
73
73
|
storage: ServerStorageConfig
|
|
74
74
|
dataDir: string
|
|
75
75
|
sqliteFilename: string
|
|
@@ -167,7 +167,7 @@ async function resolveServe(opts: GlobalFlags): Promise<ResolvedServe> {
|
|
|
167
167
|
chain,
|
|
168
168
|
host: server.host ?? DEFAULT_HOST,
|
|
169
169
|
port: resolvePort(server.port),
|
|
170
|
-
|
|
170
|
+
stackUrl: config.stackUrl ?? DEFAULT_STACK_URL,
|
|
171
171
|
storage,
|
|
172
172
|
dataDir,
|
|
173
173
|
sqliteFilename: deriveSqliteFilename(dataDir, chain),
|
|
@@ -260,6 +260,7 @@ async function runWithStorage(
|
|
|
260
260
|
chain: resolved.chain,
|
|
261
261
|
storageIdentityKey: resolved.storageIdentityKey,
|
|
262
262
|
storage,
|
|
263
|
+
servicesBaseUrl: resolved.stackUrl,
|
|
263
264
|
activeRemote: resolved.activeRemote,
|
|
264
265
|
backups: resolved.backups,
|
|
265
266
|
// Each serve mode manages monitor work explicitly (see runMonitor
|
|
@@ -439,7 +440,7 @@ async function startWalletServer(
|
|
|
439
440
|
paymail: {
|
|
440
441
|
baseUrl:
|
|
441
442
|
paymailCfg?.baseUrl ?? `http://${resolved.host}:${resolved.port}`,
|
|
442
|
-
stackUrl: paymailCfg?.stackUrl ??
|
|
443
|
+
stackUrl: paymailCfg?.stackUrl ?? resolved.stackUrl,
|
|
443
444
|
pendingStore,
|
|
444
445
|
hostWallet: hostingEnabled ? walletResult.wallet : undefined,
|
|
445
446
|
requireEntitlement: hostingEnabled,
|
package/src/config.ts
CHANGED
|
@@ -98,7 +98,7 @@ export interface ServerPaymailConfig {
|
|
|
98
98
|
* (e.g. https://1sat.app). Required for serve paymail.
|
|
99
99
|
*/
|
|
100
100
|
baseUrl?: string
|
|
101
|
-
/** Stack API root (OpNS, beef, tx).
|
|
101
|
+
/** Stack API root (OpNS, beef, tx). Falls back to the top-level `stackUrl`. */
|
|
102
102
|
stackUrl?: string
|
|
103
103
|
/**
|
|
104
104
|
* SQLite path for in-flight P2P payment references (Go paymail port).
|
|
@@ -193,6 +193,13 @@ export interface OneSatCliConfig {
|
|
|
193
193
|
backups?: string[]
|
|
194
194
|
/** Storage identity key for wallet persistence */
|
|
195
195
|
storageIdentityKey?: string
|
|
196
|
+
/**
|
|
197
|
+
* 1sat-stack root. Origin plus optional path — never include `/1sat`,
|
|
198
|
+
* which clients append as part of each route. Defaults to
|
|
199
|
+
* https://api.1sat.app. Set to a loopback URL (e.g. http://localhost:8084)
|
|
200
|
+
* when the stack runs on the same host to avoid a public round trip.
|
|
201
|
+
*/
|
|
202
|
+
stackUrl?: string
|
|
196
203
|
/** Settings read by `1sat serve` subcommands. Absent for client-only installs. */
|
|
197
204
|
server?: ServerConfig
|
|
198
205
|
}
|