@settlemint/sdk-cli 2.2.0-pr503fed4b → 2.2.0-pr8f0116cb

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.
Files changed (3) hide show
  1. package/dist/cli.js +577 -467
  2. package/dist/cli.js.map +27 -29
  3. package/package.json +3 -3
package/dist/cli.js CHANGED
@@ -4166,21 +4166,54 @@ var require_webcrypto = __commonJS((exports) => {
4166
4166
  exports.gcm = /* @__PURE__ */ (() => generate(mode.GCM))();
4167
4167
  });
4168
4168
 
4169
- // ../../node_modules/@noble/hashes/_assert.js
4170
- var require__assert = __commonJS((exports) => {
4169
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/cryptoNode.js
4170
+ var require_cryptoNode2 = __commonJS((exports) => {
4171
+ Object.defineProperty(exports, "__esModule", { value: true });
4172
+ exports.crypto = undefined;
4173
+ var nc = __require("node:crypto");
4174
+ exports.crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && ("randomBytes" in nc) ? nc : undefined;
4175
+ });
4176
+
4177
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/utils.js
4178
+ var require_utils4 = __commonJS((exports) => {
4179
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
4171
4180
  Object.defineProperty(exports, "__esModule", { value: true });
4181
+ exports.wrapXOFConstructorWithOpts = exports.wrapConstructorWithOpts = exports.wrapConstructor = exports.Hash = exports.nextTick = exports.swap32IfBE = exports.byteSwapIfBE = exports.swap8IfBE = exports.isLE = undefined;
4182
+ exports.isBytes = isBytes;
4172
4183
  exports.anumber = anumber;
4173
4184
  exports.abytes = abytes;
4174
4185
  exports.ahash = ahash;
4175
4186
  exports.aexists = aexists;
4176
4187
  exports.aoutput = aoutput;
4188
+ exports.u8 = u8;
4189
+ exports.u32 = u32;
4190
+ exports.clean = clean;
4191
+ exports.createView = createView;
4192
+ exports.rotr = rotr;
4193
+ exports.rotl = rotl;
4194
+ exports.byteSwap = byteSwap;
4195
+ exports.byteSwap32 = byteSwap32;
4196
+ exports.bytesToHex = bytesToHex;
4197
+ exports.hexToBytes = hexToBytes;
4198
+ exports.asyncLoop = asyncLoop;
4199
+ exports.utf8ToBytes = utf8ToBytes;
4200
+ exports.bytesToUtf8 = bytesToUtf8;
4201
+ exports.toBytes = toBytes;
4202
+ exports.kdfInputToBytes = kdfInputToBytes;
4203
+ exports.concatBytes = concatBytes;
4204
+ exports.checkOpts = checkOpts;
4205
+ exports.createHasher = createHasher;
4206
+ exports.createOptHasher = createOptHasher;
4207
+ exports.createXOFer = createXOFer;
4208
+ exports.randomBytes = randomBytes;
4209
+ var crypto_1 = require_cryptoNode2();
4210
+ function isBytes(a) {
4211
+ return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
4212
+ }
4177
4213
  function anumber(n) {
4178
4214
  if (!Number.isSafeInteger(n) || n < 0)
4179
4215
  throw new Error("positive integer expected, got " + n);
4180
4216
  }
4181
- function isBytes(a) {
4182
- return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
4183
- }
4184
4217
  function abytes(b, ...lengths) {
4185
4218
  if (!isBytes(b))
4186
4219
  throw new Error("Uint8Array expected");
@@ -4189,7 +4222,7 @@ var require__assert = __commonJS((exports) => {
4189
4222
  }
4190
4223
  function ahash(h) {
4191
4224
  if (typeof h !== "function" || typeof h.create !== "function")
4192
- throw new Error("Hash should be wrapped by utils.wrapConstructor");
4225
+ throw new Error("Hash should be wrapped by utils.createHasher");
4193
4226
  anumber(h.outputLen);
4194
4227
  anumber(h.blockLen);
4195
4228
  }
@@ -4206,51 +4239,17 @@ var require__assert = __commonJS((exports) => {
4206
4239
  throw new Error("digestInto() expects output buffer of length at least " + min);
4207
4240
  }
4208
4241
  }
4209
- });
4210
-
4211
- // ../../node_modules/@noble/hashes/cryptoNode.js
4212
- var require_cryptoNode2 = __commonJS((exports) => {
4213
- Object.defineProperty(exports, "__esModule", { value: true });
4214
- exports.crypto = undefined;
4215
- var nc = __require("node:crypto");
4216
- exports.crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && ("randomBytes" in nc) ? nc : undefined;
4217
- });
4218
-
4219
- // ../../node_modules/@noble/hashes/utils.js
4220
- var require_utils4 = __commonJS((exports) => {
4221
- /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
4222
- Object.defineProperty(exports, "__esModule", { value: true });
4223
- exports.Hash = exports.nextTick = exports.byteSwapIfBE = exports.isLE = undefined;
4224
- exports.isBytes = isBytes;
4225
- exports.u8 = u8;
4226
- exports.u32 = u32;
4227
- exports.createView = createView;
4228
- exports.rotr = rotr;
4229
- exports.rotl = rotl;
4230
- exports.byteSwap = byteSwap;
4231
- exports.byteSwap32 = byteSwap32;
4232
- exports.bytesToHex = bytesToHex;
4233
- exports.hexToBytes = hexToBytes;
4234
- exports.asyncLoop = asyncLoop;
4235
- exports.utf8ToBytes = utf8ToBytes;
4236
- exports.toBytes = toBytes;
4237
- exports.concatBytes = concatBytes;
4238
- exports.checkOpts = checkOpts;
4239
- exports.wrapConstructor = wrapConstructor;
4240
- exports.wrapConstructorWithOpts = wrapConstructorWithOpts;
4241
- exports.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;
4242
- exports.randomBytes = randomBytes;
4243
- var crypto_1 = require_cryptoNode2();
4244
- var _assert_ts_1 = require__assert();
4245
- function isBytes(a) {
4246
- return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
4247
- }
4248
4242
  function u8(arr) {
4249
4243
  return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
4250
4244
  }
4251
4245
  function u32(arr) {
4252
4246
  return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
4253
4247
  }
4248
+ function clean(...arrays) {
4249
+ for (let i = 0;i < arrays.length; i++) {
4250
+ arrays[i].fill(0);
4251
+ }
4252
+ }
4254
4253
  function createView(arr) {
4255
4254
  return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
4256
4255
  }
@@ -4264,16 +4263,19 @@ var require_utils4 = __commonJS((exports) => {
4264
4263
  function byteSwap(word) {
4265
4264
  return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
4266
4265
  }
4267
- exports.byteSwapIfBE = exports.isLE ? (n) => n : (n) => byteSwap(n);
4266
+ exports.swap8IfBE = exports.isLE ? (n) => n : (n) => byteSwap(n);
4267
+ exports.byteSwapIfBE = exports.swap8IfBE;
4268
4268
  function byteSwap32(arr) {
4269
4269
  for (let i = 0;i < arr.length; i++) {
4270
4270
  arr[i] = byteSwap(arr[i]);
4271
4271
  }
4272
+ return arr;
4272
4273
  }
4273
- var hasHexBuiltin = typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function";
4274
+ exports.swap32IfBE = exports.isLE ? (u) => u : byteSwap32;
4275
+ var hasHexBuiltin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function")();
4274
4276
  var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
4275
4277
  function bytesToHex(bytes) {
4276
- (0, _assert_ts_1.abytes)(bytes);
4278
+ abytes(bytes);
4277
4279
  if (hasHexBuiltin)
4278
4280
  return bytes.toHex();
4279
4281
  let hex = "";
@@ -4328,20 +4330,29 @@ var require_utils4 = __commonJS((exports) => {
4328
4330
  }
4329
4331
  function utf8ToBytes(str) {
4330
4332
  if (typeof str !== "string")
4331
- throw new Error("utf8ToBytes expected string, got " + typeof str);
4333
+ throw new Error("string expected");
4332
4334
  return new Uint8Array(new TextEncoder().encode(str));
4333
4335
  }
4336
+ function bytesToUtf8(bytes) {
4337
+ return new TextDecoder().decode(bytes);
4338
+ }
4334
4339
  function toBytes(data) {
4335
4340
  if (typeof data === "string")
4336
4341
  data = utf8ToBytes(data);
4337
- (0, _assert_ts_1.abytes)(data);
4342
+ abytes(data);
4343
+ return data;
4344
+ }
4345
+ function kdfInputToBytes(data) {
4346
+ if (typeof data === "string")
4347
+ data = utf8ToBytes(data);
4348
+ abytes(data);
4338
4349
  return data;
4339
4350
  }
4340
4351
  function concatBytes(...arrays) {
4341
4352
  let sum = 0;
4342
4353
  for (let i = 0;i < arrays.length; i++) {
4343
4354
  const a = arrays[i];
4344
- (0, _assert_ts_1.abytes)(a);
4355
+ abytes(a);
4345
4356
  sum += a.length;
4346
4357
  }
4347
4358
  const res = new Uint8Array(sum);
@@ -4352,20 +4363,17 @@ var require_utils4 = __commonJS((exports) => {
4352
4363
  }
4353
4364
  return res;
4354
4365
  }
4355
-
4356
- class Hash {
4357
- clone() {
4358
- return this._cloneInto();
4359
- }
4360
- }
4361
- exports.Hash = Hash;
4362
4366
  function checkOpts(defaults, opts) {
4363
4367
  if (opts !== undefined && {}.toString.call(opts) !== "[object Object]")
4364
- throw new Error("Options should be object or undefined");
4368
+ throw new Error("options should be object or undefined");
4365
4369
  const merged = Object.assign(defaults, opts);
4366
4370
  return merged;
4367
4371
  }
4368
- function wrapConstructor(hashCons) {
4372
+
4373
+ class Hash {
4374
+ }
4375
+ exports.Hash = Hash;
4376
+ function createHasher(hashCons) {
4369
4377
  const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
4370
4378
  const tmp = hashCons();
4371
4379
  hashC.outputLen = tmp.outputLen;
@@ -4373,7 +4381,7 @@ var require_utils4 = __commonJS((exports) => {
4373
4381
  hashC.create = () => hashCons();
4374
4382
  return hashC;
4375
4383
  }
4376
- function wrapConstructorWithOpts(hashCons) {
4384
+ function createOptHasher(hashCons) {
4377
4385
  const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
4378
4386
  const tmp = hashCons({});
4379
4387
  hashC.outputLen = tmp.outputLen;
@@ -4381,7 +4389,7 @@ var require_utils4 = __commonJS((exports) => {
4381
4389
  hashC.create = (opts) => hashCons(opts);
4382
4390
  return hashC;
4383
4391
  }
4384
- function wrapXOFConstructorWithOpts(hashCons) {
4392
+ function createXOFer(hashCons) {
4385
4393
  const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
4386
4394
  const tmp = hashCons({});
4387
4395
  hashC.outputLen = tmp.outputLen;
@@ -4389,6 +4397,9 @@ var require_utils4 = __commonJS((exports) => {
4389
4397
  hashC.create = (opts) => hashCons(opts);
4390
4398
  return hashC;
4391
4399
  }
4400
+ exports.wrapConstructor = createHasher;
4401
+ exports.wrapConstructorWithOpts = createOptHasher;
4402
+ exports.wrapXOFConstructorWithOpts = createXOFer;
4392
4403
  function randomBytes(bytesLength = 32) {
4393
4404
  if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === "function") {
4394
4405
  return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));
@@ -4400,14 +4411,13 @@ var require_utils4 = __commonJS((exports) => {
4400
4411
  }
4401
4412
  });
4402
4413
 
4403
- // ../../node_modules/@noble/hashes/_md.js
4414
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/_md.js
4404
4415
  var require__md = __commonJS((exports) => {
4405
4416
  Object.defineProperty(exports, "__esModule", { value: true });
4406
- exports.HashMD = undefined;
4417
+ exports.SHA512_IV = exports.SHA384_IV = exports.SHA224_IV = exports.SHA256_IV = exports.HashMD = undefined;
4407
4418
  exports.setBigUint64 = setBigUint64;
4408
4419
  exports.Chi = Chi;
4409
4420
  exports.Maj = Maj;
4410
- var _assert_ts_1 = require__assert();
4411
4421
  var utils_ts_1 = require_utils4();
4412
4422
  function setBigUint64(view, byteOffset, value, isLE) {
4413
4423
  if (typeof view.setBigUint64 === "function")
@@ -4443,9 +4453,10 @@ var require__md = __commonJS((exports) => {
4443
4453
  this.view = (0, utils_ts_1.createView)(this.buffer);
4444
4454
  }
4445
4455
  update(data) {
4446
- (0, _assert_ts_1.aexists)(this);
4447
- const { view, buffer, blockLen } = this;
4456
+ (0, utils_ts_1.aexists)(this);
4448
4457
  data = (0, utils_ts_1.toBytes)(data);
4458
+ (0, utils_ts_1.abytes)(data);
4459
+ const { view, buffer, blockLen } = this;
4449
4460
  const len = data.length;
4450
4461
  for (let pos = 0;pos < len; ) {
4451
4462
  const take = Math.min(blockLen - this.pos, len - pos);
@@ -4468,13 +4479,13 @@ var require__md = __commonJS((exports) => {
4468
4479
  return this;
4469
4480
  }
4470
4481
  digestInto(out) {
4471
- (0, _assert_ts_1.aexists)(this);
4472
- (0, _assert_ts_1.aoutput)(out, this);
4482
+ (0, utils_ts_1.aexists)(this);
4483
+ (0, utils_ts_1.aoutput)(out, this);
4473
4484
  this.finished = true;
4474
4485
  const { buffer, view, blockLen, isLE } = this;
4475
4486
  let { pos } = this;
4476
4487
  buffer[pos++] = 128;
4477
- this.buffer.subarray(pos).fill(0);
4488
+ (0, utils_ts_1.clean)(this.buffer.subarray(pos));
4478
4489
  if (this.padOffset > blockLen - pos) {
4479
4490
  this.process(view, 0);
4480
4491
  pos = 0;
@@ -4505,25 +4516,178 @@ var require__md = __commonJS((exports) => {
4505
4516
  to || (to = new this.constructor);
4506
4517
  to.set(...this.get());
4507
4518
  const { blockLen, buffer, length, finished, destroyed, pos } = this;
4519
+ to.destroyed = destroyed;
4520
+ to.finished = finished;
4508
4521
  to.length = length;
4509
4522
  to.pos = pos;
4510
- to.finished = finished;
4511
- to.destroyed = destroyed;
4512
4523
  if (length % blockLen)
4513
4524
  to.buffer.set(buffer);
4514
4525
  return to;
4515
4526
  }
4527
+ clone() {
4528
+ return this._cloneInto();
4529
+ }
4516
4530
  }
4517
4531
  exports.HashMD = HashMD;
4532
+ exports.SHA256_IV = Uint32Array.from([
4533
+ 1779033703,
4534
+ 3144134277,
4535
+ 1013904242,
4536
+ 2773480762,
4537
+ 1359893119,
4538
+ 2600822924,
4539
+ 528734635,
4540
+ 1541459225
4541
+ ]);
4542
+ exports.SHA224_IV = Uint32Array.from([
4543
+ 3238371032,
4544
+ 914150663,
4545
+ 812702999,
4546
+ 4144912697,
4547
+ 4290775857,
4548
+ 1750603025,
4549
+ 1694076839,
4550
+ 3204075428
4551
+ ]);
4552
+ exports.SHA384_IV = Uint32Array.from([
4553
+ 3418070365,
4554
+ 3238371032,
4555
+ 1654270250,
4556
+ 914150663,
4557
+ 2438529370,
4558
+ 812702999,
4559
+ 355462360,
4560
+ 4144912697,
4561
+ 1731405415,
4562
+ 4290775857,
4563
+ 2394180231,
4564
+ 1750603025,
4565
+ 3675008525,
4566
+ 1694076839,
4567
+ 1203062813,
4568
+ 3204075428
4569
+ ]);
4570
+ exports.SHA512_IV = Uint32Array.from([
4571
+ 1779033703,
4572
+ 4089235720,
4573
+ 3144134277,
4574
+ 2227873595,
4575
+ 1013904242,
4576
+ 4271175723,
4577
+ 2773480762,
4578
+ 1595750129,
4579
+ 1359893119,
4580
+ 2917565137,
4581
+ 2600822924,
4582
+ 725511199,
4583
+ 528734635,
4584
+ 4215389547,
4585
+ 1541459225,
4586
+ 327033209
4587
+ ]);
4518
4588
  });
4519
4589
 
4520
- // ../../node_modules/@noble/hashes/sha256.js
4521
- var require_sha256 = __commonJS((exports) => {
4590
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/_u64.js
4591
+ var require__u64 = __commonJS((exports) => {
4522
4592
  Object.defineProperty(exports, "__esModule", { value: true });
4523
- exports.sha224 = exports.sha256 = exports.SHA256 = undefined;
4593
+ exports.toBig = exports.shrSL = exports.shrSH = exports.rotrSL = exports.rotrSH = exports.rotrBL = exports.rotrBH = exports.rotr32L = exports.rotr32H = exports.rotlSL = exports.rotlSH = exports.rotlBL = exports.rotlBH = exports.add5L = exports.add5H = exports.add4L = exports.add4H = exports.add3L = exports.add3H = undefined;
4594
+ exports.add = add;
4595
+ exports.fromBig = fromBig;
4596
+ exports.split = split;
4597
+ var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
4598
+ var _32n = /* @__PURE__ */ BigInt(32);
4599
+ function fromBig(n, le = false) {
4600
+ if (le)
4601
+ return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
4602
+ return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
4603
+ }
4604
+ function split(lst, le = false) {
4605
+ const len = lst.length;
4606
+ let Ah = new Uint32Array(len);
4607
+ let Al = new Uint32Array(len);
4608
+ for (let i = 0;i < len; i++) {
4609
+ const { h, l } = fromBig(lst[i], le);
4610
+ [Ah[i], Al[i]] = [h, l];
4611
+ }
4612
+ return [Ah, Al];
4613
+ }
4614
+ var toBig = (h, l) => BigInt(h >>> 0) << _32n | BigInt(l >>> 0);
4615
+ exports.toBig = toBig;
4616
+ var shrSH = (h, _l, s) => h >>> s;
4617
+ exports.shrSH = shrSH;
4618
+ var shrSL = (h, l, s) => h << 32 - s | l >>> s;
4619
+ exports.shrSL = shrSL;
4620
+ var rotrSH = (h, l, s) => h >>> s | l << 32 - s;
4621
+ exports.rotrSH = rotrSH;
4622
+ var rotrSL = (h, l, s) => h << 32 - s | l >>> s;
4623
+ exports.rotrSL = rotrSL;
4624
+ var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
4625
+ exports.rotrBH = rotrBH;
4626
+ var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
4627
+ exports.rotrBL = rotrBL;
4628
+ var rotr32H = (_h, l) => l;
4629
+ exports.rotr32H = rotr32H;
4630
+ var rotr32L = (h, _l) => h;
4631
+ exports.rotr32L = rotr32L;
4632
+ var rotlSH = (h, l, s) => h << s | l >>> 32 - s;
4633
+ exports.rotlSH = rotlSH;
4634
+ var rotlSL = (h, l, s) => l << s | h >>> 32 - s;
4635
+ exports.rotlSL = rotlSL;
4636
+ var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
4637
+ exports.rotlBH = rotlBH;
4638
+ var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
4639
+ exports.rotlBL = rotlBL;
4640
+ function add(Ah, Al, Bh, Bl) {
4641
+ const l = (Al >>> 0) + (Bl >>> 0);
4642
+ return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };
4643
+ }
4644
+ var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
4645
+ exports.add3L = add3L;
4646
+ var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
4647
+ exports.add3H = add3H;
4648
+ var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
4649
+ exports.add4L = add4L;
4650
+ var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
4651
+ exports.add4H = add4H;
4652
+ var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
4653
+ exports.add5L = add5L;
4654
+ var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
4655
+ exports.add5H = add5H;
4656
+ var u64 = {
4657
+ fromBig,
4658
+ split,
4659
+ toBig,
4660
+ shrSH,
4661
+ shrSL,
4662
+ rotrSH,
4663
+ rotrSL,
4664
+ rotrBH,
4665
+ rotrBL,
4666
+ rotr32H,
4667
+ rotr32L,
4668
+ rotlSH,
4669
+ rotlSL,
4670
+ rotlBH,
4671
+ rotlBL,
4672
+ add,
4673
+ add3L,
4674
+ add3H,
4675
+ add4L,
4676
+ add4H,
4677
+ add5H,
4678
+ add5L
4679
+ };
4680
+ exports.default = u64;
4681
+ });
4682
+
4683
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/sha2.js
4684
+ var require_sha2 = __commonJS((exports) => {
4685
+ Object.defineProperty(exports, "__esModule", { value: true });
4686
+ exports.sha512_224 = exports.sha512_256 = exports.sha384 = exports.sha512 = exports.sha224 = exports.sha256 = exports.SHA512_256 = exports.SHA512_224 = exports.SHA384 = exports.SHA512 = exports.SHA224 = exports.SHA256 = undefined;
4524
4687
  var _md_ts_1 = require__md();
4688
+ var u64 = require__u64();
4525
4689
  var utils_ts_1 = require_utils4();
4526
- var SHA256_K = /* @__PURE__ */ new Uint32Array([
4690
+ var SHA256_K = /* @__PURE__ */ Uint32Array.from([
4527
4691
  1116352408,
4528
4692
  1899447441,
4529
4693
  3049323471,
@@ -4589,29 +4753,19 @@ var require_sha256 = __commonJS((exports) => {
4589
4753
  3204031479,
4590
4754
  3329325298
4591
4755
  ]);
4592
- var SHA256_IV = /* @__PURE__ */ new Uint32Array([
4593
- 1779033703,
4594
- 3144134277,
4595
- 1013904242,
4596
- 2773480762,
4597
- 1359893119,
4598
- 2600822924,
4599
- 528734635,
4600
- 1541459225
4601
- ]);
4602
4756
  var SHA256_W = /* @__PURE__ */ new Uint32Array(64);
4603
4757
 
4604
4758
  class SHA256 extends _md_ts_1.HashMD {
4605
4759
  constructor(outputLen = 32) {
4606
4760
  super(64, outputLen, 8, false);
4607
- this.A = SHA256_IV[0] | 0;
4608
- this.B = SHA256_IV[1] | 0;
4609
- this.C = SHA256_IV[2] | 0;
4610
- this.D = SHA256_IV[3] | 0;
4611
- this.E = SHA256_IV[4] | 0;
4612
- this.F = SHA256_IV[5] | 0;
4613
- this.G = SHA256_IV[6] | 0;
4614
- this.H = SHA256_IV[7] | 0;
4761
+ this.A = _md_ts_1.SHA256_IV[0] | 0;
4762
+ this.B = _md_ts_1.SHA256_IV[1] | 0;
4763
+ this.C = _md_ts_1.SHA256_IV[2] | 0;
4764
+ this.D = _md_ts_1.SHA256_IV[3] | 0;
4765
+ this.E = _md_ts_1.SHA256_IV[4] | 0;
4766
+ this.F = _md_ts_1.SHA256_IV[5] | 0;
4767
+ this.G = _md_ts_1.SHA256_IV[6] | 0;
4768
+ this.H = _md_ts_1.SHA256_IV[7] | 0;
4615
4769
  }
4616
4770
  get() {
4617
4771
  const { A, B, C, D, E, F, G, H } = this;
@@ -4663,11 +4817,11 @@ var require_sha256 = __commonJS((exports) => {
4663
4817
  this.set(A, B, C, D, E, F, G, H);
4664
4818
  }
4665
4819
  roundClean() {
4666
- SHA256_W.fill(0);
4820
+ (0, utils_ts_1.clean)(SHA256_W);
4667
4821
  }
4668
4822
  destroy() {
4669
4823
  this.set(0, 0, 0, 0, 0, 0, 0, 0);
4670
- this.buffer.fill(0);
4824
+ (0, utils_ts_1.clean)(this.buffer);
4671
4825
  }
4672
4826
  }
4673
4827
  exports.SHA256 = SHA256;
@@ -4675,120 +4829,18 @@ var require_sha256 = __commonJS((exports) => {
4675
4829
  class SHA224 extends SHA256 {
4676
4830
  constructor() {
4677
4831
  super(28);
4678
- this.A = 3238371032 | 0;
4679
- this.B = 914150663 | 0;
4680
- this.C = 812702999 | 0;
4681
- this.D = 4144912697 | 0;
4682
- this.E = 4290775857 | 0;
4683
- this.F = 1750603025 | 0;
4684
- this.G = 1694076839 | 0;
4685
- this.H = 3204075428 | 0;
4686
- }
4687
- }
4688
- exports.sha256 = (0, utils_ts_1.wrapConstructor)(() => new SHA256);
4689
- exports.sha224 = (0, utils_ts_1.wrapConstructor)(() => new SHA224);
4690
- });
4691
-
4692
- // ../../node_modules/@noble/hashes/_u64.js
4693
- var require__u64 = __commonJS((exports) => {
4694
- Object.defineProperty(exports, "__esModule", { value: true });
4695
- exports.add5L = exports.add5H = exports.add4H = exports.add4L = exports.add3H = exports.add3L = exports.rotlBL = exports.rotlBH = exports.rotlSL = exports.rotlSH = exports.rotr32L = exports.rotr32H = exports.rotrBL = exports.rotrBH = exports.rotrSL = exports.rotrSH = exports.shrSL = exports.shrSH = exports.toBig = undefined;
4696
- exports.fromBig = fromBig;
4697
- exports.split = split;
4698
- exports.add = add;
4699
- var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
4700
- var _32n = /* @__PURE__ */ BigInt(32);
4701
- function fromBig(n, le = false) {
4702
- if (le)
4703
- return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
4704
- return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
4705
- }
4706
- function split(lst, le = false) {
4707
- let Ah = new Uint32Array(lst.length);
4708
- let Al = new Uint32Array(lst.length);
4709
- for (let i = 0;i < lst.length; i++) {
4710
- const { h, l } = fromBig(lst[i], le);
4711
- [Ah[i], Al[i]] = [h, l];
4712
- }
4713
- return [Ah, Al];
4714
- }
4715
- var toBig = (h, l) => BigInt(h >>> 0) << _32n | BigInt(l >>> 0);
4716
- exports.toBig = toBig;
4717
- var shrSH = (h, _l, s) => h >>> s;
4718
- exports.shrSH = shrSH;
4719
- var shrSL = (h, l, s) => h << 32 - s | l >>> s;
4720
- exports.shrSL = shrSL;
4721
- var rotrSH = (h, l, s) => h >>> s | l << 32 - s;
4722
- exports.rotrSH = rotrSH;
4723
- var rotrSL = (h, l, s) => h << 32 - s | l >>> s;
4724
- exports.rotrSL = rotrSL;
4725
- var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
4726
- exports.rotrBH = rotrBH;
4727
- var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
4728
- exports.rotrBL = rotrBL;
4729
- var rotr32H = (_h, l) => l;
4730
- exports.rotr32H = rotr32H;
4731
- var rotr32L = (h, _l) => h;
4732
- exports.rotr32L = rotr32L;
4733
- var rotlSH = (h, l, s) => h << s | l >>> 32 - s;
4734
- exports.rotlSH = rotlSH;
4735
- var rotlSL = (h, l, s) => l << s | h >>> 32 - s;
4736
- exports.rotlSL = rotlSL;
4737
- var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
4738
- exports.rotlBH = rotlBH;
4739
- var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
4740
- exports.rotlBL = rotlBL;
4741
- function add(Ah, Al, Bh, Bl) {
4742
- const l = (Al >>> 0) + (Bl >>> 0);
4743
- return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };
4744
- }
4745
- var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
4746
- exports.add3L = add3L;
4747
- var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
4748
- exports.add3H = add3H;
4749
- var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
4750
- exports.add4L = add4L;
4751
- var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
4752
- exports.add4H = add4H;
4753
- var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
4754
- exports.add5L = add5L;
4755
- var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
4756
- exports.add5H = add5H;
4757
- var u64 = {
4758
- fromBig,
4759
- split,
4760
- toBig,
4761
- shrSH,
4762
- shrSL,
4763
- rotrSH,
4764
- rotrSL,
4765
- rotrBH,
4766
- rotrBL,
4767
- rotr32H,
4768
- rotr32L,
4769
- rotlSH,
4770
- rotlSL,
4771
- rotlBH,
4772
- rotlBL,
4773
- add,
4774
- add3L,
4775
- add3H,
4776
- add4L,
4777
- add4H,
4778
- add5H,
4779
- add5L
4780
- };
4781
- exports.default = u64;
4782
- });
4783
-
4784
- // ../../node_modules/@noble/hashes/sha512.js
4785
- var require_sha512 = __commonJS((exports) => {
4786
- Object.defineProperty(exports, "__esModule", { value: true });
4787
- exports.sha384 = exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.SHA384 = exports.SHA512_256 = exports.SHA512_224 = exports.SHA512 = undefined;
4788
- var _md_ts_1 = require__md();
4789
- var _u64_ts_1 = require__u64();
4790
- var utils_ts_1 = require_utils4();
4791
- var [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => _u64_ts_1.default.split([
4832
+ this.A = _md_ts_1.SHA224_IV[0] | 0;
4833
+ this.B = _md_ts_1.SHA224_IV[1] | 0;
4834
+ this.C = _md_ts_1.SHA224_IV[2] | 0;
4835
+ this.D = _md_ts_1.SHA224_IV[3] | 0;
4836
+ this.E = _md_ts_1.SHA224_IV[4] | 0;
4837
+ this.F = _md_ts_1.SHA224_IV[5] | 0;
4838
+ this.G = _md_ts_1.SHA224_IV[6] | 0;
4839
+ this.H = _md_ts_1.SHA224_IV[7] | 0;
4840
+ }
4841
+ }
4842
+ exports.SHA224 = SHA224;
4843
+ var K512 = /* @__PURE__ */ (() => u64.split([
4792
4844
  "0x428a2f98d728ae22",
4793
4845
  "0x7137449123ef65cd",
4794
4846
  "0xb5c0fbcfec4d3b2f",
@@ -4870,28 +4922,30 @@ var require_sha512 = __commonJS((exports) => {
4870
4922
  "0x5fcb6fab3ad6faec",
4871
4923
  "0x6c44198c4a475817"
4872
4924
  ].map((n) => BigInt(n))))();
4925
+ var SHA512_Kh = /* @__PURE__ */ (() => K512[0])();
4926
+ var SHA512_Kl = /* @__PURE__ */ (() => K512[1])();
4873
4927
  var SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);
4874
4928
  var SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);
4875
4929
 
4876
4930
  class SHA512 extends _md_ts_1.HashMD {
4877
4931
  constructor(outputLen = 64) {
4878
4932
  super(128, outputLen, 16, false);
4879
- this.Ah = 1779033703 | 0;
4880
- this.Al = 4089235720 | 0;
4881
- this.Bh = 3144134277 | 0;
4882
- this.Bl = 2227873595 | 0;
4883
- this.Ch = 1013904242 | 0;
4884
- this.Cl = 4271175723 | 0;
4885
- this.Dh = 2773480762 | 0;
4886
- this.Dl = 1595750129 | 0;
4887
- this.Eh = 1359893119 | 0;
4888
- this.El = 2917565137 | 0;
4889
- this.Fh = 2600822924 | 0;
4890
- this.Fl = 725511199 | 0;
4891
- this.Gh = 528734635 | 0;
4892
- this.Gl = 4215389547 | 0;
4893
- this.Hh = 1541459225 | 0;
4894
- this.Hl = 327033209 | 0;
4933
+ this.Ah = _md_ts_1.SHA512_IV[0] | 0;
4934
+ this.Al = _md_ts_1.SHA512_IV[1] | 0;
4935
+ this.Bh = _md_ts_1.SHA512_IV[2] | 0;
4936
+ this.Bl = _md_ts_1.SHA512_IV[3] | 0;
4937
+ this.Ch = _md_ts_1.SHA512_IV[4] | 0;
4938
+ this.Cl = _md_ts_1.SHA512_IV[5] | 0;
4939
+ this.Dh = _md_ts_1.SHA512_IV[6] | 0;
4940
+ this.Dl = _md_ts_1.SHA512_IV[7] | 0;
4941
+ this.Eh = _md_ts_1.SHA512_IV[8] | 0;
4942
+ this.El = _md_ts_1.SHA512_IV[9] | 0;
4943
+ this.Fh = _md_ts_1.SHA512_IV[10] | 0;
4944
+ this.Fl = _md_ts_1.SHA512_IV[11] | 0;
4945
+ this.Gh = _md_ts_1.SHA512_IV[12] | 0;
4946
+ this.Gl = _md_ts_1.SHA512_IV[13] | 0;
4947
+ this.Hh = _md_ts_1.SHA512_IV[14] | 0;
4948
+ this.Hl = _md_ts_1.SHA512_IV[15] | 0;
4895
4949
  }
4896
4950
  get() {
4897
4951
  const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
@@ -4923,28 +4977,28 @@ var require_sha512 = __commonJS((exports) => {
4923
4977
  for (let i = 16;i < 80; i++) {
4924
4978
  const W15h = SHA512_W_H[i - 15] | 0;
4925
4979
  const W15l = SHA512_W_L[i - 15] | 0;
4926
- const s0h = _u64_ts_1.default.rotrSH(W15h, W15l, 1) ^ _u64_ts_1.default.rotrSH(W15h, W15l, 8) ^ _u64_ts_1.default.shrSH(W15h, W15l, 7);
4927
- const s0l = _u64_ts_1.default.rotrSL(W15h, W15l, 1) ^ _u64_ts_1.default.rotrSL(W15h, W15l, 8) ^ _u64_ts_1.default.shrSL(W15h, W15l, 7);
4980
+ const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);
4981
+ const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);
4928
4982
  const W2h = SHA512_W_H[i - 2] | 0;
4929
4983
  const W2l = SHA512_W_L[i - 2] | 0;
4930
- const s1h = _u64_ts_1.default.rotrSH(W2h, W2l, 19) ^ _u64_ts_1.default.rotrBH(W2h, W2l, 61) ^ _u64_ts_1.default.shrSH(W2h, W2l, 6);
4931
- const s1l = _u64_ts_1.default.rotrSL(W2h, W2l, 19) ^ _u64_ts_1.default.rotrBL(W2h, W2l, 61) ^ _u64_ts_1.default.shrSL(W2h, W2l, 6);
4932
- const SUMl = _u64_ts_1.default.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
4933
- const SUMh = _u64_ts_1.default.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
4984
+ const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);
4985
+ const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);
4986
+ const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
4987
+ const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
4934
4988
  SHA512_W_H[i] = SUMh | 0;
4935
4989
  SHA512_W_L[i] = SUMl | 0;
4936
4990
  }
4937
4991
  let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
4938
4992
  for (let i = 0;i < 80; i++) {
4939
- const sigma1h = _u64_ts_1.default.rotrSH(Eh, El, 14) ^ _u64_ts_1.default.rotrSH(Eh, El, 18) ^ _u64_ts_1.default.rotrBH(Eh, El, 41);
4940
- const sigma1l = _u64_ts_1.default.rotrSL(Eh, El, 14) ^ _u64_ts_1.default.rotrSL(Eh, El, 18) ^ _u64_ts_1.default.rotrBL(Eh, El, 41);
4993
+ const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);
4994
+ const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);
4941
4995
  const CHIh = Eh & Fh ^ ~Eh & Gh;
4942
4996
  const CHIl = El & Fl ^ ~El & Gl;
4943
- const T1ll = _u64_ts_1.default.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
4944
- const T1h = _u64_ts_1.default.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
4997
+ const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
4998
+ const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
4945
4999
  const T1l = T1ll | 0;
4946
- const sigma0h = _u64_ts_1.default.rotrSH(Ah, Al, 28) ^ _u64_ts_1.default.rotrBH(Ah, Al, 34) ^ _u64_ts_1.default.rotrBH(Ah, Al, 39);
4947
- const sigma0l = _u64_ts_1.default.rotrSL(Ah, Al, 28) ^ _u64_ts_1.default.rotrBL(Ah, Al, 34) ^ _u64_ts_1.default.rotrBL(Ah, Al, 39);
5000
+ const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);
5001
+ const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);
4948
5002
  const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;
4949
5003
  const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;
4950
5004
  Hh = Gh | 0;
@@ -4953,57 +5007,115 @@ var require_sha512 = __commonJS((exports) => {
4953
5007
  Gl = Fl | 0;
4954
5008
  Fh = Eh | 0;
4955
5009
  Fl = El | 0;
4956
- ({ h: Eh, l: El } = _u64_ts_1.default.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
5010
+ ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
4957
5011
  Dh = Ch | 0;
4958
5012
  Dl = Cl | 0;
4959
5013
  Ch = Bh | 0;
4960
5014
  Cl = Bl | 0;
4961
5015
  Bh = Ah | 0;
4962
5016
  Bl = Al | 0;
4963
- const All = _u64_ts_1.default.add3L(T1l, sigma0l, MAJl);
4964
- Ah = _u64_ts_1.default.add3H(All, T1h, sigma0h, MAJh);
5017
+ const All = u64.add3L(T1l, sigma0l, MAJl);
5018
+ Ah = u64.add3H(All, T1h, sigma0h, MAJh);
4965
5019
  Al = All | 0;
4966
5020
  }
4967
- ({ h: Ah, l: Al } = _u64_ts_1.default.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
4968
- ({ h: Bh, l: Bl } = _u64_ts_1.default.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
4969
- ({ h: Ch, l: Cl } = _u64_ts_1.default.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
4970
- ({ h: Dh, l: Dl } = _u64_ts_1.default.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
4971
- ({ h: Eh, l: El } = _u64_ts_1.default.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
4972
- ({ h: Fh, l: Fl } = _u64_ts_1.default.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
4973
- ({ h: Gh, l: Gl } = _u64_ts_1.default.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
4974
- ({ h: Hh, l: Hl } = _u64_ts_1.default.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
5021
+ ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
5022
+ ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
5023
+ ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
5024
+ ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
5025
+ ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
5026
+ ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
5027
+ ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
5028
+ ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
4975
5029
  this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
4976
5030
  }
4977
5031
  roundClean() {
4978
- SHA512_W_H.fill(0);
4979
- SHA512_W_L.fill(0);
5032
+ (0, utils_ts_1.clean)(SHA512_W_H, SHA512_W_L);
4980
5033
  }
4981
5034
  destroy() {
4982
- this.buffer.fill(0);
5035
+ (0, utils_ts_1.clean)(this.buffer);
4983
5036
  this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
4984
5037
  }
4985
5038
  }
4986
5039
  exports.SHA512 = SHA512;
4987
5040
 
5041
+ class SHA384 extends SHA512 {
5042
+ constructor() {
5043
+ super(48);
5044
+ this.Ah = _md_ts_1.SHA384_IV[0] | 0;
5045
+ this.Al = _md_ts_1.SHA384_IV[1] | 0;
5046
+ this.Bh = _md_ts_1.SHA384_IV[2] | 0;
5047
+ this.Bl = _md_ts_1.SHA384_IV[3] | 0;
5048
+ this.Ch = _md_ts_1.SHA384_IV[4] | 0;
5049
+ this.Cl = _md_ts_1.SHA384_IV[5] | 0;
5050
+ this.Dh = _md_ts_1.SHA384_IV[6] | 0;
5051
+ this.Dl = _md_ts_1.SHA384_IV[7] | 0;
5052
+ this.Eh = _md_ts_1.SHA384_IV[8] | 0;
5053
+ this.El = _md_ts_1.SHA384_IV[9] | 0;
5054
+ this.Fh = _md_ts_1.SHA384_IV[10] | 0;
5055
+ this.Fl = _md_ts_1.SHA384_IV[11] | 0;
5056
+ this.Gh = _md_ts_1.SHA384_IV[12] | 0;
5057
+ this.Gl = _md_ts_1.SHA384_IV[13] | 0;
5058
+ this.Hh = _md_ts_1.SHA384_IV[14] | 0;
5059
+ this.Hl = _md_ts_1.SHA384_IV[15] | 0;
5060
+ }
5061
+ }
5062
+ exports.SHA384 = SHA384;
5063
+ var T224_IV = /* @__PURE__ */ Uint32Array.from([
5064
+ 2352822216,
5065
+ 424955298,
5066
+ 1944164710,
5067
+ 2312950998,
5068
+ 502970286,
5069
+ 855612546,
5070
+ 1738396948,
5071
+ 1479516111,
5072
+ 258812777,
5073
+ 2077511080,
5074
+ 2011393907,
5075
+ 79989058,
5076
+ 1067287976,
5077
+ 1780299464,
5078
+ 286451373,
5079
+ 2446758561
5080
+ ]);
5081
+ var T256_IV = /* @__PURE__ */ Uint32Array.from([
5082
+ 573645204,
5083
+ 4230739756,
5084
+ 2673172387,
5085
+ 3360449730,
5086
+ 596883563,
5087
+ 1867755857,
5088
+ 2520282905,
5089
+ 1497426621,
5090
+ 2519219938,
5091
+ 2827943907,
5092
+ 3193839141,
5093
+ 1401305490,
5094
+ 721525244,
5095
+ 746961066,
5096
+ 246885852,
5097
+ 2177182882
5098
+ ]);
5099
+
4988
5100
  class SHA512_224 extends SHA512 {
4989
5101
  constructor() {
4990
5102
  super(28);
4991
- this.Ah = 2352822216 | 0;
4992
- this.Al = 424955298 | 0;
4993
- this.Bh = 1944164710 | 0;
4994
- this.Bl = 2312950998 | 0;
4995
- this.Ch = 502970286 | 0;
4996
- this.Cl = 855612546 | 0;
4997
- this.Dh = 1738396948 | 0;
4998
- this.Dl = 1479516111 | 0;
4999
- this.Eh = 258812777 | 0;
5000
- this.El = 2077511080 | 0;
5001
- this.Fh = 2011393907 | 0;
5002
- this.Fl = 79989058 | 0;
5003
- this.Gh = 1067287976 | 0;
5004
- this.Gl = 1780299464 | 0;
5005
- this.Hh = 286451373 | 0;
5006
- this.Hl = 2446758561 | 0;
5103
+ this.Ah = T224_IV[0] | 0;
5104
+ this.Al = T224_IV[1] | 0;
5105
+ this.Bh = T224_IV[2] | 0;
5106
+ this.Bl = T224_IV[3] | 0;
5107
+ this.Ch = T224_IV[4] | 0;
5108
+ this.Cl = T224_IV[5] | 0;
5109
+ this.Dh = T224_IV[6] | 0;
5110
+ this.Dl = T224_IV[7] | 0;
5111
+ this.Eh = T224_IV[8] | 0;
5112
+ this.El = T224_IV[9] | 0;
5113
+ this.Fh = T224_IV[10] | 0;
5114
+ this.Fl = T224_IV[11] | 0;
5115
+ this.Gh = T224_IV[12] | 0;
5116
+ this.Gl = T224_IV[13] | 0;
5117
+ this.Hh = T224_IV[14] | 0;
5118
+ this.Hl = T224_IV[15] | 0;
5007
5119
  }
5008
5120
  }
5009
5121
  exports.SHA512_224 = SHA512_224;
@@ -5011,81 +5123,34 @@ var require_sha512 = __commonJS((exports) => {
5011
5123
  class SHA512_256 extends SHA512 {
5012
5124
  constructor() {
5013
5125
  super(32);
5014
- this.Ah = 573645204 | 0;
5015
- this.Al = 4230739756 | 0;
5016
- this.Bh = 2673172387 | 0;
5017
- this.Bl = 3360449730 | 0;
5018
- this.Ch = 596883563 | 0;
5019
- this.Cl = 1867755857 | 0;
5020
- this.Dh = 2520282905 | 0;
5021
- this.Dl = 1497426621 | 0;
5022
- this.Eh = 2519219938 | 0;
5023
- this.El = 2827943907 | 0;
5024
- this.Fh = 3193839141 | 0;
5025
- this.Fl = 1401305490 | 0;
5026
- this.Gh = 721525244 | 0;
5027
- this.Gl = 746961066 | 0;
5028
- this.Hh = 246885852 | 0;
5029
- this.Hl = 2177182882 | 0;
5126
+ this.Ah = T256_IV[0] | 0;
5127
+ this.Al = T256_IV[1] | 0;
5128
+ this.Bh = T256_IV[2] | 0;
5129
+ this.Bl = T256_IV[3] | 0;
5130
+ this.Ch = T256_IV[4] | 0;
5131
+ this.Cl = T256_IV[5] | 0;
5132
+ this.Dh = T256_IV[6] | 0;
5133
+ this.Dl = T256_IV[7] | 0;
5134
+ this.Eh = T256_IV[8] | 0;
5135
+ this.El = T256_IV[9] | 0;
5136
+ this.Fh = T256_IV[10] | 0;
5137
+ this.Fl = T256_IV[11] | 0;
5138
+ this.Gh = T256_IV[12] | 0;
5139
+ this.Gl = T256_IV[13] | 0;
5140
+ this.Hh = T256_IV[14] | 0;
5141
+ this.Hl = T256_IV[15] | 0;
5030
5142
  }
5031
5143
  }
5032
5144
  exports.SHA512_256 = SHA512_256;
5033
-
5034
- class SHA384 extends SHA512 {
5035
- constructor() {
5036
- super(48);
5037
- this.Ah = 3418070365 | 0;
5038
- this.Al = 3238371032 | 0;
5039
- this.Bh = 1654270250 | 0;
5040
- this.Bl = 914150663 | 0;
5041
- this.Ch = 2438529370 | 0;
5042
- this.Cl = 812702999 | 0;
5043
- this.Dh = 355462360 | 0;
5044
- this.Dl = 4144912697 | 0;
5045
- this.Eh = 1731405415 | 0;
5046
- this.El = 4290775857 | 0;
5047
- this.Fh = 2394180231 | 0;
5048
- this.Fl = 1750603025 | 0;
5049
- this.Gh = 3675008525 | 0;
5050
- this.Gl = 1694076839 | 0;
5051
- this.Hh = 1203062813 | 0;
5052
- this.Hl = 3204075428 | 0;
5053
- }
5054
- }
5055
- exports.SHA384 = SHA384;
5056
- exports.sha512 = (0, utils_ts_1.wrapConstructor)(() => new SHA512);
5057
- exports.sha512_224 = (0, utils_ts_1.wrapConstructor)(() => new SHA512_224);
5058
- exports.sha512_256 = (0, utils_ts_1.wrapConstructor)(() => new SHA512_256);
5059
- exports.sha384 = (0, utils_ts_1.wrapConstructor)(() => new SHA384);
5060
- });
5061
-
5062
- // ../../node_modules/@noble/hashes/sha2.js
5063
- var require_sha2 = __commonJS((exports) => {
5064
- Object.defineProperty(exports, "__esModule", { value: true });
5065
- exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.sha384 = exports.sha256 = exports.sha224 = undefined;
5066
- var sha256_ts_1 = require_sha256();
5067
- Object.defineProperty(exports, "sha224", { enumerable: true, get: function() {
5068
- return sha256_ts_1.sha224;
5069
- } });
5070
- Object.defineProperty(exports, "sha256", { enumerable: true, get: function() {
5071
- return sha256_ts_1.sha256;
5072
- } });
5073
- var sha512_ts_1 = require_sha512();
5074
- Object.defineProperty(exports, "sha384", { enumerable: true, get: function() {
5075
- return sha512_ts_1.sha384;
5076
- } });
5077
- Object.defineProperty(exports, "sha512", { enumerable: true, get: function() {
5078
- return sha512_ts_1.sha512;
5079
- } });
5080
- Object.defineProperty(exports, "sha512_224", { enumerable: true, get: function() {
5081
- return sha512_ts_1.sha512_224;
5082
- } });
5083
- Object.defineProperty(exports, "sha512_256", { enumerable: true, get: function() {
5084
- return sha512_ts_1.sha512_256;
5085
- } });
5145
+ exports.sha256 = (0, utils_ts_1.createHasher)(() => new SHA256);
5146
+ exports.sha224 = (0, utils_ts_1.createHasher)(() => new SHA224);
5147
+ exports.sha512 = (0, utils_ts_1.createHasher)(() => new SHA512);
5148
+ exports.sha384 = (0, utils_ts_1.createHasher)(() => new SHA384);
5149
+ exports.sha512_256 = (0, utils_ts_1.createHasher)(() => new SHA512_256);
5150
+ exports.sha512_224 = (0, utils_ts_1.createHasher)(() => new SHA512_224);
5086
5151
  });
5087
5152
 
5088
- // ../../node_modules/@noble/curves/abstract/utils.js
5153
+ // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/utils.js
5089
5154
  var require_utils5 = __commonJS((exports) => {
5090
5155
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
5091
5156
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -5359,7 +5424,7 @@ var require_utils5 = __commonJS((exports) => {
5359
5424
  }
5360
5425
  });
5361
5426
 
5362
- // ../../node_modules/@noble/curves/abstract/modular.js
5427
+ // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/modular.js
5363
5428
  var require_modular = __commonJS((exports) => {
5364
5429
  Object.defineProperty(exports, "__esModule", { value: true });
5365
5430
  exports.isNegativeLE = undefined;
@@ -5384,6 +5449,7 @@ var require_modular = __commonJS((exports) => {
5384
5449
  exports.getMinHashLength = getMinHashLength;
5385
5450
  exports.mapHashToField = mapHashToField;
5386
5451
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
5452
+ var utils_1 = require_utils4();
5387
5453
  var utils_ts_1 = require_utils5();
5388
5454
  var _0n = BigInt(0);
5389
5455
  var _1n = BigInt(1);
@@ -5443,13 +5509,17 @@ var require_modular = __commonJS((exports) => {
5443
5509
  return mod(x, modulo);
5444
5510
  }
5445
5511
  function tonelliShanks(P) {
5446
- const legendreC = (P - _1n) / _2n;
5447
- let Q, S, Z;
5448
- for (Q = P - _1n, S = 0;Q % _2n === _0n; Q /= _2n, S++)
5449
- ;
5450
- for (Z = _2n;Z < P && pow(Z, legendreC, P) !== P - _1n; Z++) {
5451
- if (Z > 1000)
5452
- throw new Error("Cannot find square root: likely non-prime P");
5512
+ let Q = P - _1n;
5513
+ let S = 0;
5514
+ while (Q % _2n === _0n) {
5515
+ Q /= _2n;
5516
+ S++;
5517
+ }
5518
+ let Z = _2n;
5519
+ const _Fp = Field(P);
5520
+ while (Z < P && FpIsSquare(_Fp, Z)) {
5521
+ if (Z++ > 1000)
5522
+ throw new Error("Cannot find square root: probably non-prime P");
5453
5523
  }
5454
5524
  if (S === 1) {
5455
5525
  const p1div4 = (P + _1n) / _4n;
@@ -5462,7 +5532,7 @@ var require_modular = __commonJS((exports) => {
5462
5532
  }
5463
5533
  const Q1div2 = (Q + _1n) / _2n;
5464
5534
  return function tonelliSlow(Fp, n) {
5465
- if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))
5535
+ if (!FpIsSquare(Fp, n))
5466
5536
  throw new Error("Cannot find square root");
5467
5537
  let r = S;
5468
5538
  let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q);
@@ -5488,8 +5558,8 @@ var require_modular = __commonJS((exports) => {
5488
5558
  }
5489
5559
  function FpSqrt(P) {
5490
5560
  if (P % _4n === _3n) {
5491
- const p1div4 = (P + _1n) / _4n;
5492
5561
  return function sqrt3mod4(Fp, n) {
5562
+ const p1div4 = (P + _1n) / _4n;
5493
5563
  const root = Fp.pow(n, p1div4);
5494
5564
  if (!Fp.eql(Fp.sqr(root), n))
5495
5565
  throw new Error("Cannot find square root");
@@ -5497,9 +5567,9 @@ var require_modular = __commonJS((exports) => {
5497
5567
  };
5498
5568
  }
5499
5569
  if (P % _8n === _5n) {
5500
- const c1 = (P - _5n) / _8n;
5501
5570
  return function sqrt5mod8(Fp, n) {
5502
5571
  const n2 = Fp.mul(n, _2n);
5572
+ const c1 = (P - _5n) / _8n;
5503
5573
  const v = Fp.pow(n2, c1);
5504
5574
  const nv = Fp.mul(n, v);
5505
5575
  const i = Fp.mul(Fp.mul(nv, _2n), v);
@@ -5546,55 +5616,60 @@ var require_modular = __commonJS((exports) => {
5546
5616
  }, initial);
5547
5617
  return (0, utils_ts_1.validateObject)(field, opts);
5548
5618
  }
5549
- function FpPow(f, num, power) {
5619
+ function FpPow(Fp, num, power) {
5550
5620
  if (power < _0n)
5551
5621
  throw new Error("invalid exponent, negatives unsupported");
5552
5622
  if (power === _0n)
5553
- return f.ONE;
5623
+ return Fp.ONE;
5554
5624
  if (power === _1n)
5555
5625
  return num;
5556
- let p = f.ONE;
5626
+ let p = Fp.ONE;
5557
5627
  let d = num;
5558
5628
  while (power > _0n) {
5559
5629
  if (power & _1n)
5560
- p = f.mul(p, d);
5561
- d = f.sqr(d);
5630
+ p = Fp.mul(p, d);
5631
+ d = Fp.sqr(d);
5562
5632
  power >>= _1n;
5563
5633
  }
5564
5634
  return p;
5565
5635
  }
5566
- function FpInvertBatch(f, nums) {
5567
- const tmp = new Array(nums.length);
5568
- const lastMultiplied = nums.reduce((acc, num, i) => {
5569
- if (f.is0(num))
5636
+ function FpInvertBatch(Fp, nums, passZero = false) {
5637
+ const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : undefined);
5638
+ const multipliedAcc = nums.reduce((acc, num, i) => {
5639
+ if (Fp.is0(num))
5570
5640
  return acc;
5571
- tmp[i] = acc;
5572
- return f.mul(acc, num);
5573
- }, f.ONE);
5574
- const inverted = f.inv(lastMultiplied);
5641
+ inverted[i] = acc;
5642
+ return Fp.mul(acc, num);
5643
+ }, Fp.ONE);
5644
+ const invertedAcc = Fp.inv(multipliedAcc);
5575
5645
  nums.reduceRight((acc, num, i) => {
5576
- if (f.is0(num))
5646
+ if (Fp.is0(num))
5577
5647
  return acc;
5578
- tmp[i] = f.mul(acc, tmp[i]);
5579
- return f.mul(acc, num);
5580
- }, inverted);
5581
- return tmp;
5582
- }
5583
- function FpDiv(f, lhs, rhs) {
5584
- return f.mul(lhs, typeof rhs === "bigint" ? invert(rhs, f.ORDER) : f.inv(rhs));
5585
- }
5586
- function FpLegendre(order) {
5587
- const legendreConst = (order - _1n) / _2n;
5588
- return (f, x) => f.pow(x, legendreConst);
5589
- }
5590
- function FpIsSquare(f) {
5591
- const legendre = FpLegendre(f.ORDER);
5592
- return (x) => {
5593
- const p = legendre(f, x);
5594
- return f.eql(p, f.ZERO) || f.eql(p, f.ONE);
5595
- };
5648
+ inverted[i] = Fp.mul(acc, inverted[i]);
5649
+ return Fp.mul(acc, num);
5650
+ }, invertedAcc);
5651
+ return inverted;
5652
+ }
5653
+ function FpDiv(Fp, lhs, rhs) {
5654
+ return Fp.mul(lhs, typeof rhs === "bigint" ? invert(rhs, Fp.ORDER) : Fp.inv(rhs));
5655
+ }
5656
+ function FpLegendre(Fp, n) {
5657
+ const legc = (Fp.ORDER - _1n) / _2n;
5658
+ const powered = Fp.pow(n, legc);
5659
+ const yes = Fp.eql(powered, Fp.ONE);
5660
+ const zero = Fp.eql(powered, Fp.ZERO);
5661
+ const no = Fp.eql(powered, Fp.neg(Fp.ONE));
5662
+ if (!yes && !zero && !no)
5663
+ throw new Error("Cannot find square root: probably non-prime P");
5664
+ return yes ? 1 : zero ? 0 : -1;
5665
+ }
5666
+ function FpIsSquare(Fp, n) {
5667
+ const l = FpLegendre(Fp, n);
5668
+ return l === 0 || l === 1;
5596
5669
  }
5597
5670
  function nLength(n, nBitLength) {
5671
+ if (nBitLength !== undefined)
5672
+ (0, utils_1.anumber)(nBitLength);
5598
5673
  const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;
5599
5674
  const nByteLength = Math.ceil(_nBitLength / 8);
5600
5675
  return { nBitLength: _nBitLength, nByteLength };
@@ -5640,14 +5715,14 @@ var require_modular = __commonJS((exports) => {
5640
5715
  sqrtP = FpSqrt(ORDER);
5641
5716
  return sqrtP(f, n);
5642
5717
  }),
5643
- invertBatch: (lst) => FpInvertBatch(f, lst),
5644
- cmov: (a, b, c) => c ? b : a,
5645
5718
  toBytes: (num) => isLE ? (0, utils_ts_1.numberToBytesLE)(num, BYTES) : (0, utils_ts_1.numberToBytesBE)(num, BYTES),
5646
5719
  fromBytes: (bytes) => {
5647
5720
  if (bytes.length !== BYTES)
5648
5721
  throw new Error("Field.fromBytes: expected " + BYTES + " bytes, got " + bytes.length);
5649
5722
  return isLE ? (0, utils_ts_1.bytesToNumberLE)(bytes) : (0, utils_ts_1.bytesToNumberBE)(bytes);
5650
- }
5723
+ },
5724
+ invertBatch: (lst) => FpInvertBatch(f, lst),
5725
+ cmov: (a, b, c) => c ? b : a
5651
5726
  });
5652
5727
  return Object.freeze(f);
5653
5728
  }
@@ -5694,7 +5769,7 @@ var require_modular = __commonJS((exports) => {
5694
5769
  }
5695
5770
  });
5696
5771
 
5697
- // ../../node_modules/@noble/curves/abstract/curve.js
5772
+ // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/curve.js
5698
5773
  var require_curve = __commonJS((exports) => {
5699
5774
  Object.defineProperty(exports, "__esModule", { value: true });
5700
5775
  exports.wNAF = wNAF;
@@ -5935,7 +6010,7 @@ var require_curve = __commonJS((exports) => {
5935
6010
  }
5936
6011
  });
5937
6012
 
5938
- // ../../node_modules/@noble/curves/abstract/edwards.js
6013
+ // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/edwards.js
5939
6014
  var require_edwards = __commonJS((exports) => {
5940
6015
  Object.defineProperty(exports, "__esModule", { value: true });
5941
6016
  exports.twistedEdwards = twistedEdwards;
@@ -6053,7 +6128,7 @@ var require_edwards = __commonJS((exports) => {
6053
6128
  return new Point(x, y, _1n, modP(x * y));
6054
6129
  }
6055
6130
  static normalizeZ(points) {
6056
- const toInv = Fp.invertBatch(points.map((p) => p.ez));
6131
+ const toInv = (0, modular_ts_1.FpInvertBatch)(Fp, points.map((p) => p.ez));
6057
6132
  return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);
6058
6133
  }
6059
6134
  static msm(points, scalars) {
@@ -6221,7 +6296,7 @@ var require_edwards = __commonJS((exports) => {
6221
6296
  function getPublicKey(privKey) {
6222
6297
  return getExtendedPublicKey(privKey).pointBytes;
6223
6298
  }
6224
- function hashDomainToScalar(context = new Uint8Array, ...msgs) {
6299
+ function hashDomainToScalar(context = Uint8Array.of(), ...msgs) {
6225
6300
  const msg = (0, utils_ts_1.concatBytes)(...msgs);
6226
6301
  return modN_LE(cHash(domain(msg, (0, utils_ts_1.ensureBytes)("context", context), !!prehash)));
6227
6302
  }
@@ -6285,7 +6360,7 @@ var require_edwards = __commonJS((exports) => {
6285
6360
  }
6286
6361
  });
6287
6362
 
6288
- // ../../node_modules/@noble/curves/abstract/hash-to-curve.js
6363
+ // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/hash-to-curve.js
6289
6364
  var require_hash_to_curve = __commonJS((exports) => {
6290
6365
  Object.defineProperty(exports, "__esModule", { value: true });
6291
6366
  exports.expand_message_xmd = expand_message_xmd;
@@ -6392,49 +6467,53 @@ var require_hash_to_curve = __commonJS((exports) => {
6392
6467
  return u;
6393
6468
  }
6394
6469
  function isogenyMap(field, map) {
6395
- const COEFF = map.map((i) => Array.from(i).reverse());
6470
+ const coeff = map.map((i) => Array.from(i).reverse());
6396
6471
  return (x, y) => {
6397
- const [xNum, xDen, yNum, yDen] = COEFF.map((val) => val.reduce((acc, i) => field.add(field.mul(acc, x), i)));
6398
- if (field.is0(xDen) || field.is0(yDen))
6399
- throw new Error("bad point: ZERO");
6400
- x = field.div(xNum, xDen);
6401
- y = field.mul(y, field.div(yNum, yDen));
6472
+ const [xn, xd, yn, yd] = coeff.map((val) => val.reduce((acc, i) => field.add(field.mul(acc, x), i)));
6473
+ const [xd_inv, yd_inv] = (0, modular_ts_1.FpInvertBatch)(field, [xd, yd], true);
6474
+ x = field.mul(xn, xd_inv);
6475
+ y = field.mul(y, field.mul(yn, yd_inv));
6402
6476
  return { x, y };
6403
6477
  };
6404
6478
  }
6405
- function createHasher(Point, mapToCurve, def) {
6479
+ function createHasher(Point, mapToCurve, defaults) {
6406
6480
  if (typeof mapToCurve !== "function")
6407
6481
  throw new Error("mapToCurve() must be defined");
6482
+ function map(num) {
6483
+ return Point.fromAffine(mapToCurve(num));
6484
+ }
6485
+ function clear(initial) {
6486
+ const P = initial.clearCofactor();
6487
+ if (P.equals(Point.ZERO))
6488
+ return Point.ZERO;
6489
+ P.assertValidity();
6490
+ return P;
6491
+ }
6408
6492
  return {
6493
+ defaults,
6409
6494
  hashToCurve(msg, options) {
6410
- const u = hash_to_field(msg, 2, { ...def, DST: def.DST, ...options });
6411
- const u0 = Point.fromAffine(mapToCurve(u[0]));
6412
- const u1 = Point.fromAffine(mapToCurve(u[1]));
6413
- const P = u0.add(u1).clearCofactor();
6414
- P.assertValidity();
6415
- return P;
6495
+ const u = hash_to_field(msg, 2, { ...defaults, DST: defaults.DST, ...options });
6496
+ const u0 = map(u[0]);
6497
+ const u1 = map(u[1]);
6498
+ return clear(u0.add(u1));
6416
6499
  },
6417
6500
  encodeToCurve(msg, options) {
6418
- const u = hash_to_field(msg, 1, { ...def, DST: def.encodeDST, ...options });
6419
- const P = Point.fromAffine(mapToCurve(u[0])).clearCofactor();
6420
- P.assertValidity();
6421
- return P;
6501
+ const u = hash_to_field(msg, 1, { ...defaults, DST: defaults.encodeDST, ...options });
6502
+ return clear(map(u[0]));
6422
6503
  },
6423
6504
  mapToCurve(scalars) {
6424
6505
  if (!Array.isArray(scalars))
6425
- throw new Error("mapToCurve: expected array of bigints");
6506
+ throw new Error("expected array of bigints");
6426
6507
  for (const i of scalars)
6427
6508
  if (typeof i !== "bigint")
6428
- throw new Error("mapToCurve: expected array of bigints");
6429
- const P = Point.fromAffine(mapToCurve(scalars)).clearCofactor();
6430
- P.assertValidity();
6431
- return P;
6509
+ throw new Error("expected array of bigints");
6510
+ return clear(map(scalars));
6432
6511
  }
6433
6512
  };
6434
6513
  }
6435
6514
  });
6436
6515
 
6437
- // ../../node_modules/@noble/curves/abstract/montgomery.js
6516
+ // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/montgomery.js
6438
6517
  var require_montgomery = __commonJS((exports) => {
6439
6518
  Object.defineProperty(exports, "__esModule", { value: true });
6440
6519
  exports.montgomery = montgomery;
@@ -6459,12 +6538,13 @@ var require_montgomery = __commonJS((exports) => {
6459
6538
  function montgomery(curveDef) {
6460
6539
  const CURVE = validateOpts(curveDef);
6461
6540
  const { P } = CURVE;
6541
+ const Fp = (0, modular_ts_1.Field)(P);
6462
6542
  const modP = (n) => (0, modular_ts_1.mod)(n, P);
6463
6543
  const montgomeryBits = CURVE.montgomeryBits;
6464
6544
  const montgomeryBytes = Math.ceil(montgomeryBits / 8);
6465
6545
  const fieldLen = CURVE.nByteLength;
6466
6546
  const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes);
6467
- const powPminus2 = CURVE.powPminus2 || ((x) => (0, modular_ts_1.pow)(x, P - BigInt(2), P));
6547
+ const powPminus2 = CURVE.powPminus2 || ((x) => Fp.pow(x, P - BigInt(2)));
6468
6548
  function cswap(swap, x_2, x_3) {
6469
6549
  const dummy = modP(swap * (x_2 - x_3));
6470
6550
  x_2 = modP(x_2 - dummy);
@@ -6559,10 +6639,10 @@ var require_montgomery = __commonJS((exports) => {
6559
6639
  }
6560
6640
  });
6561
6641
 
6562
- // ../../node_modules/@noble/curves/ed25519.js
6642
+ // ../../node_modules/eciesjs/node_modules/@noble/curves/ed25519.js
6563
6643
  var require_ed25519 = __commonJS((exports) => {
6564
6644
  Object.defineProperty(exports, "__esModule", { value: true });
6565
- exports.hash_to_ristretto255 = exports.hashToRistretto255 = exports.RistrettoPoint = exports.encodeToCurve = exports.hashToCurve = exports.edwardsToMontgomery = exports.x25519 = exports.ed25519ph = exports.ed25519ctx = exports.ed25519 = exports.ED25519_TORSION_SUBGROUP = undefined;
6645
+ exports.hash_to_ristretto255 = exports.hashToRistretto255 = exports.RistrettoPoint = exports.encodeToCurve = exports.hashToCurve = exports.ed25519_hasher = exports.edwardsToMontgomery = exports.x25519 = exports.ed25519ph = exports.ed25519ctx = exports.ed25519 = exports.ED25519_TORSION_SUBGROUP = undefined;
6566
6646
  exports.edwardsToMontgomeryPub = edwardsToMontgomeryPub;
6567
6647
  exports.edwardsToMontgomeryPriv = edwardsToMontgomeryPriv;
6568
6648
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -6747,10 +6827,10 @@ var require_ed25519 = __commonJS((exports) => {
6747
6827
  xd = Fp.cmov(xd, Fp.ONE, e);
6748
6828
  yn = Fp.cmov(yn, Fp.ONE, e);
6749
6829
  yd = Fp.cmov(yd, Fp.ONE, e);
6750
- const inv = Fp.invertBatch([xd, yd]);
6751
- return { x: Fp.mul(xn, inv[0]), y: Fp.mul(yn, inv[1]) };
6830
+ const [xd_inv, yd_inv] = (0, modular_ts_1.FpInvertBatch)(Fp, [xd, yd], true);
6831
+ return { x: Fp.mul(xn, xd_inv), y: Fp.mul(yn, yd_inv) };
6752
6832
  }
6753
- var htf = /* @__PURE__ */ (() => (0, hash_to_curve_ts_1.createHasher)(exports.ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {
6833
+ exports.ed25519_hasher = (() => (0, hash_to_curve_ts_1.createHasher)(exports.ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {
6754
6834
  DST: "edwards25519_XMD:SHA-512_ELL2_RO_",
6755
6835
  encodeDST: "edwards25519_XMD:SHA-512_ELL2_NU_",
6756
6836
  p: Fp.ORDER,
@@ -6759,8 +6839,8 @@ var require_ed25519 = __commonJS((exports) => {
6759
6839
  expand: "xmd",
6760
6840
  hash: sha2_1.sha512
6761
6841
  }))();
6762
- exports.hashToCurve = (() => htf.hashToCurve)();
6763
- exports.encodeToCurve = (() => htf.encodeToCurve)();
6842
+ exports.hashToCurve = (() => exports.ed25519_hasher.hashToCurve)();
6843
+ exports.encodeToCurve = (() => exports.ed25519_hasher.encodeToCurve)();
6764
6844
  function aristp(other) {
6765
6845
  if (!(other instanceof RistPoint))
6766
6846
  throw new Error("RistrettoPoint expected");
@@ -6926,11 +7006,10 @@ var require_ed25519 = __commonJS((exports) => {
6926
7006
  exports.hash_to_ristretto255 = exports.hashToRistretto255;
6927
7007
  });
6928
7008
 
6929
- // ../../node_modules/@noble/hashes/hmac.js
7009
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/hmac.js
6930
7010
  var require_hmac = __commonJS((exports) => {
6931
7011
  Object.defineProperty(exports, "__esModule", { value: true });
6932
7012
  exports.hmac = exports.HMAC = undefined;
6933
- var _assert_ts_1 = require__assert();
6934
7013
  var utils_ts_1 = require_utils4();
6935
7014
 
6936
7015
  class HMAC extends utils_ts_1.Hash {
@@ -6938,7 +7017,7 @@ var require_hmac = __commonJS((exports) => {
6938
7017
  super();
6939
7018
  this.finished = false;
6940
7019
  this.destroyed = false;
6941
- (0, _assert_ts_1.ahash)(hash);
7020
+ (0, utils_ts_1.ahash)(hash);
6942
7021
  const key = (0, utils_ts_1.toBytes)(_key);
6943
7022
  this.iHash = hash.create();
6944
7023
  if (typeof this.iHash.update !== "function")
@@ -6955,16 +7034,16 @@ var require_hmac = __commonJS((exports) => {
6955
7034
  for (let i = 0;i < pad.length; i++)
6956
7035
  pad[i] ^= 54 ^ 92;
6957
7036
  this.oHash.update(pad);
6958
- pad.fill(0);
7037
+ (0, utils_ts_1.clean)(pad);
6959
7038
  }
6960
7039
  update(buf) {
6961
- (0, _assert_ts_1.aexists)(this);
7040
+ (0, utils_ts_1.aexists)(this);
6962
7041
  this.iHash.update(buf);
6963
7042
  return this;
6964
7043
  }
6965
7044
  digestInto(out) {
6966
- (0, _assert_ts_1.aexists)(this);
6967
- (0, _assert_ts_1.abytes)(out, this.outputLen);
7045
+ (0, utils_ts_1.aexists)(this);
7046
+ (0, utils_ts_1.abytes)(out, this.outputLen);
6968
7047
  this.finished = true;
6969
7048
  this.iHash.digestInto(out);
6970
7049
  this.oHash.update(out);
@@ -6988,6 +7067,9 @@ var require_hmac = __commonJS((exports) => {
6988
7067
  to.iHash = iHash._cloneInto(to.iHash);
6989
7068
  return to;
6990
7069
  }
7070
+ clone() {
7071
+ return this._cloneInto();
7072
+ }
6991
7073
  destroy() {
6992
7074
  this.destroyed = true;
6993
7075
  this.oHash.destroy();
@@ -7000,7 +7082,7 @@ var require_hmac = __commonJS((exports) => {
7000
7082
  exports.hmac.create = (hash, key) => new HMAC(hash, key);
7001
7083
  });
7002
7084
 
7003
- // ../../node_modules/@noble/curves/abstract/weierstrass.js
7085
+ // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/weierstrass.js
7004
7086
  var require_weierstrass = __commonJS((exports) => {
7005
7087
  Object.defineProperty(exports, "__esModule", { value: true });
7006
7088
  exports.DER = exports.DERErr = undefined;
@@ -7235,7 +7317,7 @@ var require_weierstrass = __commonJS((exports) => {
7235
7317
  constructor(px, py, pz) {
7236
7318
  if (px == null || !Fp.isValid(px))
7237
7319
  throw new Error("x required");
7238
- if (py == null || !Fp.isValid(py))
7320
+ if (py == null || !Fp.isValid(py) || Fp.is0(py))
7239
7321
  throw new Error("y required");
7240
7322
  if (pz == null || !Fp.isValid(pz))
7241
7323
  throw new Error("z required");
@@ -7262,7 +7344,7 @@ var require_weierstrass = __commonJS((exports) => {
7262
7344
  return this.toAffine().y;
7263
7345
  }
7264
7346
  static normalizeZ(points) {
7265
- const toInv = Fp.invertBatch(points.map((p) => p.pz));
7347
+ const toInv = (0, modular_ts_1.FpInvertBatch)(Fp, points.map((p) => p.pz));
7266
7348
  return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);
7267
7349
  }
7268
7350
  static fromHex(hex) {
@@ -7623,7 +7705,7 @@ var require_weierstrass = __commonJS((exports) => {
7623
7705
  return (0, utils_ts_1.hexToBytes)(this.toDERHex());
7624
7706
  }
7625
7707
  toDERHex() {
7626
- return exports.DER.hexFromSig({ r: this.r, s: this.s });
7708
+ return exports.DER.hexFromSig(this);
7627
7709
  }
7628
7710
  toCompactRawBytes() {
7629
7711
  return (0, utils_ts_1.hexToBytes)(this.toCompactHex());
@@ -7898,13 +7980,14 @@ var require_weierstrass = __commonJS((exports) => {
7898
7980
  y = Fp.cmov(y, value, isValid2);
7899
7981
  const e1 = Fp.isOdd(u) === Fp.isOdd(y);
7900
7982
  y = Fp.cmov(Fp.neg(y), y, e1);
7901
- x = Fp.div(x, tv4);
7983
+ const tv4_inv = (0, modular_ts_1.FpInvertBatch)(Fp, [tv4], true)[0];
7984
+ x = Fp.mul(x, tv4_inv);
7902
7985
  return { x, y };
7903
7986
  };
7904
7987
  }
7905
7988
  });
7906
7989
 
7907
- // ../../node_modules/@noble/curves/_shortw_utils.js
7990
+ // ../../node_modules/eciesjs/node_modules/@noble/curves/_shortw_utils.js
7908
7991
  var require__shortw_utils = __commonJS((exports) => {
7909
7992
  Object.defineProperty(exports, "__esModule", { value: true });
7910
7993
  exports.getHash = getHash;
@@ -7926,10 +8009,10 @@ var require__shortw_utils = __commonJS((exports) => {
7926
8009
  }
7927
8010
  });
7928
8011
 
7929
- // ../../node_modules/@noble/curves/secp256k1.js
8012
+ // ../../node_modules/eciesjs/node_modules/@noble/curves/secp256k1.js
7930
8013
  var require_secp256k1 = __commonJS((exports) => {
7931
8014
  Object.defineProperty(exports, "__esModule", { value: true });
7932
- exports.encodeToCurve = exports.hashToCurve = exports.schnorr = exports.secp256k1 = undefined;
8015
+ exports.encodeToCurve = exports.hashToCurve = exports.secp256k1_hasher = exports.schnorr = exports.secp256k1 = undefined;
7933
8016
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
7934
8017
  var sha2_1 = require_sha2();
7935
8018
  var utils_1 = require_utils4();
@@ -8125,7 +8208,7 @@ var require_secp256k1 = __commonJS((exports) => {
8125
8208
  B: BigInt("1771"),
8126
8209
  Z: Fpk1.create(BigInt("-11"))
8127
8210
  }))();
8128
- var htf = /* @__PURE__ */ (() => (0, hash_to_curve_ts_1.createHasher)(exports.secp256k1.ProjectivePoint, (scalars) => {
8211
+ exports.secp256k1_hasher = (() => (0, hash_to_curve_ts_1.createHasher)(exports.secp256k1.ProjectivePoint, (scalars) => {
8129
8212
  const { x, y } = mapSWU(Fpk1.create(scalars[0]));
8130
8213
  return isoMap(x, y);
8131
8214
  }, {
@@ -8137,8 +8220,8 @@ var require_secp256k1 = __commonJS((exports) => {
8137
8220
  expand: "xmd",
8138
8221
  hash: sha2_1.sha256
8139
8222
  }))();
8140
- exports.hashToCurve = (() => htf.hashToCurve)();
8141
- exports.encodeToCurve = (() => htf.encodeToCurve)();
8223
+ exports.hashToCurve = (() => exports.secp256k1_hasher.hashToCurve)();
8224
+ exports.encodeToCurve = (() => exports.secp256k1_hasher.encodeToCurve)();
8142
8225
  });
8143
8226
 
8144
8227
  // ../../node_modules/eciesjs/dist/utils/hex.js
@@ -8252,51 +8335,61 @@ var require_elliptic = __commonJS((exports) => {
8252
8335
  };
8253
8336
  });
8254
8337
 
8255
- // ../../node_modules/@noble/hashes/hkdf.js
8338
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/hkdf.js
8256
8339
  var require_hkdf = __commonJS((exports) => {
8257
8340
  Object.defineProperty(exports, "__esModule", { value: true });
8258
8341
  exports.hkdf = undefined;
8259
8342
  exports.extract = extract;
8260
8343
  exports.expand = expand;
8261
- var _assert_ts_1 = require__assert();
8262
8344
  var hmac_ts_1 = require_hmac();
8263
8345
  var utils_ts_1 = require_utils4();
8264
8346
  function extract(hash, ikm, salt) {
8265
- (0, _assert_ts_1.ahash)(hash);
8347
+ (0, utils_ts_1.ahash)(hash);
8266
8348
  if (salt === undefined)
8267
8349
  salt = new Uint8Array(hash.outputLen);
8268
8350
  return (0, hmac_ts_1.hmac)(hash, (0, utils_ts_1.toBytes)(salt), (0, utils_ts_1.toBytes)(ikm));
8269
8351
  }
8270
- var HKDF_COUNTER = /* @__PURE__ */ new Uint8Array([0]);
8271
- var EMPTY_BUFFER = /* @__PURE__ */ new Uint8Array;
8352
+ var HKDF_COUNTER = /* @__PURE__ */ Uint8Array.from([0]);
8353
+ var EMPTY_BUFFER = /* @__PURE__ */ Uint8Array.of();
8272
8354
  function expand(hash, prk, info, length = 32) {
8273
- (0, _assert_ts_1.ahash)(hash);
8274
- (0, _assert_ts_1.anumber)(length);
8275
- if (length > 255 * hash.outputLen)
8355
+ (0, utils_ts_1.ahash)(hash);
8356
+ (0, utils_ts_1.anumber)(length);
8357
+ const olen = hash.outputLen;
8358
+ if (length > 255 * olen)
8276
8359
  throw new Error("Length should be <= 255*HashLen");
8277
- const blocks = Math.ceil(length / hash.outputLen);
8360
+ const blocks = Math.ceil(length / olen);
8278
8361
  if (info === undefined)
8279
8362
  info = EMPTY_BUFFER;
8280
- const okm = new Uint8Array(blocks * hash.outputLen);
8363
+ const okm = new Uint8Array(blocks * olen);
8281
8364
  const HMAC = hmac_ts_1.hmac.create(hash, prk);
8282
8365
  const HMACTmp = HMAC._cloneInto();
8283
8366
  const T = new Uint8Array(HMAC.outputLen);
8284
8367
  for (let counter = 0;counter < blocks; counter++) {
8285
8368
  HKDF_COUNTER[0] = counter + 1;
8286
8369
  HMACTmp.update(counter === 0 ? EMPTY_BUFFER : T).update(info).update(HKDF_COUNTER).digestInto(T);
8287
- okm.set(T, hash.outputLen * counter);
8370
+ okm.set(T, olen * counter);
8288
8371
  HMAC._cloneInto(HMACTmp);
8289
8372
  }
8290
8373
  HMAC.destroy();
8291
8374
  HMACTmp.destroy();
8292
- T.fill(0);
8293
- HKDF_COUNTER.fill(0);
8375
+ (0, utils_ts_1.clean)(T, HKDF_COUNTER);
8294
8376
  return okm.slice(0, length);
8295
8377
  }
8296
8378
  var hkdf = (hash, ikm, salt, info, length) => expand(hash, extract(hash, ikm, salt), info, length);
8297
8379
  exports.hkdf = hkdf;
8298
8380
  });
8299
8381
 
8382
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/sha256.js
8383
+ var require_sha256 = __commonJS((exports) => {
8384
+ Object.defineProperty(exports, "__esModule", { value: true });
8385
+ exports.sha224 = exports.SHA224 = exports.sha256 = exports.SHA256 = undefined;
8386
+ var sha2_ts_1 = require_sha2();
8387
+ exports.SHA256 = sha2_ts_1.SHA256;
8388
+ exports.sha256 = sha2_ts_1.sha256;
8389
+ exports.SHA224 = sha2_ts_1.SHA224;
8390
+ exports.sha224 = sha2_ts_1.sha224;
8391
+ });
8392
+
8300
8393
  // ../../node_modules/eciesjs/dist/utils/hash.js
8301
8394
  var require_hash = __commonJS((exports) => {
8302
8395
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -14439,11 +14532,11 @@ var require_version = __commonJS((exports) => {
14439
14532
  value: true
14440
14533
  });
14441
14534
  exports.versionInfo = exports.version = undefined;
14442
- var version = "16.10.0";
14535
+ var version = "16.11.0";
14443
14536
  exports.version = version;
14444
14537
  var versionInfo = Object.freeze({
14445
14538
  major: 16,
14446
- minor: 10,
14539
+ minor: 11,
14447
14540
  patch: 0,
14448
14541
  preReleaseTag: null
14449
14542
  });
@@ -17045,7 +17138,7 @@ var require_visitor = __commonJS((exports) => {
17045
17138
  }
17046
17139
  }
17047
17140
  } else {
17048
- node = Object.defineProperties({}, Object.getOwnPropertyDescriptors(node));
17141
+ node = { ...node };
17049
17142
  for (const [editKey, editValue] of edits) {
17050
17143
  node[editKey] = editValue;
17051
17144
  }
@@ -21522,7 +21615,7 @@ var require_coerceInputValue = __commonJS((exports) => {
21522
21615
  return [coerceInputValueImpl(inputValue, itemType, onError, path4)];
21523
21616
  }
21524
21617
  if ((0, _definition.isInputObjectType)(type)) {
21525
- if (!(0, _isObjectLike.isObjectLike)(inputValue)) {
21618
+ if (!(0, _isObjectLike.isObjectLike)(inputValue) || Array.isArray(inputValue)) {
21526
21619
  onError((0, _Path.pathToArray)(path4), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}" to be an object.`));
21527
21620
  return;
21528
21621
  }
@@ -22660,7 +22753,7 @@ var require_VariablesInAllowedPositionRule = __commonJS((exports) => {
22660
22753
  },
22661
22754
  leave(operation) {
22662
22755
  const usages = context.getRecursiveVariableUsages(operation);
22663
- for (const { node, type, defaultValue } of usages) {
22756
+ for (const { node, type, defaultValue, parentType } of usages) {
22664
22757
  const varName = node.name.value;
22665
22758
  const varDef = varDefMap[varName];
22666
22759
  if (varDef && type) {
@@ -22673,6 +22766,11 @@ var require_VariablesInAllowedPositionRule = __commonJS((exports) => {
22673
22766
  nodes: [varDef, node]
22674
22767
  }));
22675
22768
  }
22769
+ if ((0, _definition.isInputObjectType)(parentType) && parentType.isOneOf && (0, _definition.isNullableType)(varType)) {
22770
+ context.reportError(new _GraphQLError.GraphQLError(`Variable "$${varName}" is of type "${varType}" but must be non-nullable to be used for OneOf Input Object "${parentType}".`, {
22771
+ nodes: [varDef, node]
22772
+ }));
22773
+ }
22676
22774
  }
22677
22775
  }
22678
22776
  }
@@ -22918,7 +23016,8 @@ var require_ValidationContext = __commonJS((exports) => {
22918
23016
  newUsages.push({
22919
23017
  node: variable,
22920
23018
  type: typeInfo.getInputType(),
22921
- defaultValue: typeInfo.getDefaultValue()
23019
+ defaultValue: typeInfo.getDefaultValue(),
23020
+ parentType: typeInfo.getParentInputType()
22922
23021
  });
22923
23022
  }
22924
23023
  }));
@@ -23223,7 +23322,7 @@ var require_execute = __commonJS((exports) => {
23223
23322
  rawVariableValues == null || (0, _isObjectLike.isObjectLike)(rawVariableValues) || (0, _devAssert.devAssert)(false, "Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.");
23224
23323
  }
23225
23324
  function buildExecutionContext(args) {
23226
- var _definition$name, _operation$variableDe;
23325
+ var _definition$name, _operation$variableDe, _options$maxCoercionE;
23227
23326
  const {
23228
23327
  schema,
23229
23328
  document,
@@ -23233,7 +23332,8 @@ var require_execute = __commonJS((exports) => {
23233
23332
  operationName,
23234
23333
  fieldResolver,
23235
23334
  typeResolver,
23236
- subscribeFieldResolver
23335
+ subscribeFieldResolver,
23336
+ options
23237
23337
  } = args;
23238
23338
  let operation;
23239
23339
  const fragments = Object.create(null);
@@ -23267,7 +23367,7 @@ var require_execute = __commonJS((exports) => {
23267
23367
  }
23268
23368
  const variableDefinitions = (_operation$variableDe = operation.variableDefinitions) !== null && _operation$variableDe !== undefined ? _operation$variableDe : [];
23269
23369
  const coercedVariableValues = (0, _values.getVariableValues)(schema, variableDefinitions, rawVariableValues !== null && rawVariableValues !== undefined ? rawVariableValues : {}, {
23270
- maxErrors: 50
23370
+ maxErrors: (_options$maxCoercionE = options === null || options === undefined ? undefined : options.maxCoercionErrors) !== null && _options$maxCoercionE !== undefined ? _options$maxCoercionE : 50
23271
23371
  });
23272
23372
  if (coercedVariableValues.errors) {
23273
23373
  return coercedVariableValues.errors;
@@ -245345,7 +245445,7 @@ function pruneCurrentEnv(currentEnv, env2) {
245345
245445
  var package_default = {
245346
245446
  name: "@settlemint/sdk-cli",
245347
245447
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
245348
- version: "2.2.0-pr503fed4b",
245448
+ version: "2.2.0-pr8f0116cb",
245349
245449
  type: "module",
245350
245450
  private: false,
245351
245451
  license: "FSL-1.1-MIT",
@@ -245394,8 +245494,8 @@ var package_default = {
245394
245494
  "@inquirer/input": "4.1.9",
245395
245495
  "@inquirer/password": "4.0.12",
245396
245496
  "@inquirer/select": "4.2.0",
245397
- "@settlemint/sdk-js": "2.2.0-pr503fed4b",
245398
- "@settlemint/sdk-utils": "2.2.0-pr503fed4b",
245497
+ "@settlemint/sdk-js": "2.2.0-pr8f0116cb",
245498
+ "@settlemint/sdk-utils": "2.2.0-pr8f0116cb",
245399
245499
  "@types/node": "22.15.3",
245400
245500
  "@types/semver": "7.7.0",
245401
245501
  "@types/which": "3.0.4",
@@ -246587,20 +246687,21 @@ var CommandError = class extends Error {
246587
246687
  }
246588
246688
  };
246589
246689
  async function executeCommand(command, args, options) {
246590
- const child = spawn(command, args, { env: { ...process.env, ...options?.env } });
246690
+ const { silent, ...spawnOptions } = options ?? {};
246691
+ const child = spawn(command, args, { ...spawnOptions, env: { ...process.env, ...options?.env } });
246591
246692
  process.stdin.pipe(child.stdin);
246592
246693
  const output = [];
246593
246694
  return new Promise((resolve, reject) => {
246594
246695
  child.stdout.on("data", (data) => {
246595
246696
  const maskedData = maskTokens2(data.toString());
246596
- if (!options?.silent) {
246697
+ if (!silent) {
246597
246698
  process.stdout.write(maskedData);
246598
246699
  }
246599
246700
  output.push(maskedData);
246600
246701
  });
246601
246702
  child.stderr.on("data", (data) => {
246602
246703
  const maskedData = maskTokens2(data.toString());
246603
- if (!options?.silent) {
246704
+ if (!silent) {
246604
246705
  process.stderr.write(maskedData);
246605
246706
  }
246606
246707
  output.push(maskedData);
@@ -248851,6 +248952,14 @@ var PrivateKeyFragment = graphql(`
248851
248952
  healthStatus
248852
248953
  provider
248853
248954
  region
248955
+ address
248956
+ blockchainNodes {
248957
+ ... on BlockchainNode {
248958
+ id
248959
+ name
248960
+ uniqueName
248961
+ }
248962
+ }
248854
248963
  }
248855
248964
  `);
248856
248965
  var getPrivateKeys = graphql(`
@@ -251522,6 +251631,7 @@ var Xe2 = o7(({ config: e10, path: t8 }, s7 = ze2()) => {
251522
251631
  async function codegenTsconfig(env2, thegraphSubgraphNames) {
251523
251632
  const tsconfig = he4();
251524
251633
  if (!tsconfig?.config) {
251634
+ note("No tsconfig found, skipping codegen for hasura, portal, thegraph and blockscout", "warn");
251525
251635
  return {
251526
251636
  hasura: false,
251527
251637
  portal: false,
@@ -260696,4 +260806,4 @@ async function sdkCliCommand(argv = process.argv) {
260696
260806
  // src/cli.ts
260697
260807
  sdkCliCommand();
260698
260808
 
260699
- //# debugId=514072B03B4E8E4164756E2164756E21
260809
+ //# debugId=A88AEC70E69D8A8564756E2164756E21