@fuel-ts/account 0.0.0-rc-2037-20240429115810 → 0.0.0-rc-2152-20240429145747

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.

Potentially problematic release.


This version of @fuel-ts/account might be problematic. Click here for more details.

Files changed (33) hide show
  1. package/dist/index.global.js +126 -1074
  2. package/dist/index.global.js.map +1 -1
  3. package/dist/index.js +128 -218
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +39 -123
  6. package/dist/index.mjs.map +1 -1
  7. package/dist/predicate/predicate.d.ts +2 -9
  8. package/dist/predicate/predicate.d.ts.map +1 -1
  9. package/dist/providers/provider.d.ts +0 -9
  10. package/dist/providers/provider.d.ts.map +1 -1
  11. package/dist/providers/transaction-request/index.d.ts +0 -1
  12. package/dist/providers/transaction-request/index.d.ts.map +1 -1
  13. package/dist/providers/transaction-request/transaction-request.d.ts +0 -2
  14. package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
  15. package/dist/test-utils/index.d.ts +0 -1
  16. package/dist/test-utils/index.d.ts.map +1 -1
  17. package/dist/test-utils/seedTestWallet.d.ts +1 -1
  18. package/dist/test-utils/seedTestWallet.d.ts.map +1 -1
  19. package/dist/test-utils.global.js +136 -1073
  20. package/dist/test-utils.global.js.map +1 -1
  21. package/dist/test-utils.js +125 -205
  22. package/dist/test-utils.js.map +1 -1
  23. package/dist/test-utils.mjs +42 -119
  24. package/dist/test-utils.mjs.map +1 -1
  25. package/dist/wallet/base-wallet-unlocked.d.ts +2 -2
  26. package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -1
  27. package/package.json +15 -15
  28. package/dist/providers/transaction-request/helpers.d.ts +0 -10
  29. package/dist/providers/transaction-request/helpers.d.ts.map +0 -1
  30. package/dist/test-utils/resources.d.ts +0 -4
  31. package/dist/test-utils/resources.d.ts.map +0 -1
  32. package/dist/test-utils/transactionRequest.d.ts +0 -5
  33. package/dist/test-utils/transactionRequest.d.ts.map +0 -1
@@ -173,13 +173,13 @@
173
173
  if (str !== lowered && str !== uppered)
174
174
  return "Mixed-case string " + str;
175
175
  str = lowered;
176
- const split3 = str.lastIndexOf("1");
177
- if (split3 === -1)
176
+ const split2 = str.lastIndexOf("1");
177
+ if (split2 === -1)
178
178
  return "No separator character for " + str;
179
- if (split3 === 0)
179
+ if (split2 === 0)
180
180
  return "Missing prefix for " + str;
181
- const prefix = str.slice(0, split3);
182
- const wordChars = str.slice(split3 + 1);
181
+ const prefix = str.slice(0, split2);
182
+ const wordChars = str.slice(split2 + 1);
183
183
  if (wordChars.length < 6)
184
184
  return "Data too short";
185
185
  let chk = prefixChk(prefix);
@@ -1080,7 +1080,7 @@
1080
1080
  }
1081
1081
  return this;
1082
1082
  };
