routstrd 0.2.20 → 0.2.21

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/dist/index.js CHANGED
@@ -27,6 +27,7 @@ var __export = (target, all) => {
27
27
  });
28
28
  };
29
29
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
30
+ var __require = import.meta.require;
30
31
 
31
32
  // node_modules/commander/lib/error.js
32
33
  var require_error = __commonJS((exports) => {
@@ -748,11 +749,11 @@ var require_suggestSimilar = __commonJS((exports) => {
748
749
 
749
750
  // node_modules/commander/lib/command.js
750
751
  var require_command = __commonJS((exports) => {
751
- var EventEmitter = import.meta.require("events").EventEmitter;
752
- var childProcess = import.meta.require("child_process");
753
- var path = import.meta.require("path");
754
- var fs = import.meta.require("fs");
755
- var process2 = import.meta.require("process");
752
+ var EventEmitter = __require("events").EventEmitter;
753
+ var childProcess = __require("child_process");
754
+ var path = __require("path");
755
+ var fs = __require("fs");
756
+ var process2 = __require("process");
756
757
  var { Argument, humanReadableArgName } = require_argument();
757
758
  var { CommanderError } = require_error();
758
759
  var { Help, stripColor } = require_help();
@@ -1000,8 +1001,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1000
1001
  this._exitCallback = (err) => {
1001
1002
  if (err.code !== "commander.executeSubCommandAsync") {
1002
1003
  throw err;
1003
- } else {
1004
- }
1004
+ } else {}
1005
1005
  };
1006
1006
  }
1007
1007
  return this;
@@ -2235,8 +2235,7 @@ async function readLockOwner(lockDir) {
2235
2235
  token: typeof parsed.token === "string" ? parsed.token : undefined
2236
2236
  };
2237
2237
  }
2238
- } catch {
2239
- }
2238
+ } catch {}
2240
2239
  return null;
2241
2240
  }
2242
2241
  async function isLockStale(lockDir, staleAfterMs) {
@@ -2298,8 +2297,7 @@ async function withCrossProcessLock(lockDir, fn, options = {}) {
2298
2297
  await release();
2299
2298
  }
2300
2299
  }
2301
- var init_process_lock = () => {
2302
- };
2300
+ var init_process_lock = () => {};
2303
2301
 
2304
2302
  // src/start-daemon.ts
2305
2303
  async function isDaemonHealthy(port) {
@@ -2380,7 +2378,7 @@ var init_start_daemon = __esm(() => {
2380
2378
  DAEMON_STARTUP_LOCK_PATH = `${CONFIG_DIR}/routstrd-startup.lock`;
2381
2379
  });
2382
2380
 
2383
- // node_modules/@noble/hashes/utils.js
2381
+ // node_modules/nostr-tools/node_modules/@noble/hashes/utils.js
2384
2382
  function isBytes(a) {
2385
2383
  return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
2386
2384
  }
@@ -2512,7 +2510,7 @@ var init_utils = __esm(() => {
2512
2510
  asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
2513
2511
  });
2514
2512
 
2515
- // node_modules/@noble/hashes/_md.js
2513
+ // node_modules/nostr-tools/node_modules/@noble/hashes/_md.js
2516
2514
  function Chi(a, b, c) {
2517
2515
  return a & b ^ ~a & c;
2518
2516
  }
@@ -2675,7 +2673,7 @@ var init__md = __esm(() => {
2675
2673
  ]);
2676
2674
  });
2677
2675
 
