@1sat/cli 0.0.86 → 0.0.88

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1sat/cli",
3
- "version": "0.0.86",
3
+ "version": "0.0.88",
4
4
  "description": "CLI for 1Sat Ordinals SDK",
5
5
  "type": "module",
6
6
  "main": "./src/cli.ts",
@@ -30,7 +30,7 @@
30
30
  "@1sat/client": "0.0.45",
31
31
  "@1sat/types": "0.0.36",
32
32
  "@1sat/wallet-node": "0.0.62",
33
- "@1sat/wallet-server": "0.0.32",
33
+ "@1sat/wallet-server": "0.0.34",
34
34
  "@bsv/sdk": "^2.1.6",
35
35
  "@bsv/wallet-toolbox": "2.1.24",
36
36
  "chalk": "^5.0.0",
@@ -382,6 +382,14 @@ async function startWalletServer(
382
382
  }
383
383
  : undefined
384
384
 
385
+ const sessionStoreCfg = config.server?.sessionStore
386
+ const sessionStore = sessionStoreCfg?.redisUrl
387
+ ? {
388
+ redisUrl: sessionStoreCfg.redisUrl,
389
+ ttlSeconds: sessionStoreCfg.ttlSeconds,
390
+ }
391
+ : undefined
392
+
385
393
  if (mode === 'wallet') {
386
394
  const handle = createWalletServer({
387
395
  wallet: walletResult.wallet,
@@ -392,6 +400,7 @@ async function startWalletServer(
392
400
  internalPath: null,
393
401
  accounts: accounts?.walletServerAccounts,
394
402
  hosting,
403
+ sessionStore,
395
404
  })
396
405
  const port = await handle.start()
397
406
  const notes = [
@@ -421,6 +430,7 @@ async function startWalletServer(
421
430
 
422
431
  const handle = await createHostServer({
423
432
  wallet: walletResult.wallet,
433
+ sessionStore,
424
434
  storage: walletResult.getActiveStorage(),
425
435
  serverIdentityKey: walletResult.wallet.identityKey,
426
436
  listen: { port: resolved.port, host: resolved.host },
package/src/config.ts CHANGED
@@ -138,6 +138,13 @@ export interface ServerHostingConfig {
138
138
  periodSeconds?: number
139
139
  }
140
140
 
141
+ export interface ServerSessionStoreConfig {
142
+ /** e.g. redis://127.0.0.1:6379 */
143
+ redisUrl?: string
144
+ /** Session TTL in Redis, refreshed on writes. Defaults to 86400 (24h). */
145
+ ttlSeconds?: number
146
+ }
147
+
141
148
  export interface ServerMonitorConfig {
142
149
  /**
143
150
  * Run the background monitor task loop (post waiting txs, check for
@@ -166,6 +173,11 @@ export interface ServerConfig {
166
173
  hosting?: ServerHostingConfig
167
174
  /** Shared BSV/USD repricer engine for accounts + hosting prices. */
168
175
  repricer?: RepricerConfig
176
+ /**
177
+ * Redis-shared BRC-104 sessions. Required when multiple serve instances
178
+ * run behind one load balancer; unset keeps sessions in-memory.
179
+ */
180
+ sessionStore?: ServerSessionStoreConfig
169
181
  /** Background monitor task loop. Defaults to enabled. */
170
182
  monitor?: ServerMonitorConfig
171
183
  }