1083
- BN2.prototype.add = function add2(num) {
1083
+ BN2.prototype.add = function add(num) {
1084
1084
  var res;
1085
1085
  if (num.negative !== 0 && this.negative === 0) {
1086
1086
  num.negative = 0;
@@ -2794,7 +2794,7 @@
2794
2794
  }
2795
2795
  return r;
2796
2796
  };
2797
- MPrime.prototype.split = function split3(input, out) {
2797
+ MPrime.prototype.split = function split2(input, out) {
2798
2798
  input.iushrn(this.n, 0, out);
2799
2799
  };
2800
2800
  MPrime.prototype.imulK = function imulK(num) {
@@ -2808,7 +2808,7 @@
2808
2808
  );
2809
2809
  }
2810
2810
  inherits(K256, MPrime);
2811
- K256.prototype.split = function split3(input, output3) {
2811
+ K256.prototype.split = function split2(input, output3) {
2812
2812
  var mask2 = 4194303;
2813
2813
  var outLen = Math.min(input.length, 9);
2814
2814
  for (var i = 0; i < outLen; i++) {
@@ -2944,7 +2944,7 @@
2944
2944
  }
2945
2945
  return this.m.sub(a)._forceRed(this);
2946
2946
  };
2947
- Red.prototype.add = function add2(a, b) {
2947
+ Red.prototype.add = function add(a, b) {
2948
2948
  this._verify2(a, b);
2949
2949
  var res = a.add(b);
2950
2950
  if (res.cmp(this.m) >= 0) {
@@ -20408,7 +20408,7 @@ spurious results.`);
20408
20408
  }
20409
20409
  return instance.ptr;
20410
20410
  }
20411
- function add2(dst, lhs, rhs) {
20411
+ function add(dst, lhs, rhs) {
20412
20412
  const ret3 = wasm$1.add(dst, lhs, rhs);
20413
20413
  return Instruction.__wrap(ret3);
20414
20414
  }
@@ -27987,7 +27987,7 @@ spurious results.`);
27987
27987
  exports.WQOP = WQOP;
27988
27988
  exports.XOR = XOR;
27989
27989
  exports.XORI = XORI;
27990
- exports.add = add2;
27990
+ exports.add = add;
27991
27991
  exports.addi = addi2;
27992
27992
  exports.aloc = aloc;
27993
27993
  exports.and = and;
@@ -30264,13 +30264,13 @@ spurious results.`);
30264
30264
  createDebug.names = [];
30265
30265
  createDebug.skips = [];
30266
30266
  var i;
30267
- var split3 = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
30268
- var len = split3.length;
30267
+ var split2 = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
30268
+ var len = split2.length;
30269
30269
  for (i = 0; i < len; i++) {
30270
- if (!split3[i]) {
30270
+ if (!split2[i]) {
30271
30271
  continue;
30272
30272
  }
30273
- namespaces = split3[i].replace(/\*/g, ".*?");
30273
+ namespaces = split2[i].replace(/\*/g, ".*?");
30274
30274
  if (namespaces[0] === "-") {
30275
30275
  createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
30276
30276
  } else {
@@ -31198,9 +31198,9 @@ spurious results.`);
31198
31198
  function setBigUint64(view, byteOffset, value, isLE3) {
31199
31199
  if (typeof view.setBigUint64 === "function")
31200
31200
  return view.setBigUint64(byteOffset, value, isLE3);
31201
- const _32n3 = BigInt(32);
31201
+ const _32n2 = BigInt(32);
31202
31202
  const _u32_max = BigInt(4294967295);
31203
- const wh = Number(value >> _32n3 & _u32_max);
31203
+ const wh = Number(value >> _32n2 & _u32_max);
31204
31204
  const wl = Number(value & _u32_max);
31205
31205
  const h = isLE3 ? 4 : 0;
31206
31206
  const l = isLE3 ? 0 : 4;
@@ -32947,7 +32947,7 @@ This unreleased fuel-core build may include features and updates not yet support
32947
32947
  }
32948
32948
 
32949
32949
  // ../crypto/dist/index.mjs
32950
- var import_crypto8 = __toESM(__require("crypto"), 1);
32950
+ var import_crypto7 = __toESM(__require("crypto"), 1);
32951
32951
 
32952
32952
  // ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/_version.js
32953
32953
  var version = "6.7.1";
@@ -33114,18 +33114,6 @@ This unreleased fuel-core build may include features and updates not yet support
33114
33114
  function getBytes(value, name) {
33115
33115
  return _getBytes(value, name, false);
33116
33116
  }
33117
- function isHexString(value, length) {
33118
- if (typeof value !== "string" || !value.match(/^0x[0-9A-Fa-f]*$/)) {
33119
- return false;
33120
- }
33121
- if (typeof length === "number" && value.length !== 2 + 2 * length) {
33122
- return false;
33123
- }
33124
- if (length === true && value.length % 2 !== 0) {
33125
- return false;
33126
- }
33127
- return true;
33128
- }
33129
33117
  var HexCharacters2 = "0123456789abcdef";
33130
33118
  function hexlify2(data) {
33131
33119
  const bytes3 = getBytes(data);
@@ -33486,74 +33474,7 @@ This unreleased fuel-core build may include features and updates not yet support
33486
33474
  };
33487
33475
  var assert_default = assert2;
33488
33476
 
33489
- // ../../node_modules/.pnpm/@noble+hashes@1.1.2/node_modules/@noble/hashes/esm/_u64.js
33490
- var U32_MASK642 = BigInt(2 ** 32 - 1);
33491
- var _32n2 = BigInt(32);
33492
- function fromBig2(n, le = false) {
33493
- if (le)
33494
- return { h: Number(n & U32_MASK642), l: Number(n >> _32n2 & U32_MASK642) };
33495
- return { h: Number(n >> _32n2 & U32_MASK642) | 0, l: Number(n & U32_MASK642) | 0 };
33496
- }
33497
- function split2(lst, le = false) {
33498
- let Ah = new Uint32Array(lst.length);
33499
- let Al = new Uint32Array(lst.length);
33500
- for (let i = 0; i < lst.length; i++) {
33501
- const { h, l } = fromBig2(lst[i], le);
33502
- [Ah[i], Al[i]] = [h, l];
33503
- }
33504
- return [Ah, Al];
33505
- }
33506
- var toBig = (h, l) => BigInt(h >>> 0) << _32n2 | BigInt(l >>> 0);
33507
- var shrSH = (h, l, s) => h >>> s;
33508
- var shrSL = (h, l, s) => h << 32 - s | l >>> s;
33509
- var rotrSH = (h, l, s) => h >>> s | l << 32 - s;
33510
- var rotrSL = (h, l, s) => h << 32 - s | l >>> s;
33511
- var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
33512
- var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
33513
- var rotr32H = (h, l) => l;
33514
- var rotr32L = (h, l) => h;
33515
- var rotlSH2 = (h, l, s) => h << s | l >>> 32 - s;
33516
- var rotlSL2 = (h, l, s) => l << s | h >>> 32 - s;
33517
- var rotlBH2 = (h, l, s) => l << s - 32 | h >>> 64 - s;
33518
- var rotlBL2 = (h, l, s) => h << s - 32 | l >>> 64 - s;
33519
- function add(Ah, Al, Bh, Bl) {
33520
- const l = (Al >>> 0) + (Bl >>> 0);
33521
- return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };
33522
- }
33523
- var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
33524
- var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
33525
- var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
33526
- var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
33527
- var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
33528
- var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
33529
- var u64 = {
33530
- fromBig: fromBig2,
33531
- split: split2,
33532
- toBig,
33533
- shrSH,
33534
- shrSL,
33535
- rotrSH,
33536
- rotrSL,
33537
- rotrBH,
33538
- rotrBL,
33539
- rotr32H,
33540
- rotr32L,
33541
- rotlSH: rotlSH2,
33542
- rotlSL: rotlSL2,
33543
- rotlBH: rotlBH2,
33544
- rotlBL: rotlBL2,
33545
- add,
33546
- add3L,
33547
- add3H,
33548
- add4L,
33549
- add4H,
33550
- add5H,
33551
- add5L
33552
- };
33553
- var u64_default = u64;
33554
-
33555
33477
  // ../../node_modules/.pnpm/@noble+hashes@1.1.2/node_modules/@noble/hashes/esm/utils.js
33556
- var u322 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
33557
33478
  var createView2 = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
33558
33479
  var isLE2 = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
33559
33480
  if (!isLE2)
@@ -33586,224 +33507,14 @@ This unreleased fuel-core build may include features and updates not yet support
33586
33507
  hashC.create = () => hashConstructor();
33587
33508
  return hashC;
33588
33509
  }
33589
- function wrapConstructorWithOpts(hashCons) {
33590
- const hashC = (msg, opts) => hashCons(opts).update(toBytes2(msg)).digest();
33591
- const tmp = hashCons({});
33592
- hashC.outputLen = tmp.outputLen;
33593
- hashC.blockLen = tmp.blockLen;
33594
- hashC.create = (opts) => hashCons(opts);
33595
- return hashC;
33596
- }
33597
-
33598
- // ../../node_modules/.pnpm/@noble+hashes@1.1.2/node_modules/@noble/hashes/esm/sha3.js
33599
- var [SHA3_PI2, SHA3_ROTL2, _SHA3_IOTA2] = [[], [], []];
33600
- var _0n2 = BigInt(0);
33601
- var _1n2 = BigInt(1);
33602
- var _2n2 = BigInt(2);
33603
- var _7n2 = BigInt(7);
33604
- var _256n2 = BigInt(256);
33605
- var _0x71n2 = BigInt(113);
33606
- for (let round = 0, R = _1n2, x = 1, y = 0; round < 24; round++) {
33607
- [x, y] = [y, (2 * x + 3 * y) % 5];
33608
- SHA3_PI2.push(2 * (5 * y + x));
33609
- SHA3_ROTL2.push((round + 1) * (round + 2) / 2 % 64);
33610
- let t = _0n2;
33611
- for (let j = 0; j < 7; j++) {
33612
- R = (R << _1n2 ^ (R >> _7n2) * _0x71n2) % _256n2;
33613
- if (R & _2n2)
33614
- t ^= _1n2 << (_1n2 << BigInt(j)) - _1n2;
33615
- }
33616
- _SHA3_IOTA2.push(t);
33617
- }
33618
- var [SHA3_IOTA_H2, SHA3_IOTA_L2] = u64_default.split(_SHA3_IOTA2, true);
33619
- var rotlH2 = (h, l, s) => s > 32 ? u64_default.rotlBH(h, l, s) : u64_default.rotlSH(h, l, s);
33620
- var rotlL2 = (h, l, s) => s > 32 ? u64_default.rotlBL(h, l, s) : u64_default.rotlSL(h, l, s);
33621
- function keccakP2(s, rounds = 24) {
33622
- const B = new Uint32Array(5 * 2);
33623
- for (let round = 24 - rounds; round < 24; round++) {
33624
- for (let x = 0; x < 10; x++)
33625
- B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];
33626
- for (let x = 0; x < 10; x += 2) {
33627
- const idx1 = (x + 8) % 10;
33628
- const idx0 = (x + 2) % 10;
33629
- const B0 = B[idx0];
33630
- const B1 = B[idx0 + 1];
33631
- const Th = rotlH2(B0, B1, 1) ^ B[idx1];
33632
- const Tl = rotlL2(B0, B1, 1) ^ B[idx1 + 1];
33633
- for (let y = 0; y < 50; y += 10) {
33634
- s[x + y] ^= Th;
33635
- s[x + y + 1] ^= Tl;
33636
- }
33637
- }
33638
- let curH = s[2];
33639
- let curL = s[3];
33640
- for (let t = 0; t < 24; t++) {
33641
- const shift = SHA3_ROTL2[t];
33642
- const Th = rotlH2(curH, curL, shift);
33643
- const Tl = rotlL2(curH, curL, shift);
33644
- const PI = SHA3_PI2[t];
33645
- curH = s[PI];
33646
- curL = s[PI + 1];
33647
- s[PI] = Th;
33648
- s[PI + 1] = Tl;
33649
- }
33650
- for (let y = 0; y < 50; y += 10) {
33651
- for (let x = 0; x < 10; x++)
33652
- B[x] = s[y + x];
33653
- for (let x = 0; x < 10; x++)
33654
- s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];
33655
- }
33656
- s[0] ^= SHA3_IOTA_H2[round];
33657
- s[1] ^= SHA3_IOTA_L2[round];
33658
- }
33659
- B.fill(0);
33660
- }
33661
- var Keccak2 = class extends Hash2 {
33662
- // NOTE: we accept arguments in bytes instead of bits here.
33663
- constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
33664
- super();
33665
- this.blockLen = blockLen;
33666
- this.suffix = suffix;
33667
- this.outputLen = outputLen;
33668
- this.enableXOF = enableXOF;
33669
- this.rounds = rounds;
33670
- this.pos = 0;
33671
- this.posOut = 0;
33672
- this.finished = false;
33673
- this.destroyed = false;
33674
- assert_default.number(outputLen);
33675
- if (0 >= this.blockLen || this.blockLen >= 200)
33676
- throw new Error("Sha3 supports only keccak-f1600 function");
33677
- this.state = new Uint8Array(200);
33678
- this.state32 = u322(this.state);
33679
- }
33680
- keccak() {
33681
- keccakP2(this.state32, this.rounds);
33682
- this.posOut = 0;
33683
- this.pos = 0;
33684
- }
33685
- update(data) {
33686
- assert_default.exists(this);
33687
- const { blockLen, state } = this;
33688
- data = toBytes2(data);
33689
- const len = data.length;
33690
- for (let pos = 0; pos < len; ) {
33691
- const take = Math.min(blockLen - this.pos, len - pos);
33692
- for (let i = 0; i < take; i++)
33693
- state[this.pos++] ^= data[pos++];
33694
- if (this.pos === blockLen)
33695
- this.keccak();
33696
- }
33697
- return this;
33698
- }
33699
- finish() {
33700
- if (this.finished)
33701
- return;
33702
- this.finished = true;
33703
- const { state, suffix, pos, blockLen } = this;
33704
- state[pos] ^= suffix;
33705
- if ((suffix & 128) !== 0 && pos === blockLen - 1)
33706
- this.keccak();
33707
- state[blockLen - 1] ^= 128;
33708
- this.keccak();
33709
- }
33710
- writeInto(out) {
33711
- assert_default.exists(this, false);
33712
- assert_default.bytes(out);
33713
- this.finish();
33714
- const bufferOut = this.state;
33715
- const { blockLen } = this;
33716
- for (let pos = 0, len = out.length; pos < len; ) {
33717
- if (this.posOut >= blockLen)
33718
- this.keccak();
33719
- const take = Math.min(blockLen - this.posOut, len - pos);
33720
- out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
33721
- this.posOut += take;
33722
- pos += take;
33723
- }
33724
- return out;
33725
- }
33726
- xofInto(out) {
33727
- if (!this.enableXOF)
33728
- throw new Error("XOF is not possible for this instance");
33729
- return this.writeInto(out);
33730
- }
33731
- xof(bytes3) {
33732
- assert_default.number(bytes3);
33733
- return this.xofInto(new Uint8Array(bytes3));
33734
- }
33735
- digestInto(out) {
33736
- assert_default.output(out, this);
33737
- if (this.finished)
33738
- throw new Error("digest() was already called");
33739
- this.writeInto(out);
33740
- this.destroy();
33741
- return out;
33742
- }
33743
- digest() {
33744
- return this.digestInto(new Uint8Array(this.outputLen));
33745
- }
33746
- destroy() {
33747
- this.destroyed = true;
33748
- this.state.fill(0);
33749
- }
33750
- _cloneInto(to) {
33751
- const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
33752
- to || (to = new Keccak2(blockLen, suffix, outputLen, enableXOF, rounds));
33753
- to.state32.set(this.state32);
33754
- to.pos = this.pos;
33755
- to.posOut = this.posOut;
33756
- to.finished = this.finished;
33757
- to.rounds = rounds;
33758
- to.suffix = suffix;
33759
- to.outputLen = outputLen;
33760
- to.enableXOF = enableXOF;
33761
- to.destroyed = this.destroyed;
33762
- return to;
33763
- }
33764
- };
33765
- var gen2 = (suffix, blockLen, outputLen) => wrapConstructor2(() => new Keccak2(blockLen, suffix, outputLen));
33766
- var sha3_2242 = gen2(6, 144, 224 / 8);
33767
- var sha3_2562 = gen2(6, 136, 256 / 8);
33768
- var sha3_3842 = gen2(6, 104, 384 / 8);
33769
- var sha3_5122 = gen2(6, 72, 512 / 8);
33770
- var keccak_2242 = gen2(1, 144, 224 / 8);
33771
- var keccak_2562 = gen2(1, 136, 256 / 8);
33772
- var keccak_3842 = gen2(1, 104, 384 / 8);
33773
- var keccak_5122 = gen2(1, 72, 512 / 8);
33774
- var genShake2 = (suffix, blockLen, outputLen) => wrapConstructorWithOpts((opts = {}) => new Keccak2(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true));
33775
- var shake1282 = genShake2(31, 168, 128 / 8);
33776
- var shake2562 = genShake2(31, 136, 256 / 8);
33777
-
33778
- // ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/crypto/keccak.js
33779
- var locked2 = false;
33780
- var _keccak256 = function(data) {
33781
- return keccak_2562(data);
33782
- };
33783
- var __keccak256 = _keccak256;
33784
- function keccak256(_data) {
33785
- const data = getBytes(_data, "data");
33786
- return hexlify2(__keccak256(data));
33787
- }
33788
- keccak256._ = _keccak256;
33789
- keccak256.lock = function() {
33790
- locked2 = true;
33791
- };
33792
- keccak256.register = function(func) {
33793
- if (locked2) {
33794
- throw new TypeError("keccak256 is locked");
33795
- }
33796
- __keccak256 = func;
33797
- };
33798
- Object.freeze(keccak256);
33799
33510
 