2678
- // node_modules/@noble/hashes/_u64.js
2676
+ // node_modules/nostr-tools/node_modules/@noble/hashes/_u64.js
2679
2677
  function fromBig(n, le = false) {
2680
2678
  if (le)
2681
2679
  return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
@@ -2701,7 +2699,7 @@ var init__u64 = __esm(() => {
2701
2699
  _32n = /* @__PURE__ */ BigInt(32);
2702
2700
  });
2703
2701
 
2704
- // node_modules/@noble/hashes/sha2.js
2702
+ // node_modules/nostr-tools/node_modules/@noble/hashes/sha2.js
2705
2703
  var SHA256_K, SHA256_W, SHA2_32B, _SHA256, _SHA224, K512, SHA512_Kh, SHA512_Kl, SHA512_W_H, SHA512_W_L, SHA2_64B, _SHA512, _SHA384, T224_IV, T256_IV, _SHA512_224, _SHA512_256, sha256;
2706
2704
  var init_sha2 = __esm(() => {
2707
2705
  init__md();
@@ -3163,7 +3161,7 @@ var init_sha2 = __esm(() => {
3163
3161
  sha256 = /* @__PURE__ */ createHasher(() => new _SHA256, /* @__PURE__ */ oidNist(1));
3164
3162
  });
3165
3163
 
3166
- // node_modules/@noble/curves/utils.js
3164
+ // node_modules/nostr-tools/node_modules/@noble/curves/utils.js
3167
3165
  function abool(value, title = "") {
3168
3166
  if (typeof value !== "boolean") {
3169
3167
  const prefix = title && `"${title}" `;
@@ -3316,7 +3314,7 @@ var init_utils2 = __esm(() => {
3316
3314
  _1n = /* @__PURE__ */ BigInt(1);
3317
3315
  });
3318
3316
 
3319
- // node_modules/@noble/curves/abstract/modular.js
3317
+ // node_modules/nostr-tools/node_modules/@noble/curves/abstract/modular.js
3320
3318
  function mod(a, b) {
3321
3319
  const result = a % b;
3322
3320
  return result >= _0n2 ? result : b + result;
@@ -3702,7 +3700,7 @@ var init_modular = __esm(() => {
3702
3700
  ];
3703
3701
  });
3704
3702
 
3705
- // node_modules/@noble/curves/abstract/curve.js
3703
+ // node_modules/nostr-tools/node_modules/@noble/curves/abstract/curve.js
3706
3704
  function negateCt(condition, item) {
3707
3705
  const neg = item.negate();
3708
3706
  return condition ? neg : item;
@@ -3914,7 +3912,7 @@ var init_curve = __esm(() => {
3914
3912
  pointWindowSizes = new WeakMap;
3915
3913
  });
3916
3914
 
3917
- // node_modules/@noble/hashes/hmac.js
3915
+ // node_modules/nostr-tools/node_modules/@noble/hashes/hmac.js
3918
3916
  class _HMAC {
3919
3917
  oHash;
3920
3918
  iHash;
@@ -3988,7 +3986,7 @@ var init_hmac = __esm(() => {
3988
3986
  hmac.create = (hash, key) => new _HMAC(hash, key);
3989
3987
  });
3990
3988
 
3991
- // node_modules/@noble/curves/abstract/weierstrass.js
3989
+ // node_modules/nostr-tools/node_modules/@noble/curves/abstract/weierstrass.js
3992
3990
  function _splitEndoScalar(k, basis, n) {
3993
3991
  const [[a1, b1], [a2, b2]] = basis;
3994
3992
  const c1 = divNearest(b2 * k, n);
@@ -4815,7 +4813,7 @@ var init_weierstrass = __esm(() => {
4815
4813
  _4n2 = BigInt(4);
4816
4814
  });
4817
4815
 
4818
- // node_modules/@noble/curves/secp256k1.js
4816
+ // node_modules/nostr-tools/node_modules/@noble/curves/secp256k1.js
4819
4817
  function sqrtMod(y) {
4820
4818
  const P = secp256k1_CURVE.p;
4821
4819
  const _3n3 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);
@@ -4976,7 +4974,7 @@ var init_secp256k1 = __esm(() => {
4976
4974
  })();
4977
4975
  });
4978
4976
 
4979
- // node_modules/@scure/base/index.js
4977
+ // node_modules/nostr-tools/node_modules/@scure/base/index.js
4980
4978
  function isBytes2(a) {
4981
4979
  return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
4982
4980
  }
@@ -5220,8 +5218,7 @@ function unsafeWrapper(fn) {
5220
5218
  return function(...args) {
5221
5219
  try {
5222
5220
  return fn.apply(null, args);
5223
- } catch (e) {
5224
- }
5221
+ } catch (e) {}
5225
5222
  };
5226
5223
  }
5227
5224
  function bech32Polymod(pre) {
@@ -6482,7 +6479,7 @@ var init_chacha = __esm(() => {
6482
6479
  xchacha20poly1305 = /* @__PURE__ */ wrapCipher({ blockSize: 64, nonceLength: 24, tagLength: 16 }, _poly1305_aead(xchacha20));
6483
6480
  });
6484
6481
 
6485
- // node_modules/@noble/hashes/hkdf.js
6482
+ // node_modules/nostr-tools/node_modules/@noble/hashes/hkdf.js
6486
6483
  function extract(hash, ikm, salt) {
6487
6484
  ahash(hash);
6488
6485
  if (salt === undefined)
@@ -7591,8 +7588,7 @@ function* matchAll(content) {
7591
7588
  start: match.index,
7592
7589
  end: match.index + shortcode.length
7593
7590
  };
7594
- } catch (_e) {
7595
- }
7591
+ } catch (_e) {}
7596
7592
  }
7597
7593
  }
7598
7594
  function replaceAll(content, replacer) {
@@ -7672,8 +7668,7 @@ async function getZapEndpoint(metadata) {
7672
7668
  if (body.allowsNostr && body.nostrPubkey) {
7673
7669
  return body.callback;
7674
7670
  }
7675
- } catch (err) {
7676
- }
7671
+ } catch (err) {}
7677
7672
  return null;
7678
7673
  }
7679
7674
  function makeZapRequest(params) {
@@ -8034,8 +8029,7 @@ var __defProp2, __export2 = (target, all) => {
8034
8029
  this.reconnectTimeoutHandle = setTimeout(async () => {
8035
8030
  try {
8036
8031
  await this.connect();
8037
- } catch (err) {
8038
- }
8032
+ } catch (err) {}
8039
8033
  }, backoff);
8040
8034
  }
8041
8035
  handleHardClose(reason) {
@@ -8407,8 +8401,7 @@ var __defProp2, __export2 = (target, all) => {
8407
8401
  try {
8408
8402
  this.relay.send('["CLOSE",' + JSON.stringify(this.id) + "]");
8409
8403
  } catch (err) {
8410
- if (err instanceof SendingOnClosedConnection) {
8411
- } else {
8404
+ if (err instanceof SendingOnClosedConnection) {} else {
8412
8405
  throw err;
8413
8406
  }
8414
8407
  }
@@ -9087,12 +9080,10 @@ var init_esm = __esm(() => {
9087
9080
  };
9088
9081
  try {
9089
9082
  _WebSocket = WebSocket;
9090
- } catch {
9091
- }
9083
+ } catch {}
9092
9084
  try {
9093
9085
  _WebSocket2 = WebSocket;
9094
- } catch {
9095
- }
9086
+ } catch {}
9096
9087
  nip19_exports = {};
9097
9088
  __export2(nip19_exports, {
9098
9089
  BECH32_REGEX: () => BECH32_REGEX,
@@ -9135,8 +9126,7 @@ var init_esm = __esm(() => {
9135
9126
  NIP05_REGEX = /^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/;
9136
9127
  try {
9137
9128
  _fetch = fetch;
9138
- } catch (_) {
9139
- }
9129
+ } catch (_) {}
9140
9130
  nip10_exports = {};
9141
9131
  __export2(nip10_exports, {
9142
9132
  parse: () => parse
@@ -9148,8 +9138,7 @@ var init_esm = __esm(() => {
9148
9138
  });
9149
9139
  try {
9150
9140
  _fetch2 = fetch;
9151
- } catch {
9152
- }
9141
+ } catch {}
9153
9142
  nip13_exports = {};
9154
9143
  __export2(nip13_exports, {
9155
9144
  getPow: () => getPow,
@@ -9237,8 +9226,7 @@ var init_esm = __esm(() => {
9237
9226
  });
9238
9227
  try {
9239
9228
  _fetch3 = fetch;
9240
- } catch {
9241
- }
9229
+ } catch {}
9242
9230
  nip47_exports = {};
9243
9231
  __export2(nip47_exports, {
9244
9232
  makeNwcRequestEvent: () => makeNwcRequestEvent,
@@ -9259,8 +9247,7 @@ var init_esm = __esm(() => {
9259
9247
  });
9260
9248
  try {
9261
9249
  _fetch4 = fetch;
9262
- } catch {
9263
- }
9250
+ } catch {}
9264
9251
  nip77_exports = {};
9265
9252
  __export2(nip77_exports, {
9266
9253
  Negentropy: () => Negentropy,
@@ -11269,8 +11256,8 @@ var require_qrcode = __commonJS((exports) => {
11269
11256
 
11270
11257
  // node_modules/pngjs/lib/chunkstream.js
11271
11258
  var require_chunkstream = __commonJS((exports, module) => {
11272
- var util = import.meta.require("util");
11273
- var Stream = import.meta.require("stream");
11259
+ var util = __require("util");
11260
+ var Stream = __require("stream");
11274
11261
  var ChunkStream = module.exports = function() {
11275
11262
  Stream.call(this);
11276
11263
  this._buffers = [];
@@ -11626,7 +11613,7 @@ var require_filter_parse = __commonJS((exports, module) => {
11626
11613
 
11627
11614
  // node_modules/pngjs/lib/filter-parse-async.js
11628
11615
  var require_filter_parse_async = __commonJS((exports, module) => {
11629
- var util = import.meta.require("util");
11616
+ var util = __require("util");
11630
11617
  var ChunkStream = require_chunkstream();
11631
11618
  var Filter = require_filter_parse();
11632
11619
  var FilterAsync = module.exports = function(bitmapInfo) {
@@ -11740,8 +11727,7 @@ var require_parser = __commonJS((exports, module) => {
11740
11727
  this.inflateData = dependencies.inflateData;
11741
11728
  this.finished = dependencies.finished;
11742
11729
  this.simpleTransparency = dependencies.simpleTransparency;
11743
- this.headersFinished = dependencies.headersFinished || function() {
11744
- };
11730
+ this.headersFinished = dependencies.headersFinished || function() {};
11745
11731
  };
11746
11732
  Parser.prototype.start = function() {
11747
11733
  this.read(constants.PNG_SIGNATURE.length, this._parseSignature.bind(this));
@@ -11933,8 +11919,7 @@ var require_parser = __commonJS((exports, module) => {
11933
11919
  var require_bitmapper = __commonJS((exports) => {
11934
11920
  var interlaceUtils = require_interlace();
11935
11921
  var pixelBppMapper = [
11936
- function() {
11937
- },
11922
+ function() {},
11938
11923
  function(pxData, data, pxPos, rawPos) {
11939
11924
  if (rawPos === data.length) {
11940
11925
  throw new Error("Ran out of data");
@@ -11975,8 +11960,7 @@ var require_bitmapper = __commonJS((exports) => {
11975
11960
  }
11976
11961
  ];
11977
11962
  var pixelBppCustomMapper = [
11978
- function() {
11979
- },
11963
+ function() {},
11980
11964
  function(pxData, pixelData, pxPos, maxBit) {
11981
11965
  let pixel = pixelData[0];
11982
11966
  pxData[pxPos] = pixel;
@@ -12220,8 +12204,8 @@ var require_format_normaliser = __commonJS((exports, module) => {
12220
12204
 
12221
12205
  // node_modules/pngjs/lib/parser-async.js
12222
12206
  var require_parser_async = __commonJS((exports, module) => {
12223
- var util = import.meta.require("util");
12224
- var zlib = import.meta.require("zlib");
12207
+ var util = __require("util");
12208
+ var zlib = __require("zlib");
12225
12209
  var ChunkStream = require_chunkstream();
12226
12210
  var FilterAsync = require_filter_parse_async();
12227
12211
  var Parser = require_parser();
@@ -12255,8 +12239,7 @@ var require_parser_async = __commonJS((exports, module) => {
12255
12239
  }
12256
12240
  if (this._filter) {
12257
12241
  this._filter.destroy();
12258
- this._filter.on("error", function() {
12259
- });
12242
+ this._filter.on("error", function() {});
12260
12243
  }
12261
12244
  this.errord = true;
12262
12245
  };
@@ -12615,7 +12598,7 @@ var require_packer = __commonJS((exports, module) => {
12615
12598
  var CrcStream = require_crc();
12616
12599
  var bitPacker = require_bitpacker();
12617
12600
  var filter = require_filter_pack();
12618
- var zlib = import.meta.require("zlib");
12601
+ var zlib = __require("zlib");
12619
12602
  var Packer = module.exports = function(options) {
12620
12603
  this._options = options;
12621
12604
  options.deflateChunkSize = options.deflateChunkSize || 32 * 1024;
@@ -12699,8 +12682,8 @@ var require_packer = __commonJS((exports, module) => {
12699
12682
 
12700
12683
  // node_modules/pngjs/lib/packer-async.js
12701
12684
  var require_packer_async = __commonJS((exports, module) => {
12702
- var util = import.meta.require("util");
12703
- var Stream = import.meta.require("stream");
12685
+ var util = __require("util");
12686
+ var Stream = __require("stream");
12704
12687
  var constants = require_constants();
12705
12688
  var Packer = require_packer();
12706
12689
  var PackerAsync = module.exports = function(opt) {
@@ -12732,10 +12715,10 @@ var require_packer_async = __commonJS((exports, module) => {
12732
12715
 
12733
12716
  // node_modules/pngjs/lib/sync-inflate.js
12734
12717
  var require_sync_inflate = __commonJS((exports, module) => {
12735
- var assert = import.meta.require("assert").ok;
12736
- var zlib = import.meta.require("zlib");
12737
- var util = import.meta.require("util");
12738
- var kMaxLength = import.meta.require("buffer").kMaxLength;
12718
+ var assert = __require("assert").ok;
12719
+ var zlib = __require("zlib");
12720
+ var util = __require("util");
12721
+ var kMaxLength = __require("buffer").kMaxLength;
12739
12722
  function Inflate(opts) {
12740
12723
  if (!(this instanceof Inflate)) {
12741
12724
  return new Inflate(opts);
@@ -12895,8 +12878,7 @@ var require_filter_parse_sync = __commonJS((exports) => {
12895
12878
  write: function(bufferPart) {
12896
12879
  outBuffers.push(bufferPart);
12897
12880
  },
12898
- complete: function() {
12899
- }
12881
+ complete: function() {}
12900
12882
  });
12901
12883
  filter.start();
12902
12884
  reader.process();
@@ -12907,7 +12889,7 @@ var require_filter_parse_sync = __commonJS((exports) => {
12907
12889
  // node_modules/pngjs/lib/parser-sync.js
12908
12890
  var require_parser_sync = __commonJS((exports, module) => {
12909
12891
  var hasSyncZlib = true;
12910
- var zlib = import.meta.require("zlib");
12892
+ var zlib = __require("zlib");
12911
12893
  var inflateSync = require_sync_inflate();
12912
12894
  if (!zlib.deflateSync) {
12913
12895
  hasSyncZlib = false;
@@ -12993,7 +12975,7 @@ var require_parser_sync = __commonJS((exports, module) => {
12993
12975
  // node_modules/pngjs/lib/packer-sync.js
12994
12976
  var require_packer_sync = __commonJS((exports, module) => {
12995
12977
  var hasSyncZlib = true;
12996
- var zlib = import.meta.require("zlib");
12978
+ var zlib = __require("zlib");
12997
12979
  if (!zlib.deflateSync) {
12998
12980
  hasSyncZlib = false;
12999
12981
  }
@@ -13037,8 +13019,8 @@ var require_png_sync = __commonJS((exports) => {
13037
13019
 
13038
13020
  // node_modules/pngjs/lib/png.js
13039
13021
  var require_png = __commonJS((exports) => {
13040
- var util = import.meta.require("util");
13041
- var Stream = import.meta.require("stream");
13022
+ var util = __require("util");
13023
+ var Stream = __require("stream");
13042
13024
  var Parser = require_parser_async();
13043
13025
  var Packer = require_packer_async();
13044
13026
  var PNGSync = require_png_sync();
@@ -13242,7 +13224,7 @@ var require_utils2 = __commonJS((exports) => {
13242
13224
 
13243
13225
  // node_modules/qrcode/lib/renderer/png.js
13244
13226
  var require_png2 = __commonJS((exports) => {
13245
- var fs = import.meta.require("fs");
13227
+ var fs = __require("fs");
13246
13228
  var PNG = require_png().PNG;
13247
13229
  var Utils = require_utils2();
13248
13230
  exports.render = function render(qrData, options) {
@@ -13366,7 +13348,7 @@ var require_utf8 = __commonJS((exports) => {
13366
13348
  cb = options;
13367
13349
  options = undefined;
13368
13350
  }
13369
- const fs = import.meta.require("fs");
13351
+ const fs = __require("fs");
13370
13352
  const utf8 = exports.render(qrData, options);
13371
13353
  fs.writeFile(path, utf8, cb);
13372
13354
  };
@@ -13540,7 +13522,7 @@ var require_svg = __commonJS((exports) => {
13540
13522
  cb = options;
13541
13523
  options = undefined;
13542
13524
  }
13543
- const fs = import.meta.require("fs");
13525
+ const fs = __require("fs");
13544
13526
  const svgTag = exports.render(qrData, options);
13545
13527
  const xmlStr = '<?xml version="1.0" encoding="utf-8"?>' + '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' + svgTag;
13546
13528
  fs.writeFile(path, xmlStr, cb);
@@ -14157,8 +14139,7 @@ function renderBox(lines, width, title) {
14157
14139
  function startBarSection(sectionKey, maxLabelLen) {
14158
14140
  _sectionMaxLabelLen.set(sectionKey, maxLabelLen);
14159
14141
  }
14160
- function endBarSection(_sectionKey) {
14161
- }
14142
+ function endBarSection(_sectionKey) {}
14162
14143
  function renderBarChart(label, value, maxValue, width, color, percentageValue, sectionKey) {
14163
14144
  const safeMaxValue = Math.max(maxValue, 1);
14164
14145
  const pct = percentageValue !== undefined ? percentageValue.toFixed(1) : (value / safeMaxValue * 100).toFixed(1);
@@ -15629,7 +15610,7 @@ async function isCocodInstalled(cocodPath) {
15629
15610
  // package.json
15630
15611
  var package_default = {
15631
15612
  name: "routstrd",
15632
- version: "0.2.20",
15613
+ version: "0.2.21",
15633
15614
  module: "src/index.ts",
15634
15615
  type: "module",
15635
15616
  private: false,
@@ -15653,7 +15634,7 @@ var package_default = {
15653
15634
  },
15654
15635
  dependencies: {
15655
15636
  "@cashu/cashu-ts": "^3.1.1",
15656
- "@routstr/sdk": "^0.3.5",
15637
+ "@routstr/sdk": "^0.3.6",
15657
15638
  "applesauce-core": "^5.1.0",
15658
15639
  "applesauce-relay": "^5.1.0",
15659
15640
  commander: "^14.0.2",
@@ -16428,7 +16409,7 @@ serviceCmd.command("install").description("Install and start routstrd using PM2
16428
16409
  try {
16429
16410
  daemonPath = Bun.resolveSync("./daemon/index.js", import.meta.url);
16430
16411
  } catch (e) {
16431
- const path = import.meta.require("path");
16412
+ const path = __require("path");
16432
16413
  daemonPath = path.join(path.dirname(import.meta.url).replace("file://", ""), "daemon", "index.js");
16433
16414
  }
16434
16415
  if (!existsSync9(daemonPath)) {
@@ -16465,8 +16446,7 @@ serviceCmd.command("uninstall").description("Stop and remove routstrd from PM2")
16465
16446
  serviceCmd.command("logs").description("View PM2 logs for routstrd").action(() => {
16466
16447
  try {
16467
16448
  execSync("pm2 logs routstrd", { stdio: "inherit" });
16468
- } catch (e) {
16469
- }
16449
+ } catch (e) {}
16470
16450
  });
16471
16451
  program.command("restart").description("Restart the background daemon").option("--port <port>", "Port to listen on").option("-p, --provider <provider>", "Default provider to use").action(async (options) => {
16472
16452
  await requireLocalDaemon();
@@ -16507,7 +16487,7 @@ program.command("mode").description("Set the client mode (lazyrefund/apikeys or
16507
16487
  Current mode: ${currentMode}`);
16508
16488
  const modes = ["apikeys", "xcashu"];
16509
16489
  const selectedIndex = await new Promise((resolve) => {
16510
- const rl = import.meta.require("readline").createInterface({
16490
+ const rl = __require("readline").createInterface({
16511
16491
  input: process.stdin,
16512
16492
  output: process.stdout
16513
16493
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "routstrd",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "module": "src/index.ts",
5
5
  "type": "module",
6
6
  "private": false,
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@cashu/cashu-ts": "^3.1.1",
27
- "@routstr/sdk": "^0.3.5",
27
+ "@routstr/sdk": "^0.3.6",
28
28
  "applesauce-core": "^5.1.0",
29
29
  "applesauce-relay": "^5.1.0",
30
30
  "commander": "^14.0.2",
@@ -14,6 +14,8 @@ export interface RoutstrdConfig {
14
14
  mode?: "xcashu" | "apikeys";
15
15
  daemonUrl?: string;
16
16
  nsec?: string;
17
+ /** Nostr hex pubkey for routstr review/model events (kind 38425/38423). */
18
+ routstrPubkey?: string;
17
19
  }
18
20
 
19
21
  export const DEFAULT_CONFIG: RoutstrdConfig = {