33800
33511
  // ../../node_modules/.pnpm/@noble+hashes@1.1.2/node_modules/@noble/hashes/esm/_sha2.js
33801
33512
  function setBigUint642(view, byteOffset, value, isLE3) {
33802
33513
  if (typeof view.setBigUint64 === "function")
33803
33514
  return view.setBigUint64(byteOffset, value, isLE3);
33804
- const _32n3 = BigInt(32);
33515
+ const _32n2 = BigInt(32);
33805
33516
  const _u32_max = BigInt(4294967295);
33806
- const wh = Number(value >> _32n3 & _u32_max);
33517
+ const wh = Number(value >> _32n2 & _u32_max);
33807
33518
  const wl = Number(value & _u32_max);
33808
33519
  const h = isLE3 ? 4 : 0;
33809
33520
  const l = isLE3 ? 0 : 4;
@@ -33975,7 +33686,7 @@ This unreleased fuel-core build may include features and updates not yet support
33975
33686
  var ripemd160 = wrapConstructor2(() => new RIPEMD160());
33976
33687
 
33977
33688
  // ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/crypto/ripemd160.js
33978
- var locked3 = false;
33689
+ var locked2 = false;
33979
33690
  var _ripemd160 = function(data) {
33980
33691
  return ripemd160(data);
33981
33692
  };
@@ -33986,10 +33697,10 @@ This unreleased fuel-core build may include features and updates not yet support
33986
33697
  }
33987
33698
  ripemd1602._ = _ripemd160;
33988
33699
  ripemd1602.lock = function() {
33989
- locked3 = true;
33700
+ locked2 = true;
33990
33701
  };
33991
33702
  ripemd1602.register = function(func) {
33992
- if (locked3) {
33703
+ if (locked2) {
33993
33704
  throw new TypeError("ripemd160 is locked");
33994
33705
  }
33995
33706
  __ripemd160 = func;
@@ -33997,7 +33708,7 @@ This unreleased fuel-core build may include features and updates not yet support
33997
33708
  Object.freeze(ripemd1602);
33998
33709
 
33999
33710
  // ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/crypto/pbkdf2.js
34000
- var locked4 = false;
33711
+ var locked3 = false;
34001
33712
  var _pbkdf2 = function(password, salt, iterations, keylen, algo) {
34002
33713
  return (0, import_crypto2.pbkdf2Sync)(password, salt, iterations, keylen, algo);
34003
33714
  };
@@ -34009,602 +33720,19 @@ This unreleased fuel-core build may include features and updates not yet support
34009
33720
  }
34010
33721
  pbkdf22._ = _pbkdf2;
34011
33722
  pbkdf22.lock = function() {
34012
- locked4 = true;
33723
+ locked3 = true;
34013
33724
  };
34014
33725
  pbkdf22.register = function(func) {
34015
- if (locked4) {
33726
+ if (locked3) {
34016
33727
  throw new Error("pbkdf2 is locked");
34017
33728
  }
34018
33729
  __pbkdf2 = func;
34019
33730
  };
34020
33731
  Object.freeze(pbkdf22);
34021
33732
 
34022
- // ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/address/address.js
34023
- var BN_03 = BigInt(0);
34024
- var BN_36 = BigInt(36);
34025
- function getChecksumAddress(address) {
34026
- address = address.toLowerCase();
34027
- const chars = address.substring(2).split("");
34028
- const expanded = new Uint8Array(40);
34029
- for (let i = 0; i < 40; i++) {
34030
- expanded[i] = chars[i].charCodeAt(0);
34031
- }
34032
- const hashed = getBytes(keccak256(expanded));
34033
- for (let i = 0; i < 40; i += 2) {
34034
- if (hashed[i >> 1] >> 4 >= 8) {
34035
- chars[i] = chars[i].toUpperCase();
34036
- }
34037
- if ((hashed[i >> 1] & 15) >= 8) {
34038
- chars[i + 1] = chars[i + 1].toUpperCase();
34039
- }
34040
- }
34041
- return "0x" + chars.join("");
34042
- }
34043
- var ibanLookup = {};
34044
- for (let i = 0; i < 10; i++) {
34045
- ibanLookup[String(i)] = String(i);
34046
- }
34047
- for (let i = 0; i < 26; i++) {
34048
- ibanLookup[String.fromCharCode(65 + i)] = String(10 + i);
34049
- }
34050
- var safeDigits = 15;
34051
- function ibanChecksum(address) {
34052
- address = address.toUpperCase();
34053
- address = address.substring(4) + address.substring(0, 2) + "00";
34054
- let expanded = address.split("").map((c) => {
34055
- return ibanLookup[c];
34056
- }).join("");
34057
- while (expanded.length >= safeDigits) {
34058
- let block2 = expanded.substring(0, safeDigits);
34059
- expanded = parseInt(block2, 10) % 97 + expanded.substring(block2.length);
34060
- }
34061
- let checksum = String(98 - parseInt(expanded, 10) % 97);
34062
- while (checksum.length < 2) {
34063
- checksum = "0" + checksum;
34064
- }
34065
- return checksum;
34066
- }
34067
- var Base36 = function() {
34068
- ;
34069
- const result = {};
34070
- for (let i = 0; i < 36; i++) {
34071
- const key = "0123456789abcdefghijklmnopqrstuvwxyz"[i];
34072
- result[key] = BigInt(i);
34073
- }
34074
- return result;
34075
- }();
34076
- function fromBase36(value) {
34077
- value = value.toLowerCase();
34078
- let result = BN_03;
34079
- for (let i = 0; i < value.length; i++) {
34080
- result = result * BN_36 + Base36[value[i]];
34081
- }
34082
- return result;
34083
- }
34084
- function getAddress(address) {
34085
- assertArgument(typeof address === "string", "invalid address", "address", address);
34086
- if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {
34087
- if (!address.startsWith("0x")) {
34088
- address = "0x" + address;
34089
- }
34090
- const result = getChecksumAddress(address);
34091
- assertArgument(!address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) || result === address, "bad address checksum", "address", address);
34092
- return result;
34093
- }
34094
- if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {
34095
- assertArgument(address.substring(2, 4) === ibanChecksum(address), "bad icap checksum", "address", address);
34096
- let result = fromBase36(address.substring(4)).toString(16);
34097
- while (result.length < 40) {
34098
- result = "0" + result;
34099
- }
34100
- return getChecksumAddress("0x" + result);
34101
- }
34102
- assertArgument(false, "invalid address", "address", address);
34103
- }
34104
-
34105
- // ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/transaction/accesslist.js
34106
- function accessSetify(addr, storageKeys) {
34107
- return {
34108
- address: getAddress(addr),
34109
- storageKeys: storageKeys.map((storageKey, index) => {
34110
- assertArgument(isHexString(storageKey, 32), "invalid slot", `storageKeys[${index}]`, storageKey);
34111
- return storageKey.toLowerCase();
34112
- })
34113
- };
34114
- }
34115
- function accessListify(value) {
34116
- if (Array.isArray(value)) {
34117
- return value.map((set, index) => {
34118
- if (Array.isArray(set)) {
34119
- assertArgument(set.length === 2, "invalid slot set", `value[${index}]`, set);
34120
- return accessSetify(set[0], set[1]);
34121
- }
34122
- assertArgument(set != null && typeof set === "object", "invalid address-slot set", "value", value);
34123
- return accessSetify(set.address, set.storageKeys);
34124
- });
34125
- }
34126
- assertArgument(value != null && typeof value === "object", "invalid access list", "value", value);
34127
- const result = Object.keys(value).map((addr) => {
34128
- const storageKeys = value[addr].reduce((accum, storageKey) => {
34129
- accum[storageKey] = true;
34130
- return accum;
34131
- }, {});
34132
- return accessSetify(addr, Object.keys(storageKeys).sort());
34133
- });
34134
- result.sort((a, b) => a.address.localeCompare(b.address));
34135
- return result;
34136
- }
34137
-
34138
- // ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/providers/plugins-network.js
34139
- var EnsAddress = "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
34140
- var NetworkPlugin = class {
34141
- /**
34142
- * The name of the plugin.
34143
- *
34144
- * It is recommended to use reverse-domain-notation, which permits
34145
- * unique names with a known authority as well as hierarchal entries.
34146
- */
34147
- name;
34148
- /**
34149
- * Creates a new **NetworkPlugin**.
34150
- */
34151
- constructor(name) {
34152
- defineProperties(this, { name });
34153
- }
34154
- /**
34155
- * Creates a copy of this plugin.
34156
- */
34157
- clone() {
34158
- return new NetworkPlugin(this.name);
34159
- }
34160
- };
34161
- var GasCostPlugin = class extends NetworkPlugin {
34162
- /**
34163
- * The block number to treat these values as valid from.
34164
- *
34165
- * This allows a hardfork to have updated values included as well as
34166
- * mulutiple hardforks to be supported.
34167
- */
34168
- effectiveBlock;
34169
- /**
34170
- * The transactions base fee.
34171
- */
34172
- txBase;
34173
- /**
34174
- * The fee for creating a new account.
34175
- */
34176
- txCreate;
34177
- /**
34178
- * The fee per zero-byte in the data.
34179
- */
34180
- txDataZero;
34181
- /**
34182
- * The fee per non-zero-byte in the data.
34183
- */
34184
- txDataNonzero;
34185
- /**
34186
- * The fee per storage key in the [[link-eip-2930]] access list.
34187
- */
34188
- txAccessListStorageKey;
34189
- /**
34190
- * The fee per address in the [[link-eip-2930]] access list.
34191
- */
34192
- txAccessListAddress;
34193
- /**
34194
- * Creates a new GasCostPlugin from %%effectiveBlock%% until the
34195
- * latest block or another GasCostPlugin supercedes that block number,
34196
- * with the associated %%costs%%.
34197
- */
34198
- constructor(effectiveBlock, costs) {
34199
- if (effectiveBlock == null) {
34200
- effectiveBlock = 0;
34201
- }
34202
- super(`org.ethers.network.plugins.GasCost#${effectiveBlock || 0}`);
34203
- const props = { effectiveBlock };
34204
- function set(name, nullish) {
34205
- let value = (costs || {})[name];
34206
- if (value == null) {
34207
- value = nullish;
34208
- }
34209
- assertArgument(typeof value === "number", `invalud value for ${name}`, "costs", costs);
34210
- props[name] = value;
34211
- }
34212
- set("txBase", 21e3);
34213
- set("txCreate", 32e3);
34214
- set("txDataZero", 4);
34215
- set("txDataNonzero", 16);
34216
- set("txAccessListStorageKey", 1900);
34217
- set("txAccessListAddress", 2400);
34218
- defineProperties(this, props);
34219
- }
34220
- clone() {
34221
- return new GasCostPlugin(this.effectiveBlock, this);
34222
- }
34223
- };
34224
- var EnsPlugin = class extends NetworkPlugin {
34225
- /**
34226
- * The ENS Registrty Contract address.
34227
- */
34228
- address;
34229
- /**
34230
- * The chain ID that the ENS contract lives on.
34231
- */
34232
- targetNetwork;
34233
- /**
34234
- * Creates a new **EnsPlugin** connected to %%address%% on the
34235
- * %%targetNetwork%%. The default ENS address and mainnet is used
34236
- * if unspecified.
34237
- */
34238
- constructor(address, targetNetwork) {
34239
- super("org.ethers.plugins.network.Ens");
34240
- defineProperties(this, {
34241
- address: address || EnsAddress,
34242
- targetNetwork: targetNetwork == null ? 1 : targetNetwork
34243
- });
34244
- }
34245
- clone() {
34246
- return new EnsPlugin(this.address, this.targetNetwork);
34247
- }
34248
- };
34249
- var FetchUrlFeeDataNetworkPlugin = class extends NetworkPlugin {
34250
- #url;
34251
- #processFunc;
34252
- /**
34253
- * The URL to initialize the FetchRequest with in %%processFunc%%.
34254
- */
34255
- get url() {
34256
- return this.#url;
34257
- }
34258
- /**
34259
- * The callback to use when computing the FeeData.
34260
- */
34261
- get processFunc() {
34262
- return this.#processFunc;
34263
- }
34264
- /**
34265
- * Creates a new **FetchUrlFeeDataNetworkPlugin** which will
34266
- * be used when computing the fee data for the network.
34267
- */
34268
- constructor(url, processFunc) {
34269
- super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");
34270
- this.#url = url;
34271
- this.#processFunc = processFunc;
34272
- }
34273
- // We are immutable, so we can serve as our own clone
34274
- clone() {
34275
- return this;
34276
- }
34277
- };
34278
-
34279
- // ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/providers/network.js
34280
- var Networks = /* @__PURE__ */ new Map();
34281
- var Network = class {
34282
- #name;
34283
- #chainId;
34284
- #plugins;
34285
- /**
34286
- * Creates a new **Network** for %%name%% and %%chainId%%.
34287
- */
34288
- constructor(name, chainId) {
34289
- this.#name = name;
34290
- this.#chainId = getBigInt(chainId);
34291
- this.#plugins = /* @__PURE__ */ new Map();
34292
- }
34293
- /**
34294
- * Returns a JSON-compatible representation of a Network.
34295
- */
34296
- toJSON() {
34297
- return { name: this.name, chainId: String(this.chainId) };
34298
- }
34299
- /**
34300
- * The network common name.
34301
- *
34302
- * This is the canonical name, as networks migh have multiple
34303
- * names.
34304
- */
34305
- get name() {
34306
- return this.#name;
34307
- }
34308
- set name(value) {
34309
- this.#name = value;
34310
- }
34311
- /**
34312
- * The network chain ID.
34313
- */
34314
- get chainId() {
34315
- return this.#chainId;
34316
- }
34317
- set chainId(value) {
34318
- this.#chainId = getBigInt(value, "chainId");
34319
- }
34320
- /**
34321
- * Returns true if %%other%% matches this network. Any chain ID
34322
- * must match, and if no chain ID is present, the name must match.
34323
- *
34324
- * This method does not currently check for additional properties,
34325
- * such as ENS address or plug-in compatibility.
34326
- */
34327
- matches(other) {
34328
- if (other == null) {
34329
- return false;
34330
- }
34331
- if (typeof other === "string") {
34332
- try {
34333
- return this.chainId === getBigInt(other);
34334
- } catch (error) {
34335
- }
34336
- return this.name === other;
34337
- }
34338
- if (typeof other === "number" || typeof other === "bigint") {
34339
- try {
34340
- return this.chainId === getBigInt(other);
34341
- } catch (error) {
34342
- }
34343
- return false;
34344
- }
34345
- if (typeof other === "object") {
34346
- if (other.chainId != null) {
34347
- try {
34348
- return this.chainId === getBigInt(other.chainId);
34349
- } catch (error) {
34350
- }
34351
- return false;
34352
- }
34353
- if (other.name != null) {
34354
- return this.name === other.name;
34355
- }
34356
- return false;
34357
- }
34358
- return false;
34359
- }
34360
- /**
34361
- * Returns the list of plugins currently attached to this Network.
34362
- */
34363
- get plugins() {
34364
- return Array.from(this.#plugins.values());
34365
- }
34366
- /**
34367
- * Attach a new %%plugin%% to this Network. The network name
34368
- * must be unique, excluding any fragment.
34369
- */
34370
- attachPlugin(plugin) {
34371
- if (this.#plugins.get(plugin.name)) {
34372
- throw new Error(`cannot replace existing plugin: ${plugin.name} `);
34373
- }
34374
- this.#plugins.set(plugin.name, plugin.clone());
34375
- return this;
34376
- }
34377
- /**
34378
- * Return the plugin, if any, matching %%name%% exactly. Plugins
34379
- * with fragments will not be returned unless %%name%% includes
34380
- * a fragment.
34381
- */
34382
- getPlugin(name) {
34383
- return this.#plugins.get(name) || null;
34384
- }
34385
- /**
34386
- * Gets a list of all plugins that match %%name%%, with otr without
34387
- * a fragment.
34388
- */
34389
- getPlugins(basename) {
34390
- return this.plugins.filter((p) => p.name.split("#")[0] === basename);
34391
- }
34392
- /**
34393
- * Create a copy of this Network.
34394
- */
34395
- clone() {
34396
- const clone4 = new Network(this.name, this.chainId);
34397
- this.plugins.forEach((plugin) => {
34398
- clone4.attachPlugin(plugin.clone());
34399
- });
34400
- return clone4;
34401
- }
34402
- /**
34403
- * Compute the intrinsic gas required for a transaction.
34404
- *
34405
- * A GasCostPlugin can be attached to override the default
34406
- * values.
34407
- */
34408
- computeIntrinsicGas(tx) {
34409
- const costs = this.getPlugin("org.ethers.plugins.network.GasCost") || new GasCostPlugin();
34410
- let gas = costs.txBase;
34411
- if (tx.to == null) {
34412
- gas += costs.txCreate;
34413
- }
34414
- if (tx.data) {
34415
- for (let i = 2; i < tx.data.length; i += 2) {
34416
- if (tx.data.substring(i, i + 2) === "00") {
34417
- gas += costs.txDataZero;
34418
- } else {
34419
- gas += costs.txDataNonzero;
34420
- }
34421
- }
34422
- }
34423
- if (tx.accessList) {
34424
- const accessList = accessListify(tx.accessList);
34425
- for (const addr in accessList) {
34426
- gas += costs.txAccessListAddress + costs.txAccessListStorageKey * accessList[addr].storageKeys.length;
34427
- }
34428
- }
34429
- return gas;
34430
- }
34431
- /**
34432
- * Returns a new Network for the %%network%% name or chainId.
34433
- */
34434
- static from(network) {
34435
- injectCommonNetworks();
34436
- if (network == null) {
34437
- return Network.from("mainnet");
34438
- }
34439
- if (typeof network === "number") {
34440
- network = BigInt(network);
34441
- }
34442
- if (typeof network === "string" || typeof network === "bigint") {
34443
- const networkFunc = Networks.get(network);
34444
- if (networkFunc) {
34445
- return networkFunc();
34446
- }
34447
- if (typeof network === "bigint") {
34448
- return new Network("unknown", network);
34449
- }
34450
- assertArgument(false, "unknown network", "network", network);
34451
- }
34452
- if (typeof network.clone === "function") {
34453
- const clone4 = network.clone();
34454
- return clone4;
34455
- }
34456
- if (typeof network === "object") {
34457
- assertArgument(typeof network.name === "string" && typeof network.chainId === "number", "invalid network object name or chainId", "network", network);
34458
- const custom = new Network(network.name, network.chainId);
34459
- if (network.ensAddress || network.ensNetwork != null) {
34460
- custom.attachPlugin(new EnsPlugin(network.ensAddress, network.ensNetwork));
34461
- }
34462
- return custom;
34463
- }
34464
- assertArgument(false, "invalid network", "network", network);
34465
- }
34466
- /**
34467
- * Register %%nameOrChainId%% with a function which returns
34468
- * an instance of a Network representing that chain.
34469
- */
34470
- static register(nameOrChainId, networkFunc) {
34471
- if (typeof nameOrChainId === "number") {
34472
- nameOrChainId = BigInt(nameOrChainId);
34473
- }
34474
- const existing = Networks.get(nameOrChainId);
34475
- if (existing) {
34476
- assertArgument(false, `conflicting network for ${JSON.stringify(existing.name)}`, "nameOrChainId", nameOrChainId);
34477
- }
34478
- Networks.set(nameOrChainId, networkFunc);
34479
- }
34480
- };
34481
- function parseUnits(_value, decimals) {
34482
- const value = String(_value);
34483
- if (!value.match(/^[0-9.]+$/)) {
34484
- throw new Error(`invalid gwei value: ${_value}`);
34485
- }
34486
- const comps = value.split(".");
34487
- if (comps.length === 1) {
34488
- comps.push("");
34489
- }
34490
- if (comps.length !== 2) {
34491
- throw new Error(`invalid gwei value: ${_value}`);
34492
- }
34493
- while (comps[1].length < decimals) {
34494
- comps[1] += "0";
34495
- }
34496
- if (comps[1].length > 9) {
34497
- let frac = BigInt(comps[1].substring(0, 9));
34498
- if (!comps[1].substring(9).match(/^0+$/)) {
34499
- frac++;
34500
- }
34501
- comps[1] = frac.toString();
34502
- }
34503
- return BigInt(comps[0] + comps[1]);
34504
- }
34505
- function getGasStationPlugin(url) {
34506
- return new FetchUrlFeeDataNetworkPlugin(url, async (fetchFeeData, provider, request) => {
34507
- request.setHeader("User-Agent", "ethers");
34508
- let response;
34509
- try {
34510
- const [_response, _feeData] = await Promise.all([
34511
- request.send(),
34512
- fetchFeeData()
34513
- ]);
34514
- response = _response;
34515
- const payload = response.bodyJson.standard;
34516
- const feeData = {
34517
- gasPrice: _feeData.gasPrice,
34518
- maxFeePerGas: parseUnits(payload.maxFee, 9),
34519
- maxPriorityFeePerGas: parseUnits(payload.maxPriorityFee, 9)
34520
- };
34521
- return feeData;
34522
- } catch (error) {
34523
- assert(false, `error encountered with polygon gas station (${JSON.stringify(request.url)})`, "SERVER_ERROR", { request, response, error });
34524
- }
34525
- });
34526
- }
34527
- function getPriorityFeePlugin(maxPriorityFeePerGas) {
34528
- return new FetchUrlFeeDataNetworkPlugin("data:", async (fetchFeeData, provider, request) => {
34529
- const feeData = await fetchFeeData();
34530
- if (feeData.maxFeePerGas == null || feeData.maxPriorityFeePerGas == null) {
34531
- return feeData;
34532
- }
34533
- const baseFee = feeData.maxFeePerGas - feeData.maxPriorityFeePerGas;
34534
- return {
34535
- gasPrice: feeData.gasPrice,
34536
- maxFeePerGas: baseFee + maxPriorityFeePerGas,
34537
- maxPriorityFeePerGas
34538
- };
34539
- });
34540
- }
34541
- var injected = false;
34542
- function injectCommonNetworks() {
34543
- if (injected) {
34544
- return;
34545
- }
34546
- injected = true;
34547
- function registerEth(name, chainId, options) {
34548
- const func = function() {
34549
- const network = new Network(name, chainId);
34550
- if (options.ensNetwork != null) {
34551
- network.attachPlugin(new EnsPlugin(null, options.ensNetwork));
34552
- }
34553
- network.attachPlugin(new GasCostPlugin());
34554
- (options.plugins || []).forEach((plugin) => {
34555
- network.attachPlugin(plugin);
34556
- });
34557
- return network;
34558
- };
34559
- Network.register(name, func);
34560
- Network.register(chainId, func);
34561
- if (options.altNames) {
34562
- options.altNames.forEach((name2) => {
34563
- Network.register(name2, func);
34564
- });
34565
- }
34566
- }
34567
- registerEth("mainnet", 1, { ensNetwork: 1, altNames: ["homestead"] });
34568
- registerEth("ropsten", 3, { ensNetwork: 3 });
34569
- registerEth("rinkeby", 4, { ensNetwork: 4 });
34570
- registerEth("goerli", 5, { ensNetwork: 5 });
34571
- registerEth("kovan", 42, { ensNetwork: 42 });
34572
- registerEth("sepolia", 11155111, {});
34573
- registerEth("classic", 61, {});
34574
- registerEth("classicKotti", 6, {});
34575
- registerEth("arbitrum", 42161, {
34576
- ensNetwork: 1
34577
- });
34578
- registerEth("arbitrum-goerli", 421613, {});
34579
- registerEth("bnb", 56, { ensNetwork: 1 });
34580
- registerEth("bnbt", 97, {});
34581
- registerEth("linea", 59144, { ensNetwork: 1 });
34582
- registerEth("linea-goerli", 59140, {});
34583
- registerEth("matic", 137, {
34584
- ensNetwork: 1,
34585
- plugins: [
34586
- getGasStationPlugin("https://gasstation.polygon.technology/v2")
34587
- ]
34588
- });
34589
- registerEth("matic-mumbai", 80001, {
34590
- altNames: ["maticMumbai", "maticmum"],
34591
- plugins: [
34592
- getGasStationPlugin("https://gasstation-testnet.polygon.technology/v2")
34593
- ]
34594
- });
34595
- registerEth("optimism", 10, {
34596
- ensNetwork: 1,
34597
- plugins: [
34598
- getPriorityFeePlugin(BigInt("1000000"))
34599
- ]
34600
- });
34601
- registerEth("optimism-goerli", 420, {});
34602
- registerEth("xdai", 100, { ensNetwork: 1 });
34603
- }
34604
-
34605
33733
  // ../crypto/dist/index.mjs
33734
+ var import_crypto8 = __toESM(__require("crypto"), 1);
34606
33735
  var import_crypto9 = __toESM(__require("crypto"), 1);
34607
- var import_crypto10 = __toESM(__require("crypto"), 1);
34608
33736
  var scrypt3 = (params) => {
34609
33737
  const { password, salt, n, p, r, dklen } = params;
34610
33738
  const derivedKey = scrypt(password, salt, { N: n, r, p, dkLen: dklen });
@@ -34613,7 +33741,7 @@ This unreleased fuel-core build may include features and updates not yet support
34613
33741
  var keccak2562 = (data) => keccak_256(data);
34614
33742
  var bufferFromString = (string, encoding = "base64") => Uint8Array.from(Buffer.from(string, encoding));
34615
33743
  var randomBytes4 = (length) => {
34616
- const randomValues = Uint8Array.from(import_crypto9.default.randomBytes(length));
33744
+ const randomValues = Uint8Array.from(import_crypto8.default.randomBytes(length));
34617
33745
  return randomValues;
34618
33746
  };
34619
33747
  var stringFromBuffer = (buffer, encoding = "base64") => Buffer.from(buffer).toString(encoding);
@@ -34628,7 +33756,7 @@ This unreleased fuel-core build may include features and updates not yet support
34628
33756
  const salt = randomBytes4(32);
34629
33757
  const secret = keyFromPassword(password, salt);
34630
33758
  const dataBuffer = Uint8Array.from(Buffer.from(JSON.stringify(data), "utf-8"));
34631
- const cipher = await import_crypto8.default.createCipheriv(ALGORITHM, secret, iv);
33759
+ const cipher = await import_crypto7.default.createCipheriv(ALGORITHM, secret, iv);
34632
33760
  let cipherData = cipher.update(dataBuffer);
34633
33761
  cipherData = Buffer.concat([cipherData, cipher.final()]);
34634
33762
  return {
@@ -34642,7 +33770,7 @@ This unreleased fuel-core build may include features and updates not yet support
34642
33770
  const salt = bufferFromString(keystore.salt);
34643
33771
  const secret = keyFromPassword(password, salt);
34644
33772
  const encryptedText = bufferFromString(keystore.data);
34645
- const decipher = await import_crypto8.default.createDecipheriv(ALGORITHM, secret, iv);
33773
+ const decipher = await import_crypto7.default.createDecipheriv(ALGORITHM, secret, iv);
34646
33774
  const decrypted = decipher.update(encryptedText);
34647
33775
  const deBuff = Buffer.concat([decrypted, decipher.final()]);
34648
33776
  const decryptedData = Buffer.from(deBuff).toString("utf-8");
@@ -34653,12 +33781,12 @@ This unreleased fuel-core build may include features and updates not yet support
34653
33781
  }
34654
33782
  };
34655
33783
  async function encryptJsonWalletData(data, key, iv) {
34656
- const cipher = await import_crypto10.default.createCipheriv("aes-128-ctr", key.subarray(0, 16), iv);
33784
+ const cipher = await import_crypto9.default.createCipheriv("aes-128-ctr", key.subarray(0, 16), iv);
34657
33785
  const encrypted = Buffer.concat([cipher.update(data), cipher.final()]);
34658
33786
  return new Uint8Array(encrypted);
34659
33787
  }
34660
33788
  async function decryptJsonWalletData(data, key, iv) {
34661
- const decipher = import_crypto10.default.createDecipheriv("aes-128-ctr", key.subarray(0, 16), iv);
33789
+ const decipher = import_crypto9.default.createDecipheriv("aes-128-ctr", key.subarray(0, 16), iv);
34662
33790
  const decrypted = await Buffer.concat([decipher.update(data), decipher.final()]);
34663
33791
  return new Uint8Array(decrypted);
34664
33792
  }
@@ -38276,9 +37404,9 @@ This unreleased fuel-core build may include features and updates not yet support
38276
37404
  utf8ToBytes: () => utf8ToBytes3,
38277
37405
  validateObject: () => validateObject
38278
37406
  });
38279
- var _0n3 = BigInt(0);
38280
- var _1n3 = BigInt(1);
38281
- var _2n3 = BigInt(2);
37407
+ var _0n2 = BigInt(0);
37408
+ var _1n2 = BigInt(1);
37409
+ var _2n2 = BigInt(2);
38282
37410
  function isBytes3(a) {
38283
37411
  return a instanceof Uint8Array || a != null && typeof a === "object" && a.constructor.name === "Uint8Array";
38284
37412
  }
@@ -38397,17 +37525,17 @@ This unreleased fuel-core build may include features and updates not yet support
38397
37525
  }
38398
37526
  function bitLen(n) {
38399
37527
  let len;
38400
- for (len = 0; n > _0n3; n >>= _1n3, len += 1)
37528
+ for (len = 0; n > _0n2; n >>= _1n2, len += 1)
38401
37529
  ;
38402
37530
  return len;
38403
37531
  }
38404
37532
  function bitGet(n, pos) {
38405
- return n >> BigInt(pos) & _1n3;
37533
+ return n >> BigInt(pos) & _1n2;
38406
37534
  }
38407
37535
  var bitSet = (n, pos, value) => {
38408
- return n | (value ? _1n3 : _0n3) << BigInt(pos);
37536
+ return n | (value ? _1n2 : _0n2) << BigInt(pos);
38409
37537
  };
38410
- var bitMask = (n) => (_2n3 << BigInt(n - 1)) - _1n3;
37538
+ var bitMask = (n) => (_2n2 << BigInt(n - 1)) - _1n2;
38411
37539
  var u8n = (data) => new Uint8Array(data);
38412
37540
  var u8fr = (arr) => Uint8Array.from(arr);
38413
37541
  function createHmacDrbg(hashLen, qByteLen, hmacFn) {
@@ -38434,7 +37562,7 @@ This unreleased fuel-core build may include features and updates not yet support
38434
37562
  k = h(u8fr([1]), seed);
38435
37563
  v = h();
38436
37564
  };
38437
- const gen3 = () => {
37565
+ const gen2 = () => {
38438
37566
  if (i++ >= 1e3)
38439
37567
  throw new Error("drbg: tried 1000 values");
38440
37568
  let len = 0;
@@ -38451,7 +37579,7 @@ This unreleased fuel-core build may include features and updates not yet support
38451
37579
  reset();
38452
37580
  reseed(seed);
38453
37581
  let res = void 0;
38454
- while (!(res = pred(gen3())))
37582
+ while (!(res = pred(gen2())))
38455
37583
  reseed();
38456
37584
  reset();
38457
37585
  return res;
@@ -43260,11 +42388,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43260
42388
  name = "NoWitnessAtIndexError";
43261
42389
  };
43262
42390
 
43263
- // src/providers/transaction-request/helpers.ts
43264
- var isRequestInputCoin = (input) => input.type === InputType.Coin;
43265
- var isRequestInputMessage = (input) => input.type === InputType.Message;
43266
- var isRequestInputResource = (input) => isRequestInputCoin(input) || isRequestInputMessage(input);
43267
-
43268
42391
  // src/providers/transaction-request/witness.ts
43269
42392
  var witnessify = (value) => {
43270
42393
  const data = arrayify(value);
@@ -43503,7 +42626,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43503
42626
  * @param coin - Coin resource.
43504
42627
  */
43505
42628
  addCoinInput(coin) {
43506
- const { assetId, owner, amount, id, predicate } = coin;
42629
+ const { assetId, owner, amount } = coin;
43507
42630
  let witnessIndex;
43508
42631
  if (coin.predicate) {
43509
42632
  witnessIndex = 0;
@@ -43514,14 +42637,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43514
42637
  }
43515
42638
  }
43516
42639
  const input = {
43517
- id,
42640
+ ...coin,
43518
42641
  type: InputType.Coin,
43519
42642
  owner: owner.toB256(),
43520
42643
  amount,
43521
42644
  assetId,
43522
42645
  txPointer: "0x00000000000000000000000000000000",
43523
- witnessIndex,
43524
- predicate
42646
+ witnessIndex
43525
42647
  };
43526
42648
  this.pushInput(input);
43527
42649
  this.addChangeOutput(owner, assetId);
@@ -43533,7 +42655,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43533
42655
  * @param message - Message resource.
43534
42656
  */
43535
42657
  addMessageInput(message) {
43536
- const { recipient, sender, amount, predicate, nonce, assetId } = message;
42658
+ const { recipient, sender, amount, assetId } = message;
43537
42659
  let witnessIndex;
43538
42660
  if (message.predicate) {
43539
42661
  witnessIndex = 0;
@@ -43544,13 +42666,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43544
42666
  }
43545
42667
  }
43546
42668
  const input = {
43547
- nonce,
42669
+ ...message,
43548
42670
  type: InputType.Message,
43549
42671
  sender: sender.toB256(),
43550
42672
  recipient: recipient.toB256(),
43551
42673
  amount,
43552
- witnessIndex,
43553
- predicate
42674
+ witnessIndex
43554
42675
  };
43555
42676
  this.pushInput(input);
43556
42677
  this.addChangeOutput(recipient, assetId);
@@ -43734,17 +42855,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43734
42855
  toJSON() {
43735
42856
  return normalizeJSON(this);
43736
42857
  }
43737
- removeWitness(index) {
43738
- this.witnesses.splice(index, 1);
43739
- this.adjustWitnessIndexes(index);
43740
- }
43741
- adjustWitnessIndexes(removedIndex) {
43742
- this.inputs.filter(isRequestInputResource).forEach((input) => {
43743
- if (input.witnessIndex > removedIndex) {
43744
- input.witnessIndex -= 1;
43745
- }
43746
- });
43747
- }
43748
42858
  updatePredicateGasUsed(inputs) {
43749
42859
  this.inputs.forEach((i) => {
43750
42860
  let correspondingInput;
@@ -44886,7 +43996,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44886
43996
  }
44887
43997
 
44888
43998
  // src/providers/transaction-response/transaction-response.ts
44889
- var TransactionResponse2 = class {
43999
+ var TransactionResponse = class {
44890
44000
  /** Transaction ID */
44891
44001
  id;
44892
44002
  /** Current provider */
@@ -44916,7 +44026,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44916
44026
  * @param provider - The provider.
44917
44027
  */
44918
44028
  static async create(id, provider, abis) {
44919
- const response = new TransactionResponse2(id, provider, abis);
44029
+ const response = new TransactionResponse(id, provider, abis);
44920
44030
  await response.fetch();
44921
44031
  return response;
44922
44032
  }
@@ -45310,21 +44420,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45310
44420
  } = await this.operations.getVersion();
45311
44421
  return nodeVersion;
45312
44422
  }
45313
- /**
45314
- * @hidden
45315
- *
45316
- * Returns the network configuration of the connected Fuel node.
45317
- *
45318
- * @returns A promise that resolves to the network configuration object
45319
- */
45320
- async getNetwork() {
45321
- const {
45322
- name,
45323
- consensusParameters: { chainId }
45324
- } = await this.getChain();
45325
- const network = new Network(name, chainId.toNumber());
45326
- return Promise.resolve(network);
45327
- }
45328
44423
  /**
45329
44424
  * Returns the block number.
45330
44425
  *
@@ -45418,14 +44513,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45418
44513
  }
45419
44514
  }
45420
44515
  const transactionId2 = transactionRequest.getTransactionId(this.getChainId());
45421
- const response = new TransactionResponse2(transactionId2, this, abis);
44516
+ const response = new TransactionResponse(transactionId2, this, abis);
45422
44517
  await response.fetch();
45423
44518
  return response;
45424
44519
  }
45425
44520
  const {
45426
44521
  submit: { id: transactionId }
45427
44522
  } = await this.operations.submit({ encodedTransaction });
45428
- return new TransactionResponse2(transactionId, this, abis);
44523
+ return new TransactionResponse(transactionId, this, abis);
45429
44524
  }
45430
44525
  /**
45431
44526
  * Executes a transaction without actually submitting it to the chain.
@@ -46173,7 +45268,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46173
45268
  }
46174
45269
  // eslint-disable-next-line @typescript-eslint/require-await
46175
45270
  async getTransactionResponse(transactionId) {
46176
- return new TransactionResponse2(transactionId, this);
45271
+ return new TransactionResponse(transactionId, this);
46177
45272
  }
46178
45273
  };
46179
45274
  var Provider = _Provider;
@@ -46687,9 +45782,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46687
45782
  };
46688
45783
 
46689
45784
  // ../../node_modules/.pnpm/@noble+curves@1.3.0/node_modules/@noble/curves/esm/abstract/modular.js
46690
- var _0n4 = BigInt(0);
46691
- var _1n4 = BigInt(1);
46692
- var _2n4 = BigInt(2);
45785
+ var _0n3 = BigInt(0);
45786
+ var _1n3 = BigInt(1);
45787
+ var _2n3 = BigInt(2);
46693
45788
  var _3n = BigInt(3);
46694
45789
  var _4n = BigInt(4);
46695
45790
  var _5n = BigInt(5);
@@ -46698,38 +45793,38 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46698
45793
  var _16n = BigInt(16);
46699
45794
  function mod(a, b) {
46700
45795
  const result = a % b;
46701
- return result >= _0n4 ? result : b + result;
45796
+ return result >= _0n3 ? result : b + result;
46702
45797
  }
46703
45798
  function pow(num, power, modulo) {
46704
- if (modulo <= _0n4 || power < _0n4)
45799
+ if (modulo <= _0n3 || power < _0n3)
46705
45800
  throw new Error("Expected power/modulo > 0");
46706
- if (modulo === _1n4)
46707
- return _0n4;
46708
- let res = _1n4;
46709
- while (power > _0n4) {
46710
- if (power & _1n4)
45801
+ if (modulo === _1n3)
45802
+ return _0n3;
45803
+ let res = _1n3;
45804
+ while (power > _0n3) {
45805
+ if (power & _1n3)
46711
45806
  res = res * num % modulo;
46712
45807
  num = num * num % modulo;
46713
- power >>= _1n4;
45808
+ power >>= _1n3;
46714
45809
  }
46715
45810
  return res;
46716
45811
  }
46717
45812
  function pow2(x, power, modulo) {
46718
45813
  let res = x;
46719
- while (power-- > _0n4) {
45814
+ while (power-- > _0n3) {
46720
45815
  res *= res;
46721
45816
  res %= modulo;
46722
45817
  }
46723
45818
  return res;
46724
45819
  }
46725
45820
  function invert(number3, modulo) {
46726
- if (number3 === _0n4 || modulo <= _0n4) {
45821
+ if (number3 === _0n3 || modulo <= _0n3) {
46727
45822
  throw new Error(`invert: expected positive integers, got n=${number3} mod=${modulo}`);
46728
45823
  }
46729
45824
  let a = mod(number3, modulo);
46730
45825
  let b = modulo;
46731
- let x = _0n4, y = _1n4, u = _1n4, v = _0n4;
46732
- while (a !== _0n4) {
45826
+ let x = _0n3, y = _1n3, u = _1n3, v = _0n3;
45827
+ while (a !== _0n3) {
46733
45828
  const q = b / a;
46734
45829
  const r = b % a;
46735
45830
  const m = x - u * q;
@@ -46737,19 +45832,19 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46737
45832
  b = a, a = r, x = u, y = v, u = m, v = n;
46738
45833
  }
46739
45834
  const gcd = b;
46740
- if (gcd !== _1n4)
45835
+ if (gcd !== _1n3)
46741
45836
  throw new Error("invert: does not exist");
46742
45837
  return mod(x, modulo);
46743
45838
  }
46744
45839
  function tonelliShanks(P) {
46745
- const legendreC = (P - _1n4) / _2n4;
45840
+ const legendreC = (P - _1n3) / _2n3;
46746
45841
  let Q, S, Z;
46747
- for (Q = P - _1n4, S = 0; Q % _2n4 === _0n4; Q /= _2n4, S++)
45842
+ for (Q = P - _1n3, S = 0; Q % _2n3 === _0n3; Q /= _2n3, S++)
46748
45843
  ;
46749
- for (Z = _2n4; Z < P && pow(Z, legendreC, P) !== P - _1n4; Z++)
45844
+ for (Z = _2n3; Z < P && pow(Z, legendreC, P) !== P - _1n3; Z++)
46750
45845
  ;
46751
45846
  if (S === 1) {
46752
- const p1div4 = (P + _1n4) / _4n;
45847
+ const p1div4 = (P + _1n3) / _4n;
46753
45848
  return function tonelliFast(Fp2, n) {
46754
45849
  const root = Fp2.pow(n, p1div4);
46755
45850
  if (!Fp2.eql(Fp2.sqr(root), n))
@@ -46757,7 +45852,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46757
45852
  return root;
46758
45853
  };
46759
45854
  }
46760
- const Q1div2 = (Q + _1n4) / _2n4;
45855
+ const Q1div2 = (Q + _1n3) / _2n3;
46761
45856
  return function tonelliSlow(Fp2, n) {
46762
45857
  if (Fp2.pow(n, legendreC) === Fp2.neg(Fp2.ONE))
46763
45858
  throw new Error("Cannot find square root");
@@ -46774,7 +45869,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46774
45869
  break;
46775
45870
  t2 = Fp2.sqr(t2);
46776
45871
  }
46777
- const ge = Fp2.pow(g, _1n4 << BigInt(r - m - 1));
45872
+ const ge = Fp2.pow(g, _1n3 << BigInt(r - m - 1));
46778
45873
  g = Fp2.sqr(ge);
46779
45874
  x = Fp2.mul(x, ge);
46780
45875
  b = Fp2.mul(b, g);
@@ -46785,7 +45880,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46785
45880
  }
46786
45881
  function FpSqrt(P) {
46787
45882
  if (P % _4n === _3n) {
46788
- const p1div4 = (P + _1n4) / _4n;
45883
+ const p1div4 = (P + _1n3) / _4n;
46789
45884
  return function sqrt3mod4(Fp2, n) {
46790
45885
  const root = Fp2.pow(n, p1div4);
46791
45886
  if (!Fp2.eql(Fp2.sqr(root), n))
@@ -46796,10 +45891,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46796
45891
  if (P % _8n === _5n) {
46797
45892
  const c1 = (P - _5n) / _8n;
46798
45893
  return function sqrt5mod8(Fp2, n) {
46799
- const n2 = Fp2.mul(n, _2n4);
45894
+ const n2 = Fp2.mul(n, _2n3);
46800
45895
  const v = Fp2.pow(n2, c1);
46801
45896
  const nv = Fp2.mul(n, v);
46802
- const i = Fp2.mul(Fp2.mul(nv, _2n4), v);
45897
+ const i = Fp2.mul(Fp2.mul(nv, _2n3), v);
46803
45898
  const root = Fp2.mul(nv, Fp2.sub(i, Fp2.ONE));
46804
45899
  if (!Fp2.eql(Fp2.sqr(root), n))
46805
45900
  throw new Error("Cannot find square root");
@@ -46843,19 +45938,19 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46843
45938
  return validateObject(field, opts);
46844
45939
  }
46845
45940
  function FpPow(f2, num, power) {
46846
- if (power < _0n4)
45941
+ if (power < _0n3)
46847
45942
  throw new Error("Expected power > 0");
46848
- if (power === _0n4)
45943
+ if (power === _0n3)
46849
45944
  return f2.ONE;
46850
- if (power === _1n4)
45945
+ if (power === _1n3)
46851
45946
  return num;
46852
45947
  let p = f2.ONE;
46853
45948
  let d = num;
46854
- while (power > _0n4) {
46855
- if (power & _1n4)
45949
+ while (power > _0n3) {
45950
+ if (power & _1n3)
46856
45951
  p = f2.mul(p, d);
46857
45952
  d = f2.sqr(d);
46858
- power >>= _1n4;
45953
+ power >>= _1n3;
46859
45954
  }
46860
45955
  return p;
46861
45956
  }
@@ -46882,7 +45977,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46882
45977
  return { nBitLength: _nBitLength, nByteLength };
46883
45978
  }
46884
45979
  function Field(ORDER, bitLen2, isLE3 = false, redef = {}) {
46885
- if (ORDER <= _0n4)
45980
+ if (ORDER <= _0n3)
46886
45981
  throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);
46887
45982
  const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen2);
46888
45983
  if (BYTES > 2048)
@@ -46893,16 +45988,16 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46893
45988
  BITS,
46894
45989
  BYTES,
46895
45990
  MASK: bitMask(BITS),
46896
- ZERO: _0n4,
46897
- ONE: _1n4,
45991
+ ZERO: _0n3,
45992
+ ONE: _1n3,
46898
45993
  create: (num) => mod(num, ORDER),
46899
45994
  isValid: (num) => {
46900
45995
  if (typeof num !== "bigint")
46901
45996
  throw new Error(`Invalid field element: expected bigint, got ${typeof num}`);
46902
- return _0n4 <= num && num < ORDER;
45997
+ return _0n3 <= num && num < ORDER;
46903
45998
  },
46904
- is0: (num) => num === _0n4,
46905
- isOdd: (num) => (num & _1n4) === _1n4,
45999
+ is0: (num) => num === _0n3,
46000
+ isOdd: (num) => (num & _1n3) === _1n3,
46906
46001
  neg: (num) => mod(-num, ORDER),
46907
46002
  eql: (lhs, rhs) => lhs === rhs,
46908
46003
  sqr: (num) => mod(num * num, ORDER),
@@ -46948,13 +46043,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46948
46043
  if (len < 16 || len < minLen || len > 1024)
46949
46044
  throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);
46950
46045
  const num = isLE3 ? bytesToNumberBE(key) : bytesToNumberLE(key);
46951
- const reduced = mod(num, fieldOrder - _1n4) + _1n4;
46046
+ const reduced = mod(num, fieldOrder - _1n3) + _1n3;
46952
46047
  return isLE3 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
46953
46048
  }
46954
46049
 
46955
46050
  // ../../node_modules/.pnpm/@noble+curves@1.3.0/node_modules/@noble/curves/esm/abstract/curve.js
46956
- var _0n5 = BigInt(0);
46957
- var _1n5 = BigInt(1);
46051
+ var _0n4 = BigInt(0);
46052
+ var _1n4 = BigInt(1);
46958
46053
  function wNAF(c, bits) {
46959
46054
  const constTimeNegate = (condition, item) => {
46960
46055
  const neg = item.negate();
@@ -46971,11 +46066,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46971
46066
  unsafeLadder(elm, n) {
46972
46067
  let p = c.ZERO;
46973
46068
  let d = elm;
46974
- while (n > _0n5) {
46975
- if (n & _1n5)
46069
+ while (n > _0n4) {
46070
+ if (n & _1n4)
46976
46071
  p = p.add(d);
46977
46072
  d = d.double();
46978
- n >>= _1n5;
46073
+ n >>= _1n4;
46979
46074
  }
46980
46075
  return p;
46981
46076
  },
@@ -47025,7 +46120,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47025
46120
  n >>= shiftBy;
47026
46121
  if (wbits > windowSize) {
47027
46122
  wbits -= maxNumber;
47028
- n += _1n5;
46123
+ n += _1n4;
47029
46124
  }
47030
46125
  const offset1 = offset;
47031
46126
  const offset2 = offset + Math.abs(wbits) - 1;
@@ -47149,9 +46244,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47149
46244
  return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;
47150
46245
  }
47151
46246
  };
47152
- var _0n6 = BigInt(0);
47153
- var _1n6 = BigInt(1);
47154
- var _2n5 = BigInt(2);
46247
+ var _0n5 = BigInt(0);
46248
+ var _1n5 = BigInt(1);
46249
+ var _2n4 = BigInt(2);
47155
46250
  var _3n2 = BigInt(3);
47156
46251
  var _4n2 = BigInt(4);
47157
46252
  function weierstrassPoints(opts) {
@@ -47176,7 +46271,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47176
46271
  if (!Fp2.eql(Fp2.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))
47177
46272
  throw new Error("bad generator point: equation left != right");
47178
46273
  function isWithinCurveOrder(num) {
47179
- return typeof num === "bigint" && _0n6 < num && num < CURVE.n;
46274
+ return typeof num === "bigint" && _0n5 < num && num < CURVE.n;
47180
46275
  }
47181
46276
  function assertGE(num) {
47182
46277
  if (!isWithinCurveOrder(num))
@@ -47420,10 +46515,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47420
46515
  */
47421
46516
  multiplyUnsafe(n) {
47422
46517
  const I = Point2.ZERO;
47423
- if (n === _0n6)
46518
+ if (n === _0n5)
47424
46519
  return I;
47425
46520
  assertGE(n);
47426
- if (n === _1n6)
46521
+ if (n === _1n5)
47427
46522
  return this;
47428
46523
  const { endo } = CURVE;
47429
46524
  if (!endo)
@@ -47432,14 +46527,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47432
46527
  let k1p = I;
47433
46528
  let k2p = I;
47434
46529
  let d = this;
47435
- while (k1 > _0n6 || k2 > _0n6) {
47436
- if (k1 & _1n6)
46530
+ while (k1 > _0n5 || k2 > _0n5) {
46531
+ if (k1 & _1n5)
47437
46532
  k1p = k1p.add(d);
47438
- if (k2 & _1n6)
46533
+ if (k2 & _1n5)
47439
46534
  k2p = k2p.add(d);
47440
46535
  d = d.double();
47441
- k1 >>= _1n6;
47442
- k2 >>= _1n6;
46536
+ k1 >>= _1n5;
46537
+ k2 >>= _1n5;
47443
46538
  }
47444
46539
  if (k1neg)
47445
46540
  k1p = k1p.negate();
@@ -47486,7 +46581,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47486
46581
  */
47487
46582
  multiplyAndAddUnsafe(Q, a, b) {
47488
46583
  const G = Point2.BASE;
47489
- const mul = (P, a2) => a2 === _0n6 || a2 === _1n6 || !P.equals(G) ? P.multiplyUnsafe(a2) : P.multiply(a2);
46584
+ const mul = (P, a2) => a2 === _0n5 || a2 === _1n5 || !P.equals(G) ? P.multiplyUnsafe(a2) : P.multiply(a2);
47490
46585
  const sum = mul(this, a).add(mul(Q, b));
47491
46586
  return sum.is0() ? void 0 : sum;
47492
46587
  }
@@ -47509,7 +46604,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47509
46604
  }
47510
46605
  isTorsionFree() {
47511
46606
  const { h: cofactor, isTorsionFree } = CURVE;
47512
- if (cofactor === _1n6)
46607
+ if (cofactor === _1n5)
47513
46608
  return true;
47514
46609
  if (isTorsionFree)
47515
46610
  return isTorsionFree(Point2, this);
@@ -47517,7 +46612,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47517
46612
  }
47518
46613
  clearCofactor() {
47519
46614
  const { h: cofactor, clearCofactor } = CURVE;
47520
- if (cofactor === _1n6)
46615
+ if (cofactor === _1n5)
47521
46616
  return this;
47522
46617
  if (clearCofactor)
47523
46618
  return clearCofactor(Point2, this);
@@ -47562,7 +46657,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47562
46657
  const compressedLen = Fp2.BYTES + 1;
47563
46658
  const uncompressedLen = 2 * Fp2.BYTES + 1;
47564
46659
  function isValidFieldElement(num) {
47565
- return _0n6 < num && num < Fp2.ORDER;
46660
+ return _0n5 < num && num < Fp2.ORDER;
47566
46661
  }
47567
46662
  function modN(a) {
47568
46663
  return mod(a, CURVE_ORDER);
@@ -47592,7 +46687,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47592
46687
  throw new Error("Point is not on curve");
47593
46688
  const y2 = weierstrassEquation(x);
47594
46689
  let y = Fp2.sqrt(y2);
47595
- const isYOdd = (y & _1n6) === _1n6;
46690
+ const isYOdd = (y & _1n5) === _1n5;
47596
46691
  const isHeadOdd = (head & 1) === 1;
47597
46692
  if (isHeadOdd !== isYOdd)
47598
46693
  y = Fp2.neg(y);
@@ -47608,7 +46703,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47608
46703
  });
47609
46704
  const numToNByteStr = (num) => bytesToHex(numberToBytesBE(num, CURVE.nByteLength));
47610
46705
  function isBiggerThanHalfOrder(number3) {
47611
- const HALF = CURVE_ORDER >> _1n6;
46706
+ const HALF = CURVE_ORDER >> _1n5;
47612
46707
  return number3 > HALF;
47613
46708
  }
47614
46709
  function normalizeS(s) {
@@ -47751,7 +46846,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47751
46846
  function int2octets(num) {
47752
46847
  if (typeof num !== "bigint")
47753
46848
  throw new Error("bigint expected");
47754
- if (!(_0n6 <= num && num < ORDER_MASK))
46849
+ if (!(_0n5 <= num && num < ORDER_MASK))
47755
46850
  throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);
47756
46851
  return numberToBytesBE(num, CURVE.nByteLength);
47757
46852
  }
@@ -47781,12 +46876,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47781
46876
  const ik = invN(k);
47782
46877
  const q = Point2.BASE.multiply(k).toAffine();
47783
46878
  const r = modN(q.x);
47784
- if (r === _0n6)
46879
+ if (r === _0n5)
47785
46880
  return;
47786
46881
  const s = modN(ik * modN(m + r * d));
47787
- if (s === _0n6)
46882
+ if (s === _0n5)
47788
46883
  return;
47789
- let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n6);
46884
+ let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n5);
47790
46885
  let normS = s;
47791
46886
  if (lowS && isBiggerThanHalfOrder(s)) {
47792
46887
  normS = normalizeS(s);
@@ -47878,9 +46973,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47878
46973
  // ../../node_modules/.pnpm/@noble+curves@1.3.0/node_modules/@noble/curves/esm/secp256k1.js
47879
46974
  var secp256k1P = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f");
47880
46975
  var secp256k1N = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");
47881
- var _1n7 = BigInt(1);
47882
- var _2n6 = BigInt(2);
47883
- var divNearest = (a, b) => (a + b / _2n6) / b;
46976
+ var _1n6 = BigInt(1);
46977
+ var _2n5 = BigInt(2);
46978
+ var divNearest = (a, b) => (a + b / _2n5) / b;
47884
46979
  function sqrtMod(y) {
47885
46980
  const P = secp256k1P;
47886
46981
  const _3n3 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);
@@ -47889,7 +46984,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47889
46984
  const b3 = b2 * b2 * y % P;
47890
46985
  const b6 = pow2(b3, _3n3, P) * b3 % P;
47891
46986
  const b9 = pow2(b6, _3n3, P) * b3 % P;
47892
- const b11 = pow2(b9, _2n6, P) * b2 % P;
46987
+ const b11 = pow2(b9, _2n5, P) * b2 % P;
47893
46988
  const b22 = pow2(b11, _11n, P) * b11 % P;
47894
46989
  const b44 = pow2(b22, _22n, P) * b22 % P;
47895
46990
  const b88 = pow2(b44, _44n, P) * b44 % P;
@@ -47898,7 +46993,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47898
46993
  const b223 = pow2(b220, _3n3, P) * b3 % P;
47899
46994
  const t1 = pow2(b223, _23n, P) * b22 % P;
47900
46995
  const t2 = pow2(t1, _6n, P) * b2 % P;
47901
- const root = pow2(t2, _2n6, P);
46996
+ const root = pow2(t2, _2n5, P);
47902
46997
  if (!Fp.eql(Fp.sqr(root), y))
47903
46998
  throw new Error("Cannot find square root");
47904
46999
  return root;
@@ -47931,7 +47026,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47931
47026
  splitScalar: (k) => {
47932
47027
  const n = secp256k1N;
47933
47028
  const a1 = BigInt("0x3086d221a7d46bcde86c90e49284eb15");
47934
- const b1 = -_1n7 * BigInt("0xe4437ed6010e88286f547fa90abfe4c3");
47029
+ const b1 = -_1n6 * BigInt("0xe4437ed6010e88286f547fa90abfe4c3");
47935
47030
  const a2 = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8");
47936
47031
  const b2 = a1;
47937
47032
  const POW_2_128 = BigInt("0x100000000000000000000000000000000");
@@ -47952,7 +47047,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
47952
47047
  }
47953
47048
  }
47954
47049
  }, sha256);
47955
- var _0n7 = BigInt(0);
47050
+ var _0n6 = BigInt(0);
47956
47051
  var Point = secp256k1.ProjectivePoint;
47957
47052
 
47958
47053
  // src/signer/signer.ts
@@ -48059,12 +47154,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
48059
47154
  };
48060
47155
 
48061
47156
  // ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/rng.js
48062
- var import_crypto16 = __toESM(__require("crypto"));
47157
+ var import_crypto15 = __toESM(__require("crypto"));
48063
47158
  var rnds8Pool = new Uint8Array(256);
48064
47159
  var poolPtr = rnds8Pool.length;
48065
47160
  function rng() {
48066
47161
  if (poolPtr > rnds8Pool.length - 16) {
48067
- import_crypto16.default.randomFillSync(rnds8Pool);
47162
+ import_crypto15.default.randomFillSync(rnds8Pool);
48068
47163
  poolPtr = 0;
48069
47164
  }
48070
47165
  return rnds8Pool.slice(poolPtr, poolPtr += 16);
@@ -48080,9 +47175,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
48080
47175
  }
48081
47176
 
48082
47177
  // ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/native.js
48083
- var import_crypto17 = __toESM(__require("crypto"));
47178
+ var import_crypto16 = __toESM(__require("crypto"));
48084
47179
  var native_default = {
48085
- randomUUID: import_crypto17.default.randomUUID
47180
+ randomUUID: import_crypto16.default.randomUUID
48086
47181
  };
48087
47182
 
48088
47183
  // ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/v4.js
@@ -51020,21 +50115,16 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51020
50115
  __publicField(Wallet, "fromEncryptedJson", WalletUnlocked.fromEncryptedJson);
51021
50116
 
51022
50117
  // src/test-utils/seedTestWallet.ts
51023
- var seedTestWallet = async (wallet, quantities, utxosAmount = 1) => {
51024
- const toFundAccounts = Array.isArray(wallet) ? wallet : [wallet];
50118
+ var seedTestWallet = async (wallet, quantities) => {
51025
50119
  const genesisWallet = new WalletUnlocked(
51026
50120
  process.env.GENESIS_SECRET || randomBytes22(32),
51027
- // Connect to the same Provider as wallet
51028
- toFundAccounts[0].provider
50121
+ wallet.provider
51029
50122
  );
51030
50123
  const request = new ScriptTransactionRequest();
51031
- quantities.map(coinQuantityfy).forEach(
51032
- ({ amount, assetId }) => toFundAccounts.forEach(({ address }) => {
51033
- for (let i = 0; i < utxosAmount; i++) {
51034
- request.addCoinOutput(address, amount.div(utxosAmount), assetId);
51035
- }
51036
- })
51037
- );
50124
+ quantities.forEach((quantity) => {
50125
+ const { amount, assetId } = coinQuantityfy(quantity);
50126
+ request.addCoinOutput(wallet.address, amount, assetId);
50127
+ });
51038
50128
  const txCost = await genesisWallet.provider.getTransactionCost(request);
51039
50129
  request.gasLimit = txCost.gasUsed;
51040
50130
  request.maxFee = txCost.maxFee;
@@ -51068,7 +50158,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51068
50158
 
51069
50159
  // src/test-utils/launchNode.ts
51070
50160
  var import_child_process = __require("child_process");
51071
- var import_crypto22 = __require("crypto");
50161
+ var import_crypto21 = __require("crypto");
51072
50162
  var import_fs2 = __require("fs");
51073
50163
  var import_os = __toESM(__require("os"));
51074
50164
  var import_path8 = __toESM(__require("path"));
@@ -51140,7 +50230,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51140
50230
  })).toString();
51141
50231
  let snapshotDirToUse;
51142
50232
  const prefix = basePath || import_os.default.tmpdir();
51143
- const suffix = basePath ? "" : (0, import_crypto22.randomUUID)();
50233
+ const suffix = basePath ? "" : (0, import_crypto21.randomUUID)();
51144
50234
  const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix, "snapshotDir");
51145
50235
  if (snapshotDir) {
51146
50236
  snapshotDirToUse = snapshotDir;
@@ -51267,33 +50357,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51267
50357
  };
51268
50358
  return { wallets, stop: cleanup, provider };
51269
50359
  };
51270
-
51271
- // src/test-utils/transactionRequest.ts
51272
- var generateFakeRequestInputCoin = (partial = {}) => ({
51273
- id: hexlify(randomBytes22(UTXO_ID_LEN)),
51274
- type: InputType.Coin,
51275
- owner: getRandomB256(),
51276
- amount: bn(100),
51277
- assetId: ZeroBytes32,
51278
- txPointer: "0x00000000000000000000000000000000",
51279
- witnessIndex: 0,
51280
- ...partial
51281
- });
51282
- var generateFakeRequestInputMessage = (partial = {}) => ({
51283
- nonce: getRandomB256(),
51284
- type: InputType.Message,
51285
- sender: getRandomB256(),
51286
- recipient: getRandomB256(),
51287
- amount: bn(100),
51288
- witnessIndex: 0,
51289
- ...partial
51290
- });
51291
- var generateFakeRequestInputContract = (partial = {}) => ({
51292
- contractId: getRandomB256(),
51293
- type: InputType.Contract,
51294
- txPointer: "0x00000000000000000000000000000000",
51295
- ...partial
51296
- });
51297
50360
  })();
51298
50361
  /*! Bundled license information:
51299
50362