@fuel-ts/account 0.90.0 → 0.92.0

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.

@@ -76,20 +76,20 @@
76
76
  ctor.prototype = new TempCtor();
77
77
  ctor.prototype.constructor = ctor;
78
78
  }
79
- function BN2(number2, base, endian) {
80
- if (BN2.isBN(number2)) {
81
- return number2;
79
+ function BN2(number3, base, endian) {
80
+ if (BN2.isBN(number3)) {
81
+ return number3;
82
82
  }
83
83
  this.negative = 0;
84
84
  this.words = null;
85
85
  this.length = 0;
86
86
  this.red = null;
87
- if (number2 !== null) {
87
+ if (number3 !== null) {
88
88
  if (base === "le" || base === "be") {
89
89
  endian = base;
90
90
  base = 10;
91
91
  }
92
- this._init(number2 || 0, base || 10, endian || "be");
92
+ this._init(number3 || 0, base || 10, endian || "be");
93
93
  }
94
94
  }
95
95
  if (typeof module2 === "object") {
@@ -124,53 +124,53 @@
124
124
  return left;
125
125
  return right;
126
126
  };
127
- BN2.prototype._init = function init(number2, base, endian) {
128
- if (typeof number2 === "number") {
129
- return this._initNumber(number2, base, endian);
127
+ BN2.prototype._init = function init(number3, base, endian) {
128
+ if (typeof number3 === "number") {
129
+ return this._initNumber(number3, base, endian);
130
130
  }
131
- if (typeof number2 === "object") {
132
- return this._initArray(number2, base, endian);
131
+ if (typeof number3 === "object") {
132
+ return this._initArray(number3, base, endian);
133
133
  }
134
134
  if (base === "hex") {
135
135
  base = 16;
136
136
  }
137
137
  assert(base === (base | 0) && base >= 2 && base <= 36);
138
- number2 = number2.toString().replace(/\s+/g, "");
138
+ number3 = number3.toString().replace(/\s+/g, "");
139
139
  var start = 0;
140
- if (number2[0] === "-") {
140
+ if (number3[0] === "-") {
141
141
  start++;
142
142
  this.negative = 1;
143
143
  }
144
- if (start < number2.length) {
144
+ if (start < number3.length) {
145
145
  if (base === 16) {
146
- this._parseHex(number2, start, endian);
146
+ this._parseHex(number3, start, endian);
147
147
  } else {
148
- this._parseBase(number2, base, start);
148
+ this._parseBase(number3, base, start);
149
149
  if (endian === "le") {
150
150
  this._initArray(this.toArray(), base, endian);
151
151
  }
152
152
  }
153
153
  }
154
154
  };
155
- BN2.prototype._initNumber = function _initNumber(number2, base, endian) {
156
- if (number2 < 0) {
155
+ BN2.prototype._initNumber = function _initNumber(number3, base, endian) {
156
+ if (number3 < 0) {
157
157
  this.negative = 1;
158
- number2 = -number2;
158
+ number3 = -number3;
159
159
  }
160
- if (number2 < 67108864) {
161
- this.words = [number2 & 67108863];
160
+ if (number3 < 67108864) {
161
+ this.words = [number3 & 67108863];
162
162
  this.length = 1;
163
- } else if (number2 < 4503599627370496) {
163
+ } else if (number3 < 4503599627370496) {
164
164
  this.words = [
165
- number2 & 67108863,
166
- number2 / 67108864 & 67108863
165
+ number3 & 67108863,
166
+ number3 / 67108864 & 67108863
167
167
  ];
168
168
  this.length = 2;
169
169
  } else {
170
- assert(number2 < 9007199254740992);
170
+ assert(number3 < 9007199254740992);
171
171
  this.words = [
172
- number2 & 67108863,
173
- number2 / 67108864 & 67108863,
172
+ number3 & 67108863,
173
+ number3 / 67108864 & 67108863,
174
174
  1
175
175
  ];
176
176
  this.length = 3;
@@ -179,14 +179,14 @@
179
179
  return;
180
180
  this._initArray(this.toArray(), base, endian);
181
181
  };
182
- BN2.prototype._initArray = function _initArray(number2, base, endian) {
183
- assert(typeof number2.length === "number");
184
- if (number2.length <= 0) {
182
+ BN2.prototype._initArray = function _initArray(number3, base, endian) {
183
+ assert(typeof number3.length === "number");
184
+ if (number3.length <= 0) {
185
185
  this.words = [0];
186
186
  this.length = 1;
187
187
  return this;
188
188
  }
189
- this.length = Math.ceil(number2.length / 3);
189
+ this.length = Math.ceil(number3.length / 3);
190
190
  this.words = new Array(this.length);
191
191
  for (var i = 0; i < this.length; i++) {
192
192
  this.words[i] = 0;
@@ -194,8 +194,8 @@
194
194
  var j, w;
195
195
  var off = 0;
196
196
  if (endian === "be") {
197
- for (i = number2.length - 1, j = 0; i >= 0; i -= 3) {
198
- w = number2[i] | number2[i - 1] << 8 | number2[i - 2] << 16;
197
+ for (i = number3.length - 1, j = 0; i >= 0; i -= 3) {
198
+ w = number3[i] | number3[i - 1] << 8 | number3[i - 2] << 16;
199
199
  this.words[j] |= w << off & 67108863;
200
200
  this.words[j + 1] = w >>> 26 - off & 67108863;
201
201
  off += 24;
@@ -205,8 +205,8 @@
205
205
  }
206
206
  }
207
207
  } else if (endian === "le") {
208
- for (i = 0, j = 0; i < number2.length; i += 3) {
209
- w = number2[i] | number2[i + 1] << 8 | number2[i + 2] << 16;
208
+ for (i = 0, j = 0; i < number3.length; i += 3) {
209
+ w = number3[i] | number3[i + 1] << 8 | number3[i + 2] << 16;
210
210
  this.words[j] |= w << off & 67108863;
211
211
  this.words[j + 1] = w >>> 26 - off & 67108863;
212
212
  off += 24;
@@ -237,8 +237,8 @@
237
237
  }
238
238
  return r;
239
239
  }
240
- BN2.prototype._parseHex = function _parseHex(number2, start, endian) {
241
- this.length = Math.ceil((number2.length - start) / 6);
240
+ BN2.prototype._parseHex = function _parseHex(number3, start, endian) {
241
+ this.length = Math.ceil((number3.length - start) / 6);
242
242
  this.words = new Array(this.length);
243
243
  for (var i = 0; i < this.length; i++) {
244
244
  this.words[i] = 0;
@@ -247,8 +247,8 @@
247
247
  var j = 0;
248
248
  var w;
249
249
  if (endian === "be") {
250
- for (i = number2.length - 1; i >= start; i -= 2) {
251
- w = parseHexByte(number2, start, i) << off;
250
+ for (i = number3.length - 1; i >= start; i -= 2) {
251
+ w = parseHexByte(number3, start, i) << off;
252
252
  this.words[j] |= w & 67108863;
253
253
  if (off >= 18) {
254
254
  off -= 18;
@@ -259,9 +259,9 @@
259
259
  }
260
260
  }
261
261
  } else {
262
- var parseLength = number2.length - start;
263
- for (i = parseLength % 2 === 0 ? start + 1 : start; i < number2.length; i += 2) {
264
- w = parseHexByte(number2, start, i) << off;
262
+ var parseLength = number3.length - start;
263
+ for (i = parseLength % 2 === 0 ? start + 1 : start; i < number3.length; i += 2) {
264
+ w = parseHexByte(number3, start, i) << off;
265
265
  this.words[j] |= w & 67108863;
266
266
  if (off >= 18) {
267
267
  off -= 18;
@@ -293,7 +293,7 @@
293
293
  }
294
294
  return r;
295
295
  }
296
- BN2.prototype._parseBase = function _parseBase(number2, base, start) {
296
+ BN2.prototype._parseBase = function _parseBase(number3, base, start) {
297
297
  this.words = [0];
298
298
  this.length = 1;
299
299
  for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base) {
@@ -301,12 +301,12 @@
301
301
  }
302
302
  limbLen--;
303
303
  limbPow = limbPow / base | 0;
304
- var total = number2.length - start;
304
+ var total = number3.length - start;
305
305
  var mod2 = total % limbLen;
306
306
  var end = Math.min(total, total - mod2) + start;
307
307
  var word = 0;
308
308
  for (var i = start; i < end; i += limbLen) {
309
- word = parseBase(number2, i, i + limbLen, base);
309
+ word = parseBase(number3, i, i + limbLen, base);
310
310
  this.imuln(limbPow);
311
311
  if (this.words[0] + word < 67108864) {
312
312
  this.words[0] += word;
@@ -316,7 +316,7 @@
316
316
  }
317
317
  if (mod2 !== 0) {
318
318
  var pow3 = 1;
319
- word = parseBase(number2, i, number2.length, base);
319
+ word = parseBase(number3, i, number3.length, base);
320
320
  for (i = 0; i < mod2; i++) {
321
321
  pow3 *= base;
322
322
  }
@@ -2642,20 +2642,20 @@
2642
2642
  );
2643
2643
  }
2644
2644
  inherits(K256, MPrime);
2645
- K256.prototype.split = function split2(input, output2) {
2645
+ K256.prototype.split = function split2(input, output3) {
2646
2646
  var mask = 4194303;
2647
2647
  var outLen = Math.min(input.length, 9);
2648
2648
  for (var i = 0; i < outLen; i++) {
2649
- output2.words[i] = input.words[i];
2649
+ output3.words[i] = input.words[i];
2650
2650
  }
2651
- output2.length = outLen;
2651
+ output3.length = outLen;
2652
2652
  if (input.length <= 9) {
2653
2653
  input.words[0] = 0;
2654
2654
  input.length = 1;
2655
2655
  return;
2656
2656
  }
2657
2657
  var prev = input.words[9];
2658
- output2.words[output2.length++] = prev & mask;
2658
+ output3.words[output3.length++] = prev & mask;
2659
2659
  for (i = 10; i < input.length; i++) {
2660
2660
  var next = input.words[i] | 0;
2661
2661
  input.words[i - 10] = (next & mask) << 4 | prev >>> 22;
@@ -3051,8 +3051,8 @@
3051
3051
  }
3052
3052
  return result;
3053
3053
  }
3054
- function toWords(bytes2) {
3055
- return convert2(bytes2, 8, 5, true);
3054
+ function toWords(bytes3) {
3055
+ return convert2(bytes3, 8, 5, true);
3056
3056
  }
3057
3057
  function fromWordsUnsafe(words) {
3058
3058
  const res = convert2(words, 5, 8, false);
@@ -3591,18 +3591,18 @@
3591
3591
  }
3592
3592
  function utf8PercentDecode(str) {
3593
3593
  const input = new Buffer(str);
3594
- const output2 = [];
3594
+ const output3 = [];
3595
3595
  for (let i = 0; i < input.length; ++i) {
3596
3596
  if (input[i] !== 37) {
3597
- output2.push(input[i]);
3597
+ output3.push(input[i]);
3598
3598
  } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) {
3599
- output2.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));
3599
+ output3.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));
3600
3600
  i += 2;
3601
3601
  } else {
3602
- output2.push(input[i]);
3602
+ output3.push(input[i]);
3603
3603
  }
3604
3604
  }
3605
- return new Buffer(output2).toString();
3605
+ return new Buffer(output3).toString();
3606
3606
  }
3607
3607
  function isC0ControlPercentEncode(c) {
3608
3608
  return c <= 31 || c > 126;
@@ -3678,16 +3678,16 @@
3678
3678
  return ipv4;
3679
3679
  }
3680
3680
  function serializeIPv4(address) {
3681
- let output2 = "";
3681
+ let output3 = "";
3682
3682
  let n = address;
3683
3683
  for (let i = 1; i <= 4; ++i) {
3684
- output2 = String(n % 256) + output2;
3684
+ output3 = String(n % 256) + output3;
3685
3685
  if (i !== 4) {
3686
- output2 = "." + output2;
3686
+ output3 = "." + output3;
3687
3687
  }
3688
3688
  n = Math.floor(n / 256);
3689
3689
  }
3690
- return output2;
3690
+ return output3;
3691
3691
  }
3692
3692
  function parseIPv6(input) {
3693
3693
  const address = [0, 0, 0, 0, 0, 0, 0, 0];
@@ -3745,13 +3745,13 @@
3745
3745
  return failure;
3746
3746
  }
3747
3747
  while (isASCIIDigit(input[pointer])) {
3748
- const number2 = parseInt(at(input, pointer));
3748
+ const number3 = parseInt(at(input, pointer));
3749
3749
  if (ipv4Piece === null) {
3750
- ipv4Piece = number2;
3750
+ ipv4Piece = number3;
3751
3751
  } else if (ipv4Piece === 0) {
3752
3752
  return failure;
3753
3753
  } else {
3754
- ipv4Piece = ipv4Piece * 10 + number2;
3754
+ ipv4Piece = ipv4Piece * 10 + number3;
3755
3755
  }
3756
3756
  if (ipv4Piece > 255) {
3757
3757
  return failure;
@@ -3795,7 +3795,7 @@
3795
3795
  return address;
3796
3796
  }
3797
3797
  function serializeIPv6(address) {
3798
- let output2 = "";
3798
+ let output3 = "";
3799
3799
  const seqResult = findLongestZeroSequence(address);
3800
3800
  const compress = seqResult.idx;
3801
3801
  let ignore0 = false;
@@ -3807,16 +3807,16 @@
3807
3807
  }
3808
3808
  if (compress === pieceIndex) {
3809
3809
  const separator = pieceIndex === 0 ? "::" : ":";
3810
- output2 += separator;
3810
+ output3 += separator;
3811
3811
  ignore0 = true;
3812
3812
  continue;
3813
3813
  }
3814
- output2 += address[pieceIndex].toString(16);
3814
+ output3 += address[pieceIndex].toString(16);
3815
3815
  if (pieceIndex !== 7) {
3816
- output2 += ":";
3816
+ output3 += ":";
3817
3817
  }
3818
3818
  }
3819
- return output2;
3819
+ return output3;
3820
3820
  }
3821
3821
  function parseHost(input, isSpecialArg) {
3822
3822
  if (input[0] === "[") {
@@ -3846,12 +3846,12 @@
3846
3846
  if (containsForbiddenHostCodePointExcludingPercent(input)) {
3847
3847
  return failure;
3848
3848
  }
3849
- let output2 = "";
3849
+ let output3 = "";
3850
3850
  const decoded = punycode.ucs2.decode(input);
3851
3851
  for (let i = 0; i < decoded.length; ++i) {
3852
- output2 += percentEncodeChar(decoded[i], isC0ControlPercentEncode);
3852
+ output3 += percentEncodeChar(decoded[i], isC0ControlPercentEncode);
3853
3853
  }
3854
- return output2;
3854
+ return output3;
3855
3855
  }
3856
3856
  function findLongestZeroSequence(arr) {
3857
3857
  let maxIdx = null;
@@ -4476,37 +4476,37 @@
4476
4476
  return true;
4477
4477
  };
4478
4478
  function serializeURL(url, excludeFragment) {
4479
- let output2 = url.scheme + ":";
4479
+ let output3 = url.scheme + ":";
4480
4480
  if (url.host !== null) {
4481
- output2 += "//";
4481
+ output3 += "//";
4482
4482
  if (url.username !== "" || url.password !== "") {
4483
- output2 += url.username;
4483
+ output3 += url.username;
4484
4484
  if (url.password !== "") {
4485
- output2 += ":" + url.password;
4485
+ output3 += ":" + url.password;
4486
4486
  }
4487
- output2 += "@";
4487
+ output3 += "@";
4488
4488
  }
4489
- output2 += serializeHost(url.host);
4489
+ output3 += serializeHost(url.host);
4490
4490
  if (url.port !== null) {
4491
- output2 += ":" + url.port;
4491
+ output3 += ":" + url.port;
4492
4492
  }
4493
4493
  } else if (url.host === null && url.scheme === "file") {
4494
- output2 += "//";
4494
+ output3 += "//";
4495
4495
  }
4496
4496
  if (url.cannotBeABaseURL) {
4497
- output2 += url.path[0];
4497
+ output3 += url.path[0];
4498
4498
  } else {
4499
4499
  for (const string of url.path) {
4500
- output2 += "/" + string;
4500
+ output3 += "/" + string;
4501
4501
  }
4502
4502
  }
4503
4503
  if (url.query !== null) {
4504
- output2 += "?" + url.query;
4504
+ output3 += "?" + url.query;
4505
4505
  }
4506
4506
  if (!excludeFragment && url.fragment !== null) {
4507
- output2 += "#" + url.fragment;
4507
+ output3 += "#" + url.fragment;
4508
4508
  }
4509
- return output2;
4509
+ return output3;
4510
4510
  }
4511
4511
  function serializeOrigin(tuple) {
4512
4512
  let result = tuple.scheme + "://";
@@ -6201,9 +6201,9 @@
6201
6201
  }
6202
6202
  });
6203
6203
 
6204
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/isObjectLike.js
6204
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/isObjectLike.js
6205
6205
  var require_isObjectLike = __commonJS({
6206
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/isObjectLike.js"(exports) {
6206
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/isObjectLike.js"(exports) {
6207
6207
  "use strict";
6208
6208
  Object.defineProperty(exports, "__esModule", {
6209
6209
  value: true
@@ -6215,9 +6215,9 @@
6215
6215
  }
6216
6216
  });
6217
6217
 
6218
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/invariant.js
6218
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/invariant.js
6219
6219
  var require_invariant = __commonJS({
6220
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/invariant.js"(exports) {
6220
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/invariant.js"(exports) {
6221
6221
  "use strict";
6222
6222
  Object.defineProperty(exports, "__esModule", {
6223
6223
  value: true
@@ -6234,9 +6234,9 @@
6234
6234
  }
6235
6235
  });
6236
6236
 
6237
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/location.js
6237
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/location.js
6238
6238
  var require_location = __commonJS({
6239
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/location.js"(exports) {
6239
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/location.js"(exports) {
6240
6240
  "use strict";
6241
6241
  Object.defineProperty(exports, "__esModule", {
6242
6242
  value: true
@@ -6263,9 +6263,9 @@
6263
6263
  }
6264
6264
  });
6265
6265
 
6266
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printLocation.js
6266
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/printLocation.js
6267
6267
  var require_printLocation = __commonJS({
6268
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printLocation.js"(exports) {
6268
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/printLocation.js"(exports) {
6269
6269
  "use strict";
6270
6270
  Object.defineProperty(exports, "__esModule", {
6271
6271
  value: true
@@ -6321,9 +6321,9 @@
6321
6321
  }
6322
6322
  });
6323
6323
 
6324
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/GraphQLError.js
6324
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/error/GraphQLError.js
6325
6325
  var require_GraphQLError = __commonJS({
6326
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/GraphQLError.js"(exports) {
6326
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/error/GraphQLError.js"(exports) {
6327
6327
  "use strict";
6328
6328
  Object.defineProperty(exports, "__esModule", {
6329
6329
  value: true
@@ -6450,19 +6450,19 @@
6450
6450
  return "GraphQLError";
6451
6451
  }
6452
6452
  toString() {
6453
- let output2 = this.message;
6453
+ let output3 = this.message;
6454
6454
  if (this.nodes) {
6455
6455
  for (const node of this.nodes) {
6456
6456
  if (node.loc) {
6457
- output2 += "\n\n" + (0, _printLocation.printLocation)(node.loc);
6457
+ output3 += "\n\n" + (0, _printLocation.printLocation)(node.loc);
6458
6458
  }
6459
6459
  }
6460
6460
  } else if (this.source && this.locations) {
6461
6461
  for (const location of this.locations) {
6462
- output2 += "\n\n" + (0, _printLocation.printSourceLocation)(this.source, location);
6462
+ output3 += "\n\n" + (0, _printLocation.printSourceLocation)(this.source, location);
6463
6463
  }
6464
6464
  }
6465
- return output2;
6465
+ return output3;
6466
6466
  }
6467
6467
  toJSON() {
6468
6468
  const formattedError = {
@@ -6493,9 +6493,9 @@
6493
6493
  }
6494
6494
  });
6495
6495
 
6496
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/syntaxError.js
6496
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/error/syntaxError.js
6497
6497
  var require_syntaxError = __commonJS({
6498
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/syntaxError.js"(exports) {
6498
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/error/syntaxError.js"(exports) {
6499
6499
  "use strict";
6500
6500
  Object.defineProperty(exports, "__esModule", {
6501
6501
  value: true
@@ -6511,9 +6511,9 @@
6511
6511
  }
6512
6512
  });
6513
6513
 
6514
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/ast.js
6514
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/ast.js
6515
6515
  var require_ast = __commonJS({
6516
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/ast.js"(exports) {
6516
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/ast.js"(exports) {
6517
6517
  "use strict";
6518
6518
  Object.defineProperty(exports, "__esModule", {
6519
6519
  value: true
@@ -6695,9 +6695,9 @@
6695
6695
  }
6696
6696
  });
6697
6697
 
6698
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/directiveLocation.js
6698
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/directiveLocation.js
6699
6699
  var require_directiveLocation = __commonJS({
6700
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/directiveLocation.js"(exports) {
6700
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/directiveLocation.js"(exports) {
6701
6701
  "use strict";
6702
6702
  Object.defineProperty(exports, "__esModule", {
6703
6703
  value: true
@@ -6729,9 +6729,9 @@
6729
6729
  }
6730
6730
  });
6731
6731
 
6732
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/kinds.js
6732
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/kinds.js
6733
6733
  var require_kinds = __commonJS({
6734
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/kinds.js"(exports) {
6734
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/kinds.js"(exports) {
6735
6735
  "use strict";
6736
6736
  Object.defineProperty(exports, "__esModule", {
6737
6737
  value: true
@@ -6787,9 +6787,9 @@
6787
6787
  }
6788
6788
  });
6789
6789
 
6790
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/characterClasses.js
6790
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/characterClasses.js
6791
6791
  var require_characterClasses = __commonJS({
6792
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/characterClasses.js"(exports) {
6792
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/characterClasses.js"(exports) {
6793
6793
  "use strict";
6794
6794
  Object.defineProperty(exports, "__esModule", {
6795
6795
  value: true
@@ -6818,9 +6818,9 @@
6818
6818
  }
6819
6819
  });
6820
6820
 
6821
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/blockString.js
6821
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/blockString.js
6822
6822
  var require_blockString = __commonJS({
6823
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/blockString.js"(exports) {
6823
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/blockString.js"(exports) {
6824
6824
  "use strict";
6825
6825
  Object.defineProperty(exports, "__esModule", {
6826
6826
  value: true
@@ -6937,9 +6937,9 @@
6937
6937
  }
6938
6938
  });
6939
6939
 
6940
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/tokenKind.js
6940
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/tokenKind.js
6941
6941
  var require_tokenKind = __commonJS({
6942
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/tokenKind.js"(exports) {
6942
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/tokenKind.js"(exports) {
6943
6943
  "use strict";
6944
6944
  Object.defineProperty(exports, "__esModule", {
6945
6945
  value: true
@@ -6974,9 +6974,9 @@
6974
6974
  }
6975
6975
  });
6976
6976
 
6977
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/lexer.js
6977
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/lexer.js
6978
6978
  var require_lexer = __commonJS({
6979
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/lexer.js"(exports) {
6979
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/lexer.js"(exports) {
6980
6980
  "use strict";
6981
6981
  Object.defineProperty(exports, "__esModule", {
6982
6982
  value: true
@@ -7581,9 +7581,9 @@
7581
7581
  }
7582
7582
  });
7583
7583
 
7584
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/devAssert.js
7584
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/devAssert.js
7585
7585
  var require_devAssert = __commonJS({
7586
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/devAssert.js"(exports) {
7586
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/devAssert.js"(exports) {
7587
7587
  "use strict";
7588
7588
  Object.defineProperty(exports, "__esModule", {
7589
7589
  value: true
@@ -7598,9 +7598,9 @@
7598
7598
  }
7599
7599
  });
7600
7600
 
7601
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/inspect.js
7601
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/inspect.js
7602
7602
  var require_inspect = __commonJS({
7603
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/inspect.js"(exports) {
7603
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/inspect.js"(exports) {
7604
7604
  "use strict";
7605
7605
  Object.defineProperty(exports, "__esModule", {
7606
7606
  value: true
@@ -7690,19 +7690,21 @@
7690
7690
  }
7691
7691
  });
7692
7692
 
7693
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/instanceOf.js
7693
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/instanceOf.js
7694
7694
  var require_instanceOf = __commonJS({
7695
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/instanceOf.js"(exports) {
7695
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/instanceOf.js"(exports) {
7696
7696
  "use strict";
7697
7697
  Object.defineProperty(exports, "__esModule", {
7698
7698
  value: true
7699
7699
  });
7700
7700
  exports.instanceOf = void 0;
7701
7701
  var _inspect = require_inspect();
7702
+ var isProduction2 = globalThis.process && // eslint-disable-next-line no-undef
7703
+ process.env.NODE_ENV === "production";
7702
7704
  var instanceOf4 = (
7703
7705
  /* c8 ignore next 6 */
7704
7706
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
7705
- globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function instanceOf5(value, constructor) {
7707
+ isProduction2 ? function instanceOf5(value, constructor) {
7706
7708
  return value instanceof constructor;
7707
7709
  } : function instanceOf5(value, constructor) {
7708
7710
  if (value instanceof constructor) {
@@ -7738,9 +7740,9 @@ spurious results.`);
7738
7740
  }
7739
7741
  });
7740
7742
 
7741
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/source.js
7743
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/source.js
7742
7744
  var require_source = __commonJS({
7743
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/source.js"(exports) {
7745
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/source.js"(exports) {
7744
7746
  "use strict";
7745
7747
  Object.defineProperty(exports, "__esModule", {
7746
7748
  value: true
@@ -7782,9 +7784,9 @@ spurious results.`);
7782
7784
  }
7783
7785
  });
7784
7786
 
7785
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/parser.js
7787
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/parser.js
7786
7788
  var require_parser = __commonJS({
7787
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/parser.js"(exports) {
7789
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/parser.js"(exports) {
7788
7790
  "use strict";
7789
7791
  Object.defineProperty(exports, "__esModule", {
7790
7792
  value: true
@@ -9091,9 +9093,9 @@ spurious results.`);
9091
9093
  }
9092
9094
  });
9093
9095
 
9094
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printString.js
9096
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/printString.js
9095
9097
  var require_printString = __commonJS({
9096
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printString.js"(exports) {
9098
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/printString.js"(exports) {
9097
9099
  "use strict";
9098
9100
  Object.defineProperty(exports, "__esModule", {
9099
9101
  value: true
@@ -9276,9 +9278,9 @@ spurious results.`);
9276
9278
  }
9277
9279
  });
9278
9280
 
9279
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/visitor.js
9281
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/visitor.js
9280
9282
  var require_visitor = __commonJS({
9281
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/visitor.js"(exports) {
9283
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/visitor.js"(exports) {
9282
9284
  "use strict";
9283
9285
  Object.defineProperty(exports, "__esModule", {
9284
9286
  value: true
@@ -9487,9 +9489,9 @@ spurious results.`);
9487
9489
  }
9488
9490
  });
9489
9491
 
9490
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printer.js
9492
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/printer.js
9491
9493
  var require_printer = __commonJS({
9492
- "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printer.js"(exports) {
9494
+ "../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/printer.js"(exports) {
9493
9495
  "use strict";
9494
9496
  Object.defineProperty(exports, "__esModule", {
9495
9497
  value: true
@@ -18777,7 +18779,7 @@ spurious results.`);
18777
18779
  module.exports = iterate;
18778
18780
  function iterate(list, iterator, state, callback) {
18779
18781
  var key = state["keyedList"] ? state["keyedList"][state.index] : state.index;
18780
- state.jobs[key] = runJob(iterator, key, list[key], function(error, output2) {
18782
+ state.jobs[key] = runJob(iterator, key, list[key], function(error, output3) {
18781
18783
  if (!(key in state.jobs)) {
18782
18784
  return;
18783
18785
  }
@@ -18785,7 +18787,7 @@ spurious results.`);
18785
18787
  if (error) {
18786
18788
  abort(state);
18787
18789
  } else {
18788
- state.results[key] = output2;
18790
+ state.results[key] = output3;
18789
18791
  }
18790
18792
  callback(error, state.results);
18791
18793
  });
@@ -19248,9 +19250,9 @@ spurious results.`);
19248
19250
  }
19249
19251
  });
19250
19252
 
19251
- // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/defaultJsonSerializer.js
19253
+ // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.9.0/node_modules/graphql-request/dist/defaultJsonSerializer.js
19252
19254
  var require_defaultJsonSerializer = __commonJS({
19253
- "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/defaultJsonSerializer.js"(exports) {
19255
+ "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.9.0/node_modules/graphql-request/dist/defaultJsonSerializer.js"(exports) {
19254
19256
  "use strict";
19255
19257
  Object.defineProperty(exports, "__esModule", { value: true });
19256
19258
  exports.defaultJsonSerializer = void 0;
@@ -19261,9 +19263,9 @@ spurious results.`);
19261
19263
  }
19262
19264
  });
19263
19265
 
19264
- // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/createRequestBody.js
19266
+ // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.9.0/node_modules/graphql-request/dist/createRequestBody.js
19265
19267
  var require_createRequestBody = __commonJS({
19266
- "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/createRequestBody.js"(exports) {
19268
+ "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.9.0/node_modules/graphql-request/dist/createRequestBody.js"(exports) {
19267
19269
  "use strict";
19268
19270
  var __importDefault = exports && exports.__importDefault || function(mod2) {
19269
19271
  return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
@@ -19312,9 +19314,9 @@ spurious results.`);
19312
19314
  }
19313
19315
  });
19314
19316
 
19315
- // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/parseArgs.js
19317
+ // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.9.0/node_modules/graphql-request/dist/parseArgs.js
19316
19318
  var require_parseArgs = __commonJS({
19317
- "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/parseArgs.js"(exports) {
19319
+ "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.9.0/node_modules/graphql-request/dist/parseArgs.js"(exports) {
19318
19320
  "use strict";
19319
19321
  Object.defineProperty(exports, "__esModule", { value: true });
19320
19322
  exports.parseBatchRequestsExtendedArgs = exports.parseRawRequestExtendedArgs = exports.parseRequestExtendedArgs = exports.parseBatchRequestArgs = exports.parseRawRequestArgs = exports.parseRequestArgs = void 0;
@@ -19376,9 +19378,9 @@ spurious results.`);
19376
19378
  }
19377
19379
  });
19378
19380
 
19379
- // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/types.js
19381
+ // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.9.0/node_modules/graphql-request/dist/types.js
19380
19382
  var require_types = __commonJS({
19381
- "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/types.js"(exports) {
19383
+ "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.9.0/node_modules/graphql-request/dist/types.js"(exports) {
19382
19384
  "use strict";
19383
19385
  var __extends = exports && exports.__extends || function() {
19384
19386
  var extendStatics = function(d, b) {
@@ -19436,9 +19438,9 @@ spurious results.`);
19436
19438
  }
19437
19439
  });
19438
19440
 
19439
- // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/graphql-ws.js
19441
+ // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.9.0/node_modules/graphql-request/dist/graphql-ws.js
19440
19442
  var require_graphql_ws = __commonJS({
19441
- "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/graphql-ws.js"(exports) {
19443
+ "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.9.0/node_modules/graphql-request/dist/graphql-ws.js"(exports) {
19442
19444
  "use strict";
19443
19445
  var __assign2 = exports && exports.__assign || function() {
19444
19446
  __assign2 = Object.assign || function(t) {
@@ -19808,9 +19810,9 @@ spurious results.`);
19808
19810
  }
19809
19811
  });
19810
19812
 
19811
- // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/index.js
19813
+ // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.9.0/node_modules/graphql-request/dist/index.js
19812
19814
  var require_dist2 = __commonJS({
19813
- "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/index.js"(exports) {
19815
+ "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.9.0/node_modules/graphql-request/dist/index.js"(exports) {
19814
19816
  "use strict";
19815
19817
  var __assign2 = exports && exports.__assign || function() {
19816
19818
  __assign2 = Object.assign || function(t) {
@@ -20547,8 +20549,8 @@ spurious results.`);
20547
20549
  const ret3 = wasm$1.retd(addr, len);
20548
20550
  return Instruction.__wrap(ret3);
20549
20551
  }
20550
- function aloc(bytes2) {
20551
- const ret3 = wasm$1.aloc(bytes2);
20552
+ function aloc(bytes3) {
20553
+ const ret3 = wasm$1.aloc(bytes3);
20552
20554
  return Instruction.__wrap(ret3);
20553
20555
  }
20554
20556
  function mcl(dst_addr, len) {
@@ -21757,9 +21759,9 @@ spurious results.`);
21757
21759
  * Construct the instruction from its parts.
21758
21760
  * @param {RegId} bytes
21759
21761
  */
21760
- constructor(bytes2) {
21761
- _assertClass(bytes2, RegId);
21762
- var ptr0 = bytes2.__destroy_into_raw();
21762
+ constructor(bytes3) {
21763
+ _assertClass(bytes3, RegId);
21764
+ var ptr0 = bytes3.__destroy_into_raw();
21763
21765
  const ret3 = wasm$1.aloc_new_typescript(ptr0);
21764
21766
  this.__wbg_ptr = ret3 >>> 0;
21765
21767
  return this;
@@ -28296,8 +28298,8 @@ spurious results.`);
28296
28298
  }
28297
28299
  }
28298
28300
  }
28299
- const bytes2 = await module2.arrayBuffer();
28300
- return await WebAssembly.instantiate(bytes2, imports);
28301
+ const bytes3 = await module2.arrayBuffer();
28302
+ return await WebAssembly.instantiate(bytes3, imports);
28301
28303
  } else {
28302
28304
  const instance = await WebAssembly.instantiate(module2, imports);
28303
28305
  if (instance instanceof WebAssembly.Instance) {
@@ -30702,12 +30704,12 @@ spurious results.`);
30702
30704
  createDebug.skips = [];
30703
30705
  createDebug.formatters = {};
30704
30706
  function selectColor(namespace) {
30705
- var hash3 = 0;
30707
+ var hash4 = 0;
30706
30708
  for (var i = 0; i < namespace.length; i++) {
30707
- hash3 = (hash3 << 5) - hash3 + namespace.charCodeAt(i);
30708
- hash3 |= 0;
30709
+ hash4 = (hash4 << 5) - hash4 + namespace.charCodeAt(i);
30710
+ hash4 |= 0;
30709
30711
  }
30710
- return createDebug.colors[Math.abs(hash3) % createDebug.colors.length];
30712
+ return createDebug.colors[Math.abs(hash4) % createDebug.colors.length];
30711
30713
  }
30712
30714
  createDebug.selectColor = selectColor;
30713
30715
  function createDebug(namespace) {
@@ -31489,112 +31491,6 @@ spurious results.`);
31489
31491
  }
31490
31492
  });
31491
31493
 
31492
- // ../../node_modules/.pnpm/tree-kill@1.2.2/node_modules/tree-kill/index.js
31493
- var require_tree_kill = __commonJS({
31494
- "../../node_modules/.pnpm/tree-kill@1.2.2/node_modules/tree-kill/index.js"(exports, module) {
31495
- "use strict";
31496
- var childProcess = __require("child_process");
31497
- var spawn2 = childProcess.spawn;
31498
- var exec = childProcess.exec;
31499
- module.exports = function(pid, signal, callback) {
31500
- if (typeof signal === "function" && callback === void 0) {
31501
- callback = signal;
31502
- signal = void 0;
31503
- }
31504
- pid = parseInt(pid);
31505
- if (Number.isNaN(pid)) {
31506
- if (callback) {
31507
- return callback(new Error("pid must be a number"));
31508
- } else {
31509
- throw new Error("pid must be a number");
31510
- }
31511
- }
31512
- var tree = {};
31513
- var pidsToProcess = {};
31514
- tree[pid] = [];
31515
- pidsToProcess[pid] = 1;
31516
- switch (process.platform) {
31517
- case "win32":
31518
- exec("taskkill /pid " + pid + " /T /F", callback);
31519
- break;
31520
- case "darwin":
31521
- buildProcessTree(pid, tree, pidsToProcess, function(parentPid) {
31522
- return spawn2("pgrep", ["-P", parentPid]);
31523
- }, function() {
31524
- killAll(tree, signal, callback);
31525
- });
31526
- break;
31527
- default:
31528
- buildProcessTree(pid, tree, pidsToProcess, function(parentPid) {
31529
- return spawn2("ps", ["-o", "pid", "--no-headers", "--ppid", parentPid]);
31530
- }, function() {
31531
- killAll(tree, signal, callback);
31532
- });
31533
- break;
31534
- }
31535
- };
31536
- function killAll(tree, signal, callback) {
31537
- var killed = {};
31538
- try {
31539
- Object.keys(tree).forEach(function(pid) {
31540
- tree[pid].forEach(function(pidpid) {
31541
- if (!killed[pidpid]) {
31542
- killPid(pidpid, signal);
31543
- killed[pidpid] = 1;
31544
- }
31545
- });
31546
- if (!killed[pid]) {
31547
- killPid(pid, signal);
31548
- killed[pid] = 1;
31549
- }
31550
- });
31551
- } catch (err) {
31552
- if (callback) {
31553
- return callback(err);
31554
- } else {
31555
- throw err;
31556
- }
31557
- }
31558
- if (callback) {
31559
- return callback();
31560
- }
31561
- }
31562
- function killPid(pid, signal) {
31563
- try {
31564
- process.kill(parseInt(pid, 10), signal);
31565
- } catch (err) {
31566
- if (err.code !== "ESRCH")
31567
- throw err;
31568
- }
31569
- }
31570
- function buildProcessTree(parentPid, tree, pidsToProcess, spawnChildProcessesList, cb) {
31571
- var ps = spawnChildProcessesList(parentPid);
31572
- var allData = "";
31573
- ps.stdout.on("data", function(data) {
31574
- var data = data.toString("ascii");
31575
- allData += data;
31576
- });
31577
- var onClose = function(code) {
31578
- delete pidsToProcess[parentPid];
31579
- if (code != 0) {
31580
- if (Object.keys(pidsToProcess).length == 0) {
31581
- cb();
31582
- }
31583
- return;
31584
- }
31585
- allData.match(/\d+/g).forEach(function(pid) {
31586
- pid = parseInt(pid, 10);
31587
- tree[parentPid].push(pid);
31588
- tree[pid] = [];
31589
- pidsToProcess[pid] = 1;
31590
- buildProcessTree(pid, tree, pidsToProcess, spawnChildProcessesList, cb);
31591
- });
31592
- };
31593
- ps.on("close", onClose);
31594
- }
31595
- }
31596
- });
31597
-
31598
31494
  // ../../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.js
31599
31495
  function number(n) {
31600
31496
  if (!Number.isSafeInteger(n) || n < 0)
@@ -31609,11 +31505,11 @@ spurious results.`);
31609
31505
  if (lengths.length > 0 && !lengths.includes(b.length))
31610
31506
  throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);
31611
31507
  }
31612
- function hash(hash3) {
31613
- if (typeof hash3 !== "function" || typeof hash3.create !== "function")
31508
+ function hash(hash4) {
31509
+ if (typeof hash4 !== "function" || typeof hash4.create !== "function")
31614
31510
  throw new Error("Hash should be wrapped by utils.wrapConstructor");
31615
- number(hash3.outputLen);
31616
- number(hash3.blockLen);
31511
+ number(hash4.outputLen);
31512
+ number(hash4.blockLen);
31617
31513
  }
31618
31514
  function exists(instance, checkFinished = true) {
31619
31515
  if (instance.destroyed)
@@ -31629,10 +31525,6 @@ spurious results.`);
31629
31525
  }
31630
31526
  }
31631
31527
 
31632
- // ../../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/cryptoNode.js
31633
- var nc = __toESM(__require("crypto"), 1);
31634
- var crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : void 0;
31635
-
31636
31528
  // ../../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/utils.js
31637
31529
  var u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
31638
31530
  function isBytes2(a) {
@@ -31655,22 +31547,6 @@ spurious results.`);
31655
31547
  throw new Error(`expected Uint8Array, got ${typeof data}`);
31656
31548
  return data;
31657
31549
  }
31658
- function concatBytes(...arrays) {
31659
- let sum = 0;
31660
- for (let i = 0; i < arrays.length; i++) {
31661
- const a = arrays[i];
31662
- if (!isBytes2(a))
31663
- throw new Error("Uint8Array expected");
31664
- sum += a.length;
31665
- }
31666
- const res = new Uint8Array(sum);
31667
- for (let i = 0, pad3 = 0; i < arrays.length; i++) {
31668
- const a = arrays[i];
31669
- res.set(a, pad3);
31670
- pad3 += a.length;
31671
- }
31672
- return res;
31673
- }
31674
31550
  var Hash = class {
31675
31551
  // Safe version that clones internal state
31676
31552
  clone() {
@@ -31700,33 +31576,27 @@ spurious results.`);
31700
31576
  hashC.create = (opts) => hashCons(opts);
31701
31577
  return hashC;
31702
31578
  }
31703
- function randomBytes(bytesLength = 32) {
31704
- if (crypto && typeof crypto.getRandomValues === "function") {
31705
- return crypto.getRandomValues(new Uint8Array(bytesLength));
31706
- }
31707
- throw new Error("crypto.getRandomValues must be defined");
31708
- }
31709
31579
 
31710
31580
  // ../../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/_sha2.js
31711
- function setBigUint64(view, byteOffset, value, isLE2) {
31581
+ function setBigUint64(view, byteOffset, value, isLE3) {
31712
31582
  if (typeof view.setBigUint64 === "function")
31713
- return view.setBigUint64(byteOffset, value, isLE2);
31583
+ return view.setBigUint64(byteOffset, value, isLE3);
31714
31584
  const _32n2 = BigInt(32);
31715
31585
  const _u32_max = BigInt(4294967295);
31716
31586
  const wh = Number(value >> _32n2 & _u32_max);
31717
31587
  const wl = Number(value & _u32_max);
31718
- const h = isLE2 ? 4 : 0;
31719
- const l = isLE2 ? 0 : 4;
31720
- view.setUint32(byteOffset + h, wh, isLE2);
31721
- view.setUint32(byteOffset + l, wl, isLE2);
31588
+ const h = isLE3 ? 4 : 0;
31589
+ const l = isLE3 ? 0 : 4;
31590
+ view.setUint32(byteOffset + h, wh, isLE3);
31591
+ view.setUint32(byteOffset + l, wl, isLE3);
31722
31592
  }
31723
31593
  var SHA2 = class extends Hash {
31724
- constructor(blockLen, outputLen, padOffset, isLE2) {
31594
+ constructor(blockLen, outputLen, padOffset, isLE3) {
31725
31595
  super();
31726
31596
  this.blockLen = blockLen;
31727
31597
  this.outputLen = outputLen;
31728
31598
  this.padOffset = padOffset;
31729
- this.isLE = isLE2;
31599
+ this.isLE = isLE3;
31730
31600
  this.finished = false;
31731
31601
  this.length = 0;
31732
31602
  this.pos = 0;
@@ -31763,7 +31633,7 @@ spurious results.`);
31763
31633
  exists(this);
31764
31634
  output(out, this);
31765
31635
  this.finished = true;
31766
- const { buffer, view, blockLen, isLE: isLE2 } = this;
31636
+ const { buffer, view, blockLen, isLE: isLE3 } = this;
31767
31637
  let { pos } = this;
31768
31638
  buffer[pos++] = 128;
31769
31639
  this.buffer.subarray(pos).fill(0);
@@ -31773,7 +31643,7 @@ spurious results.`);
31773
31643
  }
31774
31644
  for (let i = pos; i < blockLen; i++)
31775
31645
  buffer[i] = 0;
31776
- setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE2);
31646
+ setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE3);
31777
31647
  this.process(view, 0);
31778
31648
  const oview = createView(out);
31779
31649
  const len = this.outputLen;
@@ -31784,7 +31654,7 @@ spurious results.`);
31784
31654
  if (outLen > state.length)
31785
31655
  throw new Error("_sha2: outputLen bigger than state");
31786
31656
  for (let i = 0; i < outLen; i++)
31787
- oview.setUint32(4 * i, state[i], isLE2);
31657
+ oview.setUint32(4 * i, state[i], isLE3);
31788
31658
  }
31789
31659
  digest() {
31790
31660
  const { buffer, outputLen } = this;
@@ -31961,24 +31831,24 @@ spurious results.`);
31961
31831
 
31962
31832
  // ../../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/hmac.js
31963
31833
  var HMAC = class extends Hash {
31964
- constructor(hash3, _key) {
31834
+ constructor(hash4, _key) {
31965
31835
  super();
31966
31836
  this.finished = false;
31967
31837
  this.destroyed = false;
31968
- hash(hash3);
31838
+ hash(hash4);
31969
31839
  const key = toBytes(_key);
31970
- this.iHash = hash3.create();
31840
+ this.iHash = hash4.create();
31971
31841
  if (typeof this.iHash.update !== "function")
31972
31842
  throw new Error("Expected instance of class which extends utils.Hash");
31973
31843
  this.blockLen = this.iHash.blockLen;
31974
31844
  this.outputLen = this.iHash.outputLen;
31975
31845
  const blockLen = this.blockLen;
31976
31846
  const pad3 = new Uint8Array(blockLen);
31977
- pad3.set(key.length > blockLen ? hash3.create().update(key).digest() : key);
31847
+ pad3.set(key.length > blockLen ? hash4.create().update(key).digest() : key);
31978
31848
  for (let i = 0; i < pad3.length; i++)
31979
31849
  pad3[i] ^= 54;
31980
31850
  this.iHash.update(pad3);
31981
- this.oHash = hash3.create();
31851
+ this.oHash = hash4.create();
31982
31852
  for (let i = 0; i < pad3.length; i++)
31983
31853
  pad3[i] ^= 54 ^ 92;
31984
31854
  this.oHash.update(pad3);
@@ -32021,12 +31891,12 @@ spurious results.`);
32021
31891
  this.iHash.destroy();
32022
31892
  }
32023
31893
  };
32024
- var hmac = (hash3, key, message) => new HMAC(hash3, key).update(message).digest();
32025
- hmac.create = (hash3, key) => new HMAC(hash3, key);
31894
+ var hmac = (hash4, key, message) => new HMAC(hash4, key).update(message).digest();
31895
+ hmac.create = (hash4, key) => new HMAC(hash4, key);
32026
31896
 
32027
31897
  // ../../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/pbkdf2.js
32028
- function pbkdf2Init(hash3, _password, _salt, _opts) {
32029
- hash(hash3);
31898
+ function pbkdf2Init(hash4, _password, _salt, _opts) {
31899
+ hash(hash4);
32030
31900
  const opts = checkOpts({ dkLen: 32, asyncTick: 10 }, _opts);
32031
31901
  const { c, dkLen, asyncTick } = opts;
32032
31902
  number(c);
@@ -32037,7 +31907,7 @@ spurious results.`);
32037
31907
  const password = toBytes(_password);
32038
31908
  const salt = toBytes(_salt);
32039
31909
  const DK = new Uint8Array(dkLen);
32040
- const PRF = hmac.create(hash3, password);
31910
+ const PRF = hmac.create(hash4, password);
32041
31911
  const PRFSalt = PRF._cloneInto().update(salt);
32042
31912
  return { c, dkLen, asyncTick, DK, PRF, PRFSalt };
32043
31913
  }
@@ -32049,8 +31919,8 @@ spurious results.`);
32049
31919
  u.fill(0);
32050
31920
  return DK;
32051
31921
  }
32052
- function pbkdf2(hash3, password, salt, opts) {
32053
- const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash3, password, salt, opts);
31922
+ function pbkdf2(hash4, password, salt, opts) {
31923
+ const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash4, password, salt, opts);
32054
31924
  let prfW;
32055
31925
  const arr = new Uint8Array(4);
32056
31926
  const view = createView(arr);
@@ -32377,9 +32247,9 @@ spurious results.`);
32377
32247
  throw new Error("XOF is not possible for this instance");
32378
32248
  return this.writeInto(out);
32379
32249
  }
32380
- xof(bytes2) {
32381
- number(bytes2);
32382
- return this.xofInto(new Uint8Array(bytes2));
32250
+ xof(bytes3) {
32251
+ number(bytes3);
32252
+ return this.xofInto(new Uint8Array(bytes3));
32383
32253
  }
32384
32254
  digestInto(out) {
32385
32255
  output(out, this);
@@ -32427,9 +32297,9 @@ spurious results.`);
32427
32297
  // ../versions/dist/index.mjs
32428
32298
  function getBuiltinVersions() {
32429
32299
  return {
32430
- FORC: "0.60.0",
32431
- FUEL_CORE: "0.30.0",
32432
- FUELS: "0.90.0"
32300
+ FORC: "0.61.2",
32301
+ FUEL_CORE: "0.31.0",
32302
+ FUELS: "0.92.0"
32433
32303
  };
32434
32304
  }
32435
32305
  function parseVersion(version) {
@@ -32552,15 +32422,17 @@ This unreleased fuel-core build may include features and updates not yet support
32552
32422
  ErrorCode2["UNLOCKED_WALLET_REQUIRED"] = "unlocked-wallet-required";
32553
32423
  ErrorCode2["ERROR_BUILDING_BLOCK_EXPLORER_URL"] = "error-building-block-explorer-url";
32554
32424
  ErrorCode2["VITEPRESS_PLUGIN_ERROR"] = "vitepress-plugin-error";
32555
- ErrorCode2["INVALID_MULTICALL"] = "invalid-multicall";
32556
32425
  ErrorCode2["SCRIPT_REVERTED"] = "script-reverted";
32557
32426
  ErrorCode2["SCRIPT_RETURN_INVALID_TYPE"] = "script-return-invalid-type";
32558
32427
  ErrorCode2["STREAM_PARSING_ERROR"] = "stream-parsing-error";
32428
+ ErrorCode2["NODE_LAUNCH_FAILED"] = "node-launch-failed";
32429
+ ErrorCode2["UNKNOWN"] = "unknown";
32559
32430
  return ErrorCode2;
32560
32431
  })(ErrorCode || {});
32561
32432
  var _FuelError = class extends Error {
32562
32433
  VERSIONS = versions;
32563
32434
  metadata;
32435
+ rawError;
32564
32436
  static parse(e) {
32565
32437
  const error = e;
32566
32438
  if (error.code === void 0) {
@@ -32580,15 +32452,16 @@ This unreleased fuel-core build may include features and updates not yet support
32580
32452
  return new _FuelError(error.code, error.message);
32581
32453
  }
32582
32454
  code;
32583
- constructor(code, message, metadata = {}) {
32455
+ constructor(code, message, metadata = {}, rawError = {}) {
32584
32456
  super(message);
32585
32457
  this.code = code;
32586
32458
  this.name = "FuelError";
32587
32459
  this.metadata = metadata;
32460
+ this.rawError = rawError;
32588
32461
  }
32589
32462
  toObject() {
32590
- const { code, name, message, metadata, VERSIONS } = this;
32591
- return { code, name, message, metadata, VERSIONS };
32463
+ const { code, name, message, metadata, VERSIONS, rawError } = this;
32464
+ return { code, name, message, metadata, VERSIONS, rawError };
32592
32465
  }
32593
32466
  };
32594
32467
  var FuelError = _FuelError;
@@ -32630,15 +32503,15 @@ This unreleased fuel-core build may include features and updates not yet support
32630
32503
  // ANCHOR: HELPERS
32631
32504
  // make sure we always include `0x` in hex strings
32632
32505
  toString(base, length) {
32633
- const output2 = super.toString(base, length);
32506
+ const output3 = super.toString(base, length);
32634
32507
  if (base === 16 || base === "hex") {
32635
- return `0x${output2}`;
32508
+ return `0x${output3}`;
32636
32509
  }
32637
- return output2;
32510
+ return output3;
32638
32511
  }
32639
32512
  toHex(bytesPadding) {
32640
- const bytes2 = bytesPadding || 0;
32641
- const bytesLength = bytes2 * 2;
32513
+ const bytes3 = bytesPadding || 0;
32514
+ const bytesLength = bytes3 * 2;
32642
32515
  if (this.isNeg()) {
32643
32516
  throw new FuelError(ErrorCode.CONVERTING_FAILED, "Cannot convert negative value to hex.");
32644
32517
  }
@@ -32749,21 +32622,21 @@ This unreleased fuel-core build may include features and updates not yet support
32749
32622
  // END ANCHOR: OVERRIDES to output our BN type
32750
32623
  // ANCHOR: OVERRIDES to avoid losing references
32751
32624
  caller(v, methodName) {
32752
- const output2 = super[methodName](new BN(v));
32753
- if (BN.isBN(output2)) {
32754
- return new BN(output2.toArray());
32625
+ const output3 = super[methodName](new BN(v));
32626
+ if (BN.isBN(output3)) {
32627
+ return new BN(output3.toArray());
32755
32628
  }
32756
- if (typeof output2 === "boolean") {
32757
- return output2;
32629
+ if (typeof output3 === "boolean") {
32630
+ return output3;
32758
32631
  }
32759
- return output2;
32632
+ return output3;
32760
32633
  }
32761
32634
  clone() {
32762
32635
  return new BN(this.toArray());
32763
32636
  }
32764
32637
  mulTo(num, out) {
32765
- const output2 = new import_bn.default(this.toArray()).mulTo(num, out);
32766
- return new BN(output2.toArray());
32638
+ const output3 = new import_bn.default(this.toArray()).mulTo(num, out);
32639
+ return new BN(output3.toArray());
32767
32640
  }
32768
32641
  egcd(p) {
32769
32642
  const { a, b, gcd } = new import_bn.default(this.toArray()).egcd(p);
@@ -32842,7 +32715,7 @@ This unreleased fuel-core build may include features and updates not yet support
32842
32715
  If you are attempting to transform a hex value, please make sure it is being passed as a string and wrapped in quotes.`;
32843
32716
  throw new FuelError(ErrorCode.INVALID_DATA, message);
32844
32717
  };
32845
- var concatBytes2 = (arrays) => {
32718
+ var concatBytes = (arrays) => {
32846
32719
  const byteArrays = arrays.map((array) => {
32847
32720
  if (array instanceof Uint8Array) {
32848
32721
  return array;
@@ -32858,15 +32731,15 @@ If you are attempting to transform a hex value, please make sure it is being pas
32858
32731
  return concatenated;
32859
32732
  };
32860
32733
  var concat = (arrays) => {
32861
- const bytes2 = arrays.map((v) => arrayify(v));
32862
- return concatBytes2(bytes2);
32734
+ const bytes3 = arrays.map((v) => arrayify(v));
32735
+ return concatBytes(bytes3);
32863
32736
  };
32864
32737
  var HexCharacters = "0123456789abcdef";
32865
32738
  function hexlify(data) {
32866
- const bytes2 = arrayify(data);
32739
+ const bytes3 = arrayify(data);
32867
32740
  let result = "0x";
32868
- for (let i = 0; i < bytes2.length; i++) {
32869
- const v = bytes2[i];
32741
+ for (let i = 0; i < bytes3.length; i++) {
32742
+ const v = bytes3[i];
32870
32743
  result += HexCharacters[(v & 240) >> 4] + HexCharacters[v & 15];
32871
32744
  }
32872
32745
  return result;
@@ -33070,9 +32943,21 @@ If you are attempting to transform a hex value, please make sure it is being pas
33070
32943
  xor: 2,
33071
32944
  xori: 2,
33072
32945
  alocDependentCost: {
33073
- LightOperation: {
33074
- base: "2",
33075
- unitsPerGas: "214"
32946
+ HeavyOperation: {
32947
+ base: 2,
32948
+ gasPerUnit: 0
32949
+ }
32950
+ },
32951
+ cfe: {
32952
+ HeavyOperation: {
32953
+ base: 2,
32954
+ gasPerUnit: 0
32955
+ }
32956
+ },
32957
+ cfeiDependentCost: {
32958
+ HeavyOperation: {
32959
+ base: 2,
32960
+ gasPerUnit: 0
33076
32961
  }
33077
32962
  },
33078
32963
  call: {
@@ -33724,15 +33609,15 @@ If you are attempting to transform a hex value, please make sure it is being pas
33724
33609
  return bn(result);
33725
33610
  }
33726
33611
  function encodeBase58(_value) {
33727
- const bytes2 = arrayify(_value);
33728
- let value = bn(bytes2);
33612
+ const bytes3 = arrayify(_value);
33613
+ let value = bn(bytes3);
33729
33614
  let result = "";
33730
33615
  while (value.gt(BN_0)) {
33731
33616
  result = Alphabet[Number(value.mod(BN_58))] + result;
33732
33617
  value = value.div(BN_58);
33733
33618
  }
33734
- for (let i = 0; i < bytes2.length; i++) {
33735
- if (bytes2[i]) {
33619
+ for (let i = 0; i < bytes3.length; i++) {
33620
+ if (bytes3[i]) {
33736
33621
  break;
33737
33622
  }
33738
33623
  result = Alphabet[0] + result;
@@ -33748,11 +33633,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
33748
33633
  return result;
33749
33634
  }
33750
33635
  function dataSlice(data, start, end) {
33751
- const bytes2 = arrayify(data);
33752
- if (end != null && end > bytes2.length) {
33636
+ const bytes3 = arrayify(data);
33637
+ if (end != null && end > bytes3.length) {
33753
33638
  throw new FuelError(ErrorCode.INVALID_DATA, "cannot slice beyond data bounds");
33754
33639
  }
33755
- return hexlify(bytes2.slice(start == null ? 0 : start, end == null ? bytes2.length : end));
33640
+ return hexlify(bytes3.slice(start == null ? 0 : start, end == null ? bytes3.length : end));
33756
33641
  }
33757
33642
  function toUtf8Bytes(stri, form = true) {
33758
33643
  let str = stri;
@@ -33789,8 +33674,8 @@ If you are attempting to transform a hex value, please make sure it is being pas
33789
33674
  }
33790
33675
  return new Uint8Array(result);
33791
33676
  }
33792
- function onError(reason, offset, bytes2, output2, badCodepoint) {
33793
- console.log(`invalid codepoint at offset ${offset}; ${reason}, bytes: ${bytes2}`);
33677
+ function onError(reason, offset, bytes3, output3, badCodepoint) {
33678
+ console.log(`invalid codepoint at offset ${offset}; ${reason}, bytes: ${bytes3}`);
33794
33679
  return offset;
33795
33680
  }
33796
33681
  function helper(codePoints) {
@@ -33806,11 +33691,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
33806
33691
  }).join("");
33807
33692
  }
33808
33693
  function getUtf8CodePoints(_bytes) {
33809
- const bytes2 = arrayify(_bytes, "bytes");
33694
+ const bytes3 = arrayify(_bytes, "bytes");
33810
33695
  const result = [];
33811
33696
  let i = 0;
33812
- while (i < bytes2.length) {
33813
- const c = bytes2[i++];
33697
+ while (i < bytes3.length) {
33698
+ const c = bytes3[i++];
33814
33699
  if (c >> 7 === 0) {
33815
33700
  result.push(c);
33816
33701
  continue;
@@ -33828,21 +33713,21 @@ If you are attempting to transform a hex value, please make sure it is being pas
33828
33713
  overlongMask = 65535;
33829
33714
  } else {
33830
33715
  if ((c & 192) === 128) {
33831
- i += onError("UNEXPECTED_CONTINUE", i - 1, bytes2, result);
33716
+ i += onError("UNEXPECTED_CONTINUE", i - 1, bytes3, result);
33832
33717
  } else {
33833
- i += onError("BAD_PREFIX", i - 1, bytes2, result);
33718
+ i += onError("BAD_PREFIX", i - 1, bytes3, result);
33834
33719
  }
33835
33720
  continue;
33836
33721
  }
33837
- if (i - 1 + extraLength >= bytes2.length) {
33838
- i += onError("OVERRUN", i - 1, bytes2, result);
33722
+ if (i - 1 + extraLength >= bytes3.length) {
33723
+ i += onError("OVERRUN", i - 1, bytes3, result);
33839
33724
  continue;
33840
33725
  }
33841
33726
  let res = c & (1 << 8 - extraLength - 1) - 1;
33842
33727
  for (let j = 0; j < extraLength; j++) {
33843
- const nextChar = bytes2[i];
33728
+ const nextChar = bytes3[i];
33844
33729
  if ((nextChar & 192) !== 128) {
33845
- i += onError("MISSING_CONTINUE", i, bytes2, result);
33730
+ i += onError("MISSING_CONTINUE", i, bytes3, result);
33846
33731
  res = null;
33847
33732
  break;
33848
33733
  }
@@ -33853,23 +33738,23 @@ If you are attempting to transform a hex value, please make sure it is being pas
33853
33738
  continue;
33854
33739
  }
33855
33740
  if (res > 1114111) {
33856
- i += onError("OUT_OF_RANGE", i - 1 - extraLength, bytes2, result, res);
33741
+ i += onError("OUT_OF_RANGE", i - 1 - extraLength, bytes3, result, res);
33857
33742
  continue;
33858
33743
  }
33859
33744
  if (res >= 55296 && res <= 57343) {
33860
- i += onError("UTF16_SURROGATE", i - 1 - extraLength, bytes2, result, res);
33745
+ i += onError("UTF16_SURROGATE", i - 1 - extraLength, bytes3, result, res);
33861
33746
  continue;
33862
33747
  }
33863
33748
  if (res <= overlongMask) {
33864
- i += onError("OVERLONG", i - 1 - extraLength, bytes2, result, res);
33749
+ i += onError("OVERLONG", i - 1 - extraLength, bytes3, result, res);
33865
33750
  continue;
33866
33751
  }
33867
33752
  result.push(res);
33868
33753
  }
33869
33754
  return result;
33870
33755
  }
33871
- function toUtf8String(bytes2) {
33872
- return helper(getUtf8CodePoints(bytes2));
33756
+ function toUtf8String(bytes3) {
33757
+ return helper(getUtf8CodePoints(bytes3));
33873
33758
  }
33874
33759
 
33875
33760
  // ../../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/ripemd160.js
@@ -33970,11 +33855,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
33970
33855
  var ripemd160 = /* @__PURE__ */ wrapConstructor(() => new RIPEMD160());
33971
33856
 
33972
33857
  // ../crypto/dist/index.mjs
33973
- var import_crypto2 = __toESM(__require("crypto"), 1);
33974
- var import_crypto3 = __require("crypto");
33858
+ var import_crypto = __toESM(__require("crypto"), 1);
33859
+ var import_crypto2 = __require("crypto");
33860
+ var import_crypto3 = __toESM(__require("crypto"), 1);
33975
33861
  var import_crypto4 = __toESM(__require("crypto"), 1);
33976
- var import_crypto5 = __toESM(__require("crypto"), 1);
33977
- var import_crypto6 = __require("crypto");
33862
+ var import_crypto5 = __require("crypto");
33978
33863
  var scrypt2 = (params) => {
33979
33864
  const { password, salt, n, p, r, dklen } = params;
33980
33865
  const derivedKey = scrypt(password, salt, { N: n, r, p, dkLen: dklen });
@@ -34001,7 +33886,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
34001
33886
  Object.freeze(ripemd1602);
34002
33887
  var bufferFromString = (string, encoding = "base64") => Uint8Array.from(Buffer.from(string, encoding));
34003
33888
  var locked2 = false;
34004
- var PBKDF2 = (password, salt, iterations, keylen, algo) => (0, import_crypto3.pbkdf2Sync)(password, salt, iterations, keylen, algo);
33889
+ var PBKDF2 = (password, salt, iterations, keylen, algo) => (0, import_crypto2.pbkdf2Sync)(password, salt, iterations, keylen, algo);
34005
33890
  var pBkdf2 = PBKDF2;
34006
33891
  function pbkdf22(_password, _salt, iterations, keylen, algo) {
34007
33892
  const password = arrayify(_password, "password");
@@ -34019,8 +33904,8 @@ If you are attempting to transform a hex value, please make sure it is being pas
34019
33904
  pBkdf2 = func;
34020
33905
  };
34021
33906
  Object.freeze(pbkdf22);
34022
- var randomBytes2 = (length) => {
34023
- const randomValues = Uint8Array.from(import_crypto4.default.randomBytes(length));
33907
+ var randomBytes = (length) => {
33908
+ const randomValues = Uint8Array.from(import_crypto3.default.randomBytes(length));
34024
33909
  return randomValues;
34025
33910
  };
34026
33911
  var stringFromBuffer = (buffer, encoding = "base64") => Buffer.from(buffer).toString(encoding);
@@ -34031,11 +33916,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
34031
33916
  return arrayify(key);
34032
33917
  };
34033
33918
  var encrypt = async (password, data) => {
34034
- const iv = randomBytes2(16);
34035
- const salt = randomBytes2(32);
33919
+ const iv = randomBytes(16);
33920
+ const salt = randomBytes(32);
34036
33921
  const secret = keyFromPassword(password, salt);
34037
33922
  const dataBuffer = Uint8Array.from(Buffer.from(JSON.stringify(data), "utf-8"));
34038
- const cipher = await import_crypto2.default.createCipheriv(ALGORITHM, secret, iv);
33923
+ const cipher = await import_crypto.default.createCipheriv(ALGORITHM, secret, iv);
34039
33924
  let cipherData = cipher.update(dataBuffer);
34040
33925
  cipherData = Buffer.concat([cipherData, cipher.final()]);
34041
33926
  return {
@@ -34049,7 +33934,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
34049
33934
  const salt = bufferFromString(keystore.salt);
34050
33935
  const secret = keyFromPassword(password, salt);
34051
33936
  const encryptedText = bufferFromString(keystore.data);
34052
- const decipher = await import_crypto2.default.createDecipheriv(ALGORITHM, secret, iv);
33937
+ const decipher = await import_crypto.default.createDecipheriv(ALGORITHM, secret, iv);
34053
33938
  const decrypted = decipher.update(encryptedText);
34054
33939
  const deBuff = Buffer.concat([decrypted, decipher.final()]);
34055
33940
  const decryptedData = Buffer.from(deBuff).toString("utf-8");
@@ -34060,17 +33945,17 @@ If you are attempting to transform a hex value, please make sure it is being pas
34060
33945
  }
34061
33946
  };
34062
33947
  async function encryptJsonWalletData(data, key, iv) {
34063
- const cipher = await import_crypto5.default.createCipheriv("aes-128-ctr", key.subarray(0, 16), iv);
33948
+ const cipher = await import_crypto4.default.createCipheriv("aes-128-ctr", key.subarray(0, 16), iv);
34064
33949
  const encrypted = Buffer.concat([cipher.update(data), cipher.final()]);
34065
33950
  return new Uint8Array(encrypted);
34066
33951
  }
34067
33952
  async function decryptJsonWalletData(data, key, iv) {
34068
- const decipher = import_crypto5.default.createDecipheriv("aes-128-ctr", key.subarray(0, 16), iv);
33953
+ const decipher = import_crypto4.default.createDecipheriv("aes-128-ctr", key.subarray(0, 16), iv);
34069
33954
  const decrypted = await Buffer.concat([decipher.update(data), decipher.final()]);
34070
33955
  return new Uint8Array(decrypted);
34071
33956
  }
34072
33957
  var locked3 = false;
34073
- var COMPUTEHMAC = (algorithm, key, data) => (0, import_crypto6.createHmac)(algorithm, key).update(data).digest();
33958
+ var COMPUTEHMAC = (algorithm, key, data) => (0, import_crypto5.createHmac)(algorithm, key).update(data).digest();
34074
33959
  var computeHMAC = COMPUTEHMAC;
34075
33960
  function computeHmac(algorithm, _key, _data) {
34076
33961
  const key = arrayify(_key, "key");
@@ -34094,7 +33979,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
34094
33979
  decrypt,
34095
33980
  encrypt,
34096
33981
  keyFromPassword,
34097
- randomBytes: randomBytes2,
33982
+ randomBytes,
34098
33983
  scrypt: scrypt2,
34099
33984
  keccak256,
34100
33985
  decryptJsonWalletData,
@@ -34109,7 +33994,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
34109
33994
  decrypt: decrypt2,
34110
33995
  encrypt: encrypt2,
34111
33996
  keyFromPassword: keyFromPassword2,
34112
- randomBytes: randomBytes22,
33997
+ randomBytes: randomBytes2,
34113
33998
  stringFromBuffer: stringFromBuffer2,
34114
33999
  scrypt: scrypt22,
34115
34000
  keccak256: keccak2562,
@@ -34287,15 +34172,15 @@ If you are attempting to transform a hex value, please make sure it is being pas
34287
34172
  if (data.length < this.encodedLength) {
34288
34173
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid b256 data size.`);
34289
34174
  }
34290
- let bytes2 = data.slice(offset, offset + this.encodedLength);
34291
- const decoded = bn(bytes2);
34175
+ let bytes3 = data.slice(offset, offset + this.encodedLength);
34176
+ const decoded = bn(bytes3);
34292
34177
  if (decoded.isZero()) {
34293
- bytes2 = new Uint8Array(32);
34178
+ bytes3 = new Uint8Array(32);
34294
34179
  }
34295
- if (bytes2.length !== this.encodedLength) {
34180
+ if (bytes3.length !== this.encodedLength) {
34296
34181
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid b256 byte data size.`);
34297
34182
  }
34298
- return [toHex(bytes2, 32), offset + 32];
34183
+ return [toHex(bytes3, 32), offset + 32];
34299
34184
  }
34300
34185
  };
34301
34186
  var B512Coder = class extends Coder {
@@ -34318,15 +34203,15 @@ If you are attempting to transform a hex value, please make sure it is being pas
34318
34203
  if (data.length < this.encodedLength) {
34319
34204
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid b512 data size.`);
34320
34205
  }
34321
- let bytes2 = data.slice(offset, offset + this.encodedLength);
34322
- const decoded = bn(bytes2);
34206
+ let bytes3 = data.slice(offset, offset + this.encodedLength);
34207
+ const decoded = bn(bytes3);
34323
34208
  if (decoded.isZero()) {
34324
- bytes2 = new Uint8Array(64);
34209
+ bytes3 = new Uint8Array(64);
34325
34210
  }
34326
- if (bytes2.length !== this.encodedLength) {
34211
+ if (bytes3.length !== this.encodedLength) {
34327
34212
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid b512 byte data size.`);
34328
34213
  }
34329
- return [toHex(bytes2, this.encodedLength), offset + this.encodedLength];
34214
+ return [toHex(bytes3, this.encodedLength), offset + this.encodedLength];
34330
34215
  }
34331
34216
  };
34332
34217
  var encodedLengths = {
@@ -34338,24 +34223,24 @@ If you are attempting to transform a hex value, please make sure it is being pas
34338
34223
  super("bigNumber", baseType, encodedLengths[baseType]);
34339
34224
  }
34340
34225
  encode(value) {
34341
- let bytes2;
34226
+ let bytes3;
34342
34227
  try {
34343
- bytes2 = toBytes2(value, this.encodedLength);
34228
+ bytes3 = toBytes2(value, this.encodedLength);
34344
34229
  } catch (error) {
34345
34230
  throw new FuelError(ErrorCode.ENCODE_ERROR, `Invalid ${this.type}.`);
34346
34231
  }
34347
- return bytes2;
34232
+ return bytes3;
34348
34233
  }
34349
34234
  decode(data, offset) {
34350
34235
  if (data.length < this.encodedLength) {
34351
34236
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid ${this.type} data size.`);
34352
34237
  }
34353
- let bytes2 = data.slice(offset, offset + this.encodedLength);
34354
- bytes2 = bytes2.slice(0, this.encodedLength);
34355
- if (bytes2.length !== this.encodedLength) {
34238
+ let bytes3 = data.slice(offset, offset + this.encodedLength);
34239
+ bytes3 = bytes3.slice(0, this.encodedLength);
34240
+ if (bytes3.length !== this.encodedLength) {
34356
34241
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid ${this.type} byte data size.`);
34357
34242
  }
34358
- return [bn(bytes2), offset + this.encodedLength];
34243
+ return [bn(bytes3), offset + this.encodedLength];
34359
34244
  }
34360
34245
  };
34361
34246
  var BooleanCoder = class extends Coder {
@@ -34378,11 +34263,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
34378
34263
  if (data.length < this.encodedLength) {
34379
34264
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid boolean data size.`);
34380
34265
  }
34381
- const bytes2 = bn(data.slice(offset, offset + this.encodedLength));
34382
- if (bytes2.isZero()) {
34266
+ const bytes3 = bn(data.slice(offset, offset + this.encodedLength));
34267
+ if (bytes3.isZero()) {
34383
34268
  return [false, offset + this.encodedLength];
34384
34269
  }
34385
- if (!bytes2.eq(bn(1))) {
34270
+ if (!bytes3.eq(bn(1))) {
34386
34271
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid boolean value.`);
34387
34272
  }
34388
34273
  return [true, offset + this.encodedLength];
@@ -34393,9 +34278,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
34393
34278
  super("struct", "struct Bytes", WORD_SIZE);
34394
34279
  }
34395
34280
  encode(value) {
34396
- const bytes2 = value instanceof Uint8Array ? value : new Uint8Array(value);
34397
- const lengthBytes = new BigNumberCoder("u64").encode(bytes2.length);
34398
- return new Uint8Array([...lengthBytes, ...bytes2]);
34281
+ const bytes3 = value instanceof Uint8Array ? value : new Uint8Array(value);
34282
+ const lengthBytes = new BigNumberCoder("u64").encode(bytes3.length);
34283
+ return new Uint8Array([...lengthBytes, ...bytes3]);
34399
34284
  }
34400
34285
  decode(data, offset) {
34401
34286
  if (data.length < WORD_SIZE) {
@@ -34522,26 +34407,26 @@ If you are attempting to transform a hex value, please make sure it is being pas
34522
34407
  this.options = options;
34523
34408
  }
34524
34409
  encode(value) {
34525
- let bytes2;
34410
+ let bytes3;
34526
34411
  try {
34527
- bytes2 = toBytes2(value);
34412
+ bytes3 = toBytes2(value);
34528
34413
  } catch (error) {
34529
34414
  throw new FuelError(ErrorCode.ENCODE_ERROR, `Invalid ${this.baseType}.`);
34530
34415
  }
34531
- if (bytes2.length > this.encodedLength) {
34416
+ if (bytes3.length > this.encodedLength) {
34532
34417
  throw new FuelError(ErrorCode.ENCODE_ERROR, `Invalid ${this.baseType}, too many bytes.`);
34533
34418
  }
34534
- return toBytes2(bytes2, this.encodedLength);
34419
+ return toBytes2(bytes3, this.encodedLength);
34535
34420
  }
34536
34421
  decode(data, offset) {
34537
34422
  if (data.length < this.encodedLength) {
34538
34423
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid number data size.`);
34539
34424
  }
34540
- const bytes2 = data.slice(offset, offset + this.encodedLength);
34541
- if (bytes2.length !== this.encodedLength) {
34425
+ const bytes3 = data.slice(offset, offset + this.encodedLength);
34426
+ if (bytes3.length !== this.encodedLength) {
34542
34427
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid number byte data size.`);
34543
34428
  }
34544
- return [toNumber(bytes2), offset + this.encodedLength];
34429
+ return [toNumber(bytes3), offset + this.encodedLength];
34545
34430
  }
34546
34431
  };
34547
34432
  var OptionCoder = class extends EnumCoder {
@@ -34559,9 +34444,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
34559
34444
  const [decoded, newOffset] = super.decode(data, offset);
34560
34445
  return [this.toOption(decoded), newOffset];
34561
34446
  }
34562
- toOption(output2) {
34563
- if (output2 && "Some" in output2) {
34564
- return output2.Some;
34447
+ toOption(output3) {
34448
+ if (output3 && "Some" in output3) {
34449
+ return output3.Some;
34565
34450
  }
34566
34451
  return void 0;
34567
34452
  }
@@ -34575,9 +34460,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
34575
34460
  throw new FuelError(ErrorCode.ENCODE_ERROR, `Expected array value.`);
34576
34461
  }
34577
34462
  const internalCoder = new ArrayCoder(new NumberCoder("u8"), value.length);
34578
- const bytes2 = internalCoder.encode(value);
34579
- const lengthBytes = new BigNumberCoder("u64").encode(bytes2.length);
34580
- return new Uint8Array([...lengthBytes, ...bytes2]);
34463
+ const bytes3 = internalCoder.encode(value);
34464
+ const lengthBytes = new BigNumberCoder("u64").encode(bytes3.length);
34465
+ return new Uint8Array([...lengthBytes, ...bytes3]);
34581
34466
  }
34582
34467
  decode(data, offset) {
34583
34468
  if (data.length < this.encodedLength) {
@@ -34600,9 +34485,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
34600
34485
  super("struct", "struct String", WORD_SIZE);
34601
34486
  }
34602
34487
  encode(value) {
34603
- const bytes2 = toUtf8Bytes(value);
34488
+ const bytes3 = toUtf8Bytes(value);
34604
34489
  const lengthBytes = new BigNumberCoder("u64").encode(value.length);
34605
- return new Uint8Array([...lengthBytes, ...bytes2]);
34490
+ return new Uint8Array([...lengthBytes, ...bytes3]);
34606
34491
  }
34607
34492
  decode(data, offset) {
34608
34493
  if (data.length < this.encodedLength) {
@@ -34624,9 +34509,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
34624
34509
  super("strSlice", "str", WORD_SIZE);
34625
34510
  }
34626
34511
  encode(value) {
34627
- const bytes2 = toUtf8Bytes(value);
34512
+ const bytes3 = toUtf8Bytes(value);
34628
34513
  const lengthBytes = new BigNumberCoder("u64").encode(value.length);
34629
- return new Uint8Array([...lengthBytes, ...bytes2]);
34514
+ return new Uint8Array([...lengthBytes, ...bytes3]);
34630
34515
  }
34631
34516
  decode(data, offset) {
34632
34517
  if (data.length < this.encodedLength) {
@@ -34635,11 +34520,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
34635
34520
  const offsetAndLength = offset + WORD_SIZE;
34636
34521
  const lengthBytes = data.slice(offset, offsetAndLength);
34637
34522
  const length = bn(new BigNumberCoder("u64").decode(lengthBytes, 0)[0]).toNumber();
34638
- const bytes2 = data.slice(offsetAndLength, offsetAndLength + length);
34639
- if (bytes2.length !== length) {
34523
+ const bytes3 = data.slice(offsetAndLength, offsetAndLength + length);
34524
+ if (bytes3.length !== length) {
34640
34525
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid string slice byte data size.`);
34641
34526
  }
34642
- return [toUtf8String(bytes2), offsetAndLength + length];
34527
+ return [toUtf8String(bytes3), offsetAndLength + length];
34643
34528
  }
34644
34529
  };
34645
34530
  __publicField4(StrSliceCoder, "memorySize", 1);
@@ -34657,11 +34542,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
34657
34542
  if (data.length < this.encodedLength) {
34658
34543
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid string data size.`);
34659
34544
  }
34660
- const bytes2 = data.slice(offset, offset + this.encodedLength);
34661
- if (bytes2.length !== this.encodedLength) {
34545
+ const bytes3 = data.slice(offset, offset + this.encodedLength);
34546
+ if (bytes3.length !== this.encodedLength) {
34662
34547
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid string byte data size.`);
34663
34548
  }
34664
- return [toUtf8String(bytes2), offset + this.encodedLength];
34549
+ return [toUtf8String(bytes3), offset + this.encodedLength];
34665
34550
  }
34666
34551
  };
34667
34552
  var StructCoder = class extends Coder {
@@ -34679,7 +34564,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
34679
34564
  this.#hasNestedOption = hasNestedOption(coders);
34680
34565
  }
34681
34566
  encode(value) {
34682
- return concatBytes2(
34567
+ return concatBytes(
34683
34568
  Object.keys(this.coders).map((fieldName) => {
34684
34569
  const fieldCoder = this.coders[fieldName];
34685
34570
  const fieldValue = value[fieldName];
@@ -34721,7 +34606,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
34721
34606
  if (this.coders.length !== value.length) {
34722
34607
  throw new FuelError(ErrorCode.ENCODE_ERROR, `Types/values length mismatch.`);
34723
34608
  }
34724
- return concatBytes2(this.coders.map((coder, i) => coder.encode(value[i])));
34609
+ return concatBytes(this.coders.map((coder, i) => coder.encode(value[i])));
34725
34610
  }
34726
34611
  decode(data, offset) {
34727
34612
  if (!this.#hasNestedOption && data.length < this.encodedLength) {
@@ -34755,9 +34640,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
34755
34640
  if (isUint8Array(value)) {
34756
34641
  return new Uint8Array([...lengthCoder.encode(value.length), ...value]);
34757
34642
  }
34758
- const bytes2 = value.map((v) => this.coder.encode(v));
34643
+ const bytes3 = value.map((v) => this.coder.encode(v));
34759
34644
  const lengthBytes = lengthCoder.encode(value.length);
34760
- return new Uint8Array([...lengthBytes, ...concatBytes2(bytes2)]);
34645
+ return new Uint8Array([...lengthBytes, ...concatBytes(bytes3)]);
34761
34646
  }
34762
34647
  decode(data, offset) {
34763
34648
  if (!this.#hasNestedOption && data.length < this.encodedLength || data.length > MAX_BYTES) {
@@ -35136,10 +35021,10 @@ If you are attempting to transform a hex value, please make sure it is being pas
35136
35021
  throw new FuelError(ErrorCode.ABI_TYPES_AND_VALUES_MISMATCH, errorMsg);
35137
35022
  }
35138
35023
  decodeArguments(data) {
35139
- const bytes2 = arrayify(data);
35024
+ const bytes3 = arrayify(data);
35140
35025
  const nonEmptyInputs = findNonEmptyInputs(this.jsonAbi, this.jsonFn.inputs);
35141
35026
  if (nonEmptyInputs.length === 0) {
35142
- if (bytes2.length === 0) {
35027
+ if (bytes3.length === 0) {
35143
35028
  return void 0;
35144
35029
  }
35145
35030
  throw new FuelError(
@@ -35148,12 +35033,12 @@ If you are attempting to transform a hex value, please make sure it is being pas
35148
35033
  count: {
35149
35034
  types: this.jsonFn.inputs.length,
35150
35035
  nonEmptyInputs: nonEmptyInputs.length,
35151
- values: bytes2.length
35036
+ values: bytes3.length
35152
35037
  },
35153
35038
  value: {
35154
35039
  args: this.jsonFn.inputs,
35155
35040
  nonEmptyInputs,
35156
- values: bytes2
35041
+ values: bytes3
35157
35042
  }
35158
35043
  })}`
35159
35044
  );
@@ -35161,7 +35046,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
35161
35046
  const result = nonEmptyInputs.reduce(
35162
35047
  (obj, input) => {
35163
35048
  const coder = AbiCoder.getCoder(this.jsonAbi, input, { encoding: this.encoding });
35164
- const [decodedValue, decodedValueByteSize] = coder.decode(bytes2, obj.offset);
35049
+ const [decodedValue, decodedValueByteSize] = coder.decode(bytes3, obj.offset);
35165
35050
  return {
35166
35051
  decoded: [...obj.decoded, decodedValue],
35167
35052
  offset: obj.offset + decodedValueByteSize
@@ -35176,11 +35061,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
35176
35061
  if (outputAbiType.type === "()") {
35177
35062
  return [void 0, 0];
35178
35063
  }
35179
- const bytes2 = arrayify(data);
35064
+ const bytes3 = arrayify(data);
35180
35065
  const coder = AbiCoder.getCoder(this.jsonAbi, this.jsonFn.output, {
35181
35066
  encoding: this.encoding
35182
35067
  });
35183
- return coder.decode(bytes2, 0);
35068
+ return coder.decode(bytes3, 0);
35184
35069
  }
35185
35070
  /**
35186
35071
  * Checks if the function is read-only i.e. it only reads from storage, does not write to it.
@@ -35314,9 +35199,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
35314
35199
  }
35315
35200
  return addressLike;
35316
35201
  };
35317
- var getRandomB256 = () => hexlify(randomBytes22(32));
35202
+ var getRandomB256 = () => hexlify(randomBytes2(32));
35318
35203
  var clearFirst12BytesFromB256 = (b256) => {
35319
- let bytes2;
35204
+ let bytes3;
35320
35205
  try {
35321
35206
  if (!isB256(b256)) {
35322
35207
  throw new FuelError(
@@ -35324,15 +35209,15 @@ If you are attempting to transform a hex value, please make sure it is being pas
35324
35209
  `Invalid Bech32 Address: ${b256}.`
35325
35210
  );
35326
35211
  }
35327
- bytes2 = getBytesFromBech32(toBech32(b256));
35328
- bytes2 = hexlify(bytes2.fill(0, 0, 12));
35212
+ bytes3 = getBytesFromBech32(toBech32(b256));
35213
+ bytes3 = hexlify(bytes3.fill(0, 0, 12));
35329
35214
  } catch (error) {
35330
35215
  throw new FuelError(
35331
35216
  FuelError.CODES.PARSE_FAILED,
35332
35217
  `Cannot generate EVM Address B256 from: ${b256}.`
35333
35218
  );
35334
35219
  }
35335
- return bytes2;
35220
+ return bytes3;
35336
35221
  };
35337
35222
  var padFirst12BytesOfEvmAddress = (address) => {
35338
35223
  if (!isEvmAddress(address)) {
@@ -36012,9 +35897,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
36012
35897
  return sha2562(concat(parts));
36013
35898
  }
36014
35899
  static encodeData(messageData) {
36015
- const bytes2 = arrayify(messageData || "0x");
36016
- const dataLength = bytes2.length;
36017
- return new ByteArrayCoder(dataLength).encode(bytes2);
35900
+ const bytes3 = arrayify(messageData || "0x");
35901
+ const dataLength = bytes3.length;
35902
+ return new ByteArrayCoder(dataLength).encode(bytes3);
36018
35903
  }
36019
35904
  encode(value) {
36020
35905
  const parts = [];
@@ -36036,9 +35921,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
36036
35921
  return concat(parts);
36037
35922
  }
36038
35923
  static decodeData(messageData) {
36039
- const bytes2 = arrayify(messageData);
36040
- const dataLength = bytes2.length;
36041
- const [data] = new ByteArrayCoder(dataLength).decode(bytes2, 0);
35924
+ const bytes3 = arrayify(messageData);
35925
+ const dataLength = bytes3.length;
35926
+ const [data] = new ByteArrayCoder(dataLength).decode(bytes3, 0);
36042
35927
  return arrayify(data);
36043
35928
  }
36044
35929
  decode(data, offset) {
@@ -37118,9 +37003,10 @@ If you are attempting to transform a hex value, please make sure it is being pas
37118
37003
  }
37119
37004
  };
37120
37005
 
37121
- // ../../node_modules/.pnpm/@noble+curves@1.3.0/node_modules/@noble/curves/esm/abstract/utils.js
37006
+ // ../../node_modules/.pnpm/@noble+curves@1.4.2/node_modules/@noble/curves/esm/abstract/utils.js
37122
37007
  var utils_exports = {};
37123
37008
  __export(utils_exports, {
37009
+ abytes: () => abytes,
37124
37010
  bitGet: () => bitGet,
37125
37011
  bitLen: () => bitLen,
37126
37012
  bitMask: () => bitMask,
@@ -37128,7 +37014,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37128
37014
  bytesToHex: () => bytesToHex,
37129
37015
  bytesToNumberBE: () => bytesToNumberBE,
37130
37016
  bytesToNumberLE: () => bytesToNumberLE,
37131
- concatBytes: () => concatBytes3,
37017
+ concatBytes: () => concatBytes2,
37132
37018
  createHmacDrbg: () => createHmacDrbg,
37133
37019
  ensureBytes: () => ensureBytes,
37134
37020
  equalBytes: () => equalBytes,
@@ -37142,19 +37028,22 @@ If you are attempting to transform a hex value, please make sure it is being pas
37142
37028
  utf8ToBytes: () => utf8ToBytes2,
37143
37029
  validateObject: () => validateObject
37144
37030
  });
37145
- var _0n2 = BigInt(0);
37146
- var _1n2 = BigInt(1);
37147
- var _2n2 = BigInt(2);
37031
+ var _0n2 = /* @__PURE__ */ BigInt(0);
37032
+ var _1n2 = /* @__PURE__ */ BigInt(1);
37033
+ var _2n2 = /* @__PURE__ */ BigInt(2);
37148
37034
  function isBytes3(a) {
37149
37035
  return a instanceof Uint8Array || a != null && typeof a === "object" && a.constructor.name === "Uint8Array";
37150
37036
  }
37151
- var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
37152
- function bytesToHex(bytes2) {
37153
- if (!isBytes3(bytes2))
37037
+ function abytes(item) {
37038
+ if (!isBytes3(item))
37154
37039
  throw new Error("Uint8Array expected");
37040
+ }
37041
+ var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
37042
+ function bytesToHex(bytes3) {
37043
+ abytes(bytes3);
37155
37044
  let hex = "";
37156
- for (let i = 0; i < bytes2.length; i++) {
37157
- hex += hexes[bytes2[i]];
37045
+ for (let i = 0; i < bytes3.length; i++) {
37046
+ hex += hexes[bytes3[i]];
37158
37047
  }
37159
37048
  return hex;
37160
37049
  }
@@ -37196,13 +37085,12 @@ If you are attempting to transform a hex value, please make sure it is being pas
37196
37085
  }
37197
37086
  return array;
37198
37087
  }
37199
- function bytesToNumberBE(bytes2) {
37200
- return hexToNumber(bytesToHex(bytes2));
37088
+ function bytesToNumberBE(bytes3) {
37089
+ return hexToNumber(bytesToHex(bytes3));
37201
37090
  }
37202
- function bytesToNumberLE(bytes2) {
37203
- if (!isBytes3(bytes2))
37204
- throw new Error("Uint8Array expected");
37205
- return hexToNumber(bytesToHex(Uint8Array.from(bytes2).reverse()));
37091
+ function bytesToNumberLE(bytes3) {
37092
+ abytes(bytes3);
37093
+ return hexToNumber(bytesToHex(Uint8Array.from(bytes3).reverse()));
37206
37094
  }
37207
37095
  function numberToBytesBE(n, len) {
37208
37096
  return hexToBytes(n.toString(16).padStart(len * 2, "0"));
@@ -37231,17 +37119,15 @@ If you are attempting to transform a hex value, please make sure it is being pas
37231
37119
  throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);
37232
37120
  return res;
37233
37121
  }
37234
- function concatBytes3(...arrays) {
37122
+ function concatBytes2(...arrays) {
37235
37123
  let sum = 0;
37236
37124
  for (let i = 0; i < arrays.length; i++) {
37237
37125
  const a = arrays[i];
37238
- if (!isBytes3(a))
37239
- throw new Error("Uint8Array expected");
37126
+ abytes(a);
37240
37127
  sum += a.length;
37241
37128
  }
37242
- let res = new Uint8Array(sum);
37243
- let pad3 = 0;
37244
- for (let i = 0; i < arrays.length; i++) {
37129
+ const res = new Uint8Array(sum);
37130
+ for (let i = 0, pad3 = 0; i < arrays.length; i++) {
37245
37131
  const a = arrays[i];
37246
37132
  res.set(a, pad3);
37247
37133
  pad3 += a.length;
@@ -37270,9 +37156,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
37270
37156
  function bitGet(n, pos) {
37271
37157
  return n >> BigInt(pos) & _1n2;
37272
37158
  }
37273
- var bitSet = (n, pos, value) => {
37159
+ function bitSet(n, pos, value) {
37274
37160
  return n | (value ? _1n2 : _0n2) << BigInt(pos);
37275
- };
37161
+ }
37276
37162
  var bitMask = (n) => (_2n2 << BigInt(n - 1)) - _1n2;
37277
37163
  var u8n = (data) => new Uint8Array(data);
37278
37164
  var u8fr = (arr) => Uint8Array.from(arr);
@@ -37311,7 +37197,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37311
37197
  out.push(sl);
37312
37198
  len += v.length;
37313
37199
  }
37314
- return concatBytes3(...out);
37200
+ return concatBytes2(...out);
37315
37201
  };
37316
37202
  const genUntil = (seed, pred) => {
37317
37203
  reset();
@@ -37371,7 +37257,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37371
37257
  return __assign.apply(this, arguments);
37372
37258
  };
37373
37259
 
37374
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/devAssert.mjs
37260
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/devAssert.mjs
37375
37261
  function devAssert(condition, message) {
37376
37262
  const booleanCondition = Boolean(condition);
37377
37263
  if (!booleanCondition) {
@@ -37379,12 +37265,12 @@ If you are attempting to transform a hex value, please make sure it is being pas
37379
37265
  }
37380
37266
  }
37381
37267
 
37382
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/isObjectLike.mjs
37268
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/isObjectLike.mjs
37383
37269
  function isObjectLike(value) {
37384
37270
  return typeof value == "object" && value !== null;
37385
37271
  }
37386
37272
 
37387
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/invariant.mjs
37273
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/invariant.mjs
37388
37274
  function invariant(condition, message) {
37389
37275
  const booleanCondition = Boolean(condition);
37390
37276
  if (!booleanCondition) {
@@ -37394,7 +37280,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37394
37280
  }
37395
37281
  }
37396
37282
 
37397
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/location.mjs
37283
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/location.mjs
37398
37284
  var LineRegExp = /\r\n|[\n\r]/g;
37399
37285
  function getLocation(source, position) {
37400
37286
  let lastLineStart = 0;
@@ -37413,7 +37299,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37413
37299
  };
37414
37300
  }
37415
37301
 
37416
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printLocation.mjs
37302
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/printLocation.mjs
37417
37303
  function printLocation(location) {
37418
37304
  return printSourceLocation(
37419
37305
  location.source,
@@ -37460,7 +37346,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37460
37346
  return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join("\n");
37461
37347
  }
37462
37348
 
37463
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/GraphQLError.mjs
37349
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/error/GraphQLError.mjs
37464
37350
  function toNormalizedOptions(args) {
37465
37351
  const firstArg = args[0];
37466
37352
  if (firstArg == null || "kind" in firstArg || "length" in firstArg) {
@@ -37575,19 +37461,19 @@ If you are attempting to transform a hex value, please make sure it is being pas
37575
37461
  return "GraphQLError";
37576
37462
  }
37577
37463
  toString() {
37578
- let output2 = this.message;
37464
+ let output3 = this.message;
37579
37465
  if (this.nodes) {
37580
37466
  for (const node of this.nodes) {
37581
37467
  if (node.loc) {
37582
- output2 += "\n\n" + printLocation(node.loc);
37468
+ output3 += "\n\n" + printLocation(node.loc);
37583
37469
  }
37584
37470
  }
37585
37471
  } else if (this.source && this.locations) {
37586
37472
  for (const location of this.locations) {
37587
- output2 += "\n\n" + printSourceLocation(this.source, location);
37473
+ output3 += "\n\n" + printSourceLocation(this.source, location);
37588
37474
  }
37589
37475
  }
37590
- return output2;
37476
+ return output3;
37591
37477
  }
37592
37478
  toJSON() {
37593
37479
  const formattedError = {
@@ -37609,7 +37495,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37609
37495
  return array === void 0 || array.length === 0 ? void 0 : array;
37610
37496
  }
37611
37497
 
37612
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/syntaxError.mjs
37498
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/error/syntaxError.mjs
37613
37499
  function syntaxError(source, position, description) {
37614
37500
  return new GraphQLError(`Syntax Error: ${description}`, {
37615
37501
  source,
@@ -37617,7 +37503,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37617
37503
  });
37618
37504
  }
37619
37505
 
37620
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/ast.mjs
37506
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/ast.mjs
37621
37507
  var Location = class {
37622
37508
  /**
37623
37509
  * The character offset at which this Node begins.
@@ -37787,7 +37673,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37787
37673
  OperationTypeNode2["SUBSCRIPTION"] = "subscription";
37788
37674
  })(OperationTypeNode || (OperationTypeNode = {}));
37789
37675
 
37790
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/directiveLocation.mjs
37676
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/directiveLocation.mjs
37791
37677
  var DirectiveLocation;
37792
37678
  (function(DirectiveLocation2) {
37793
37679
  DirectiveLocation2["QUERY"] = "QUERY";
@@ -37811,7 +37697,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37811
37697
  DirectiveLocation2["INPUT_FIELD_DEFINITION"] = "INPUT_FIELD_DEFINITION";
37812
37698
  })(DirectiveLocation || (DirectiveLocation = {}));
37813
37699
 
37814
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/kinds.mjs
37700
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/kinds.mjs
37815
37701
  var Kind;
37816
37702
  (function(Kind2) {
37817
37703
  Kind2["NAME"] = "Name";
@@ -37859,7 +37745,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37859
37745
  Kind2["INPUT_OBJECT_TYPE_EXTENSION"] = "InputObjectTypeExtension";
37860
37746
  })(Kind || (Kind = {}));
37861
37747
 
37862
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/characterClasses.mjs
37748
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/characterClasses.mjs
37863
37749
  function isWhiteSpace(code) {
37864
37750
  return code === 9 || code === 32;
37865
37751
  }
@@ -37877,7 +37763,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37877
37763
  return isLetter(code) || isDigit(code) || code === 95;
37878
37764
  }
37879
37765
 
37880
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/blockString.mjs
37766
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/blockString.mjs
37881
37767
  function dedentBlockStringLines(lines) {
37882
37768
  var _firstNonEmptyLine2;
37883
37769
  let commonIndent = Number.MAX_SAFE_INTEGER;
@@ -37931,7 +37817,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37931
37817
  return '"""' + result + '"""';
37932
37818
  }
37933
37819
 
37934
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/tokenKind.mjs
37820
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/tokenKind.mjs
37935
37821
  var TokenKind;
37936
37822
  (function(TokenKind2) {
37937
37823
  TokenKind2["SOF"] = "<SOF>";
@@ -37958,7 +37844,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
37958
37844
  TokenKind2["COMMENT"] = "Comment";
37959
37845
  })(TokenKind || (TokenKind = {}));
37960
37846
 
37961
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/lexer.mjs
37847
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/lexer.mjs
37962
37848
  var Lexer = class {
37963
37849
  /**
37964
37850
  * The previously focused non-ignored token.
@@ -38459,7 +38345,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
38459
38345
  );
38460
38346
  }
38461
38347
 
38462
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/inspect.mjs
38348
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/inspect.mjs
38463
38349
  var MAX_ARRAY_LENGTH = 10;
38464
38350
  var MAX_RECURSIVE_DEPTH = 2;
38465
38351
  function inspect(value) {
@@ -38542,11 +38428,13 @@ If you are attempting to transform a hex value, please make sure it is being pas
38542
38428
  return tag;
38543
38429
  }
38544
38430
 
38545
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/instanceOf.mjs
38431
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/instanceOf.mjs
38432
+ var isProduction = globalThis.process && // eslint-disable-next-line no-undef
38433
+ process.env.NODE_ENV === "production";
38546
38434
  var instanceOf = (
38547
38435
  /* c8 ignore next 6 */
38548
38436
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
38549
- globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function instanceOf2(value, constructor) {
38437
+ isProduction ? function instanceOf2(value, constructor) {
38550
38438
  return value instanceof constructor;
38551
38439
  } : function instanceOf3(value, constructor) {
38552
38440
  if (value instanceof constructor) {
@@ -38579,7 +38467,7 @@ spurious results.`);
38579
38467
  }
38580
38468
  );
38581
38469
 
38582
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/source.mjs
38470
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/source.mjs
38583
38471
  var Source = class {
38584
38472
  constructor(body, name = "GraphQL request", locationOffset = {
38585
38473
  line: 1,
@@ -38606,7 +38494,7 @@ spurious results.`);
38606
38494
  return instanceOf(source, Source);
38607
38495
  }
38608
38496
 
38609
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/parser.mjs
38497
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/parser.mjs
38610
38498
  function parse(source, options) {
38611
38499
  const parser = new Parser(source, options);
38612
38500
  return parser.parseDocument();
@@ -39855,7 +39743,7 @@ spurious results.`);
39855
39743
  return isPunctuatorTokenKind(kind) ? `"${kind}"` : kind;
39856
39744
  }
39857
39745
 
39858
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printString.mjs
39746
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/printString.mjs
39859
39747
  function printString(str) {
39860
39748
  return `"${str.replace(escapedRegExp, escapedReplacer)}"`;
39861
39749
  }
@@ -40031,7 +39919,7 @@ spurious results.`);
40031
39919
  "\\u009F"
40032
39920
  ];
40033
39921
 
40034
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/visitor.mjs
39922
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/visitor.mjs
40035
39923
  var BREAK = Object.freeze({});
40036
39924
  function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
40037
39925
  const enterLeaveMap = /* @__PURE__ */ new Map();
@@ -40163,7 +40051,7 @@ spurious results.`);
40163
40051
  };
40164
40052
  }
40165
40053
 
40166
- // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printer.mjs
40054
+ // ../../node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/language/printer.mjs
40167
40055
  function print(ast) {
40168
40056
  return visit(ast, printDocASTReducer);
40169
40057
  }
@@ -40405,7 +40293,7 @@ spurious results.`);
40405
40293
  return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
40406
40294
  }
40407
40295
 
40408
- // ../../node_modules/.pnpm/graphql-tag@2.12.6_graphql@16.8.1/node_modules/graphql-tag/lib/index.js
40296
+ // ../../node_modules/.pnpm/graphql-tag@2.12.6_graphql@16.9.0/node_modules/graphql-tag/lib/index.js
40409
40297
  var docCache = /* @__PURE__ */ new Map();
40410
40298
  var fragmentSourceMap = /* @__PURE__ */ new Map();
40411
40299
  var printFragmentWarnings = true;
@@ -40946,6 +40834,12 @@ ${ReceiptFragmentDoc}`;
40946
40834
  alocDependentCost {
40947
40835
  ...DependentCostFragment
40948
40836
  }
40837
+ cfe {
40838
+ ...DependentCostFragment
40839
+ }
40840
+ cfeiDependentCost {
40841
+ ...DependentCostFragment
40842
+ }
40949
40843
  call {
40950
40844
  ...DependentCostFragment
40951
40845
  }
@@ -41186,6 +41080,9 @@ ${TransactionFragmentDoc}`;
41186
41080
  var GetBlocksDocument = lib_default2`
41187
41081
  query getBlocks($after: String, $before: String, $first: Int, $last: Int) {
41188
41082
  blocks(after: $after, before: $before, first: $first, last: $last) {
41083
+ pageInfo {
41084
+ ...pageInfoFragment
41085
+ }
41189
41086
  edges {
41190
41087
  node {
41191
41088
  ...blockFragment
@@ -41193,7 +41090,8 @@ ${TransactionFragmentDoc}`;
41193
41090
  }
41194
41091
  }
41195
41092
  }
41196
- ${BlockFragmentDoc}`;
41093
+ ${PageInfoFragmentDoc}
41094
+ ${BlockFragmentDoc}`;
41197
41095
  var GetCoinDocument = lib_default2`
41198
41096
  query getCoin($coinId: UtxoId!) {
41199
41097
  coin(utxoId: $coinId) {
@@ -41210,6 +41108,9 @@ ${TransactionFragmentDoc}`;
41210
41108
  first: $first
41211
41109
  last: $last
41212
41110
  ) {
41111
+ pageInfo {
41112
+ ...pageInfoFragment
41113
+ }
41213
41114
  edges {
41214
41115
  node {
41215
41116
  ...coinFragment
@@ -41217,7 +41118,8 @@ ${TransactionFragmentDoc}`;
41217
41118
  }
41218
41119
  }
41219
41120
  }
41220
- ${CoinFragmentDoc}`;
41121
+ ${PageInfoFragmentDoc}
41122
+ ${CoinFragmentDoc}`;
41221
41123
  var GetCoinsToSpendDocument = lib_default2`
41222
41124
  query getCoinsToSpend($owner: Address!, $queryPerAsset: [SpendQueryElementInput!]!, $excludedIds: ExcludeInput) {
41223
41125
  coinsToSpend(
@@ -41276,6 +41178,9 @@ ${MessageCoinFragmentDoc}`;
41276
41178
  first: $first
41277
41179
  last: $last
41278
41180
  ) {
41181
+ pageInfo {
41182
+ ...pageInfoFragment
41183
+ }
41279
41184
  edges {
41280
41185
  node {
41281
41186
  ...balanceFragment
@@ -41283,7 +41188,8 @@ ${MessageCoinFragmentDoc}`;
41283
41188
  }
41284
41189
  }
41285
41190
  }
41286
- ${BalanceFragmentDoc}`;
41191
+ ${PageInfoFragmentDoc}
41192
+ ${BalanceFragmentDoc}`;
41287
41193
  var GetMessagesDocument = lib_default2`
41288
41194
  query getMessages($owner: Address!, $after: String, $before: String, $first: Int, $last: Int) {
41289
41195
  messages(
@@ -41293,6 +41199,9 @@ ${MessageCoinFragmentDoc}`;
41293
41199
  first: $first
41294
41200
  last: $last
41295
41201
  ) {
41202
+ pageInfo {
41203
+ ...pageInfoFragment
41204
+ }
41296
41205
  edges {
41297
41206
  node {
41298
41207
  ...messageFragment
@@ -41300,7 +41209,8 @@ ${MessageCoinFragmentDoc}`;
41300
41209
  }
41301
41210
  }
41302
41211
  }
41303
- ${MessageFragmentDoc}`;
41212
+ ${PageInfoFragmentDoc}
41213
+ ${MessageFragmentDoc}`;
41304
41214
  var GetMessageProofDocument = lib_default2`
41305
41215
  query getMessageProof($transactionId: TransactionId!, $nonce: Nonce!, $commitBlockId: BlockId, $commitBlockHeight: U32) {
41306
41216
  messageProof(
@@ -42114,7 +42024,7 @@ ${MessageCoinFragmentDoc}`;
42114
42024
  }
42115
42025
 
42116
42026
  // src/providers/utils/extract-tx-error.ts
42117
- var assemblePanicError = (statusReason) => {
42027
+ var assemblePanicError = (statusReason, metadata) => {
42118
42028
  let errorMessage = `The transaction reverted with reason: "${statusReason}".`;
42119
42029
  if (PANIC_REASONS.includes(statusReason)) {
42120
42030
  errorMessage = `${errorMessage}
@@ -42123,10 +42033,13 @@ You can read more about this error at:
42123
42033
 
42124
42034
  ${PANIC_DOC_URL}#variant.${statusReason}`;
42125
42035
  }
42126
- return { errorMessage, reason: statusReason };
42036
+ return new FuelError(ErrorCode.SCRIPT_REVERTED, errorMessage, {
42037
+ ...metadata,
42038
+ reason: statusReason
42039
+ });
42127
42040
  };
42128
42041
  var stringify = (obj) => JSON.stringify(obj, null, 2);
42129
- var assembleRevertError = (receipts, logs) => {
42042
+ var assembleRevertError = (receipts, logs, metadata) => {
42130
42043
  let errorMessage = "The transaction reverted with an unknown reason.";
42131
42044
  const revertReceipt = receipts.find(({ type: type3 }) => type3 === ReceiptType.Revert);
42132
42045
  let reason = "";
@@ -42159,25 +42072,36 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
42159
42072
  errorMessage = `The transaction reverted because it's missing an "OutputChange".`;
42160
42073
  break;
42161
42074
  default:
42162
- reason = "unknown";
42163
- errorMessage = `The transaction reverted with an unknown reason: ${revertReceipt.val}`;
42075
+ throw new FuelError(
42076
+ ErrorCode.UNKNOWN,
42077
+ `The transaction reverted with an unknown reason: ${revertReceipt.val}`,
42078
+ {
42079
+ ...metadata,
42080
+ reason: "unknown"
42081
+ }
42082
+ );
42164
42083
  }
42165
42084
  }
42166
- return { errorMessage, reason };
42085
+ return new FuelError(ErrorCode.SCRIPT_REVERTED, errorMessage, {
42086
+ ...metadata,
42087
+ reason
42088
+ });
42167
42089
  };
42168
42090
  var extractTxError = (params) => {
42169
42091
  const { receipts, statusReason, logs } = params;
42170
42092
  const isPanic = receipts.some(({ type: type3 }) => type3 === ReceiptType.Panic);
42171
42093
  const isRevert = receipts.some(({ type: type3 }) => type3 === ReceiptType.Revert);
42172
- const { errorMessage, reason } = isPanic ? assemblePanicError(statusReason) : assembleRevertError(receipts, logs);
42173
42094
  const metadata = {
42174
42095
  logs,
42175
42096
  receipts,
42176
42097
  panic: isPanic,
42177
42098
  revert: isRevert,
42178
- reason
42099
+ reason: ""
42179
42100
  };
42180
- return new FuelError(ErrorCode.SCRIPT_REVERTED, errorMessage, metadata);
42101
+ if (isPanic) {
42102
+ return assemblePanicError(statusReason, metadata);
42103
+ }
42104
+ return assembleRevertError(receipts, logs, metadata);
42181
42105
  };
42182
42106
 
42183
42107
  // src/providers/transaction-request/errors.ts
@@ -42333,8 +42257,8 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
42333
42257
  *
42334
42258
  * Pushes an output to the list without any side effects and returns the index
42335
42259
  */
42336
- pushOutput(output2) {
42337
- this.outputs.push(output2);
42260
+ pushOutput(output3) {
42261
+ this.outputs.push(output3);
42338
42262
  return this.outputs.length - 1;
42339
42263
  }
42340
42264
  /**
@@ -42418,7 +42342,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
42418
42342
  */
42419
42343
  getCoinOutputs() {
42420
42344
  return this.outputs.filter(
42421
- (output2) => output2.type === OutputType.Coin
42345
+ (output3) => output3.type === OutputType.Coin
42422
42346
  );
42423
42347
  }
42424
42348
  /**
@@ -42428,7 +42352,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
42428
42352
  */
42429
42353
  getChangeOutputs() {
42430
42354
  return this.outputs.filter(
42431
- (output2) => output2.type === OutputType.Change
42355
+ (output3) => output3.type === OutputType.Change
42432
42356
  );
42433
42357
  }
42434
42358
  /**
@@ -42578,7 +42502,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
42578
42502
  */
42579
42503
  addChangeOutput(to, assetId) {
42580
42504
  const changeOutput = this.getChangeOutputs().find(
42581
- (output2) => hexlify(output2.assetId) === assetId
42505
+ (output3) => hexlify(output3.assetId) === assetId
42582
42506
  );
42583
42507
  if (!changeOutput) {
42584
42508
  this.pushOutput({
@@ -42656,12 +42580,12 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
42656
42580
  usedQuantity = bn("1000000000000000000");
42657
42581
  }
42658
42582
  if (assetInput && "assetId" in assetInput) {
42659
- assetInput.id = hexlify(randomBytes22(UTXO_ID_LEN));
42583
+ assetInput.id = hexlify(randomBytes2(UTXO_ID_LEN));
42660
42584
  assetInput.amount = usedQuantity;
42661
42585
  } else {
42662
42586
  this.addResources([
42663
42587
  {
42664
- id: hexlify(randomBytes22(UTXO_ID_LEN)),
42588
+ id: hexlify(randomBytes2(UTXO_ID_LEN)),
42665
42589
  amount: usedQuantity,
42666
42590
  assetId,
42667
42591
  owner: resourcesOwner || Address.fromRandom(),
@@ -42757,8 +42681,8 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
42757
42681
  return inputClone;
42758
42682
  }
42759
42683
  });
42760
- transaction.outputs = transaction.outputs.map((output2) => {
42761
- const outputClone = clone_default(output2);
42684
+ transaction.outputs = transaction.outputs.map((output3) => {
42685
+ const outputClone = clone_default(output3);
42762
42686
  switch (outputClone.type) {
42763
42687
  case OutputType.Contract: {
42764
42688
  outputClone.balanceRoot = ZeroBytes32;
@@ -42860,7 +42784,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
42860
42784
  */
42861
42785
  getContractCreatedOutputs() {
42862
42786
  return this.outputs.filter(
42863
- (output2) => output2.type === OutputType.ContractCreated
42787
+ (output3) => output3.type === OutputType.ContractCreated
42864
42788
  );
42865
42789
  }
42866
42790
  /**
@@ -42986,7 +42910,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
42986
42910
  */
42987
42911
  getContractOutputs() {
42988
42912
  return this.outputs.filter(
42989
- (output2) => output2.type === OutputType.Contract
42913
+ (output3) => output3.type === OutputType.Contract
42990
42914
  );
42991
42915
  }
42992
42916
  /**
@@ -42996,7 +42920,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
42996
42920
  */
42997
42921
  getVariableOutputs() {
42998
42922
  return this.outputs.filter(
42999
- (output2) => output2.type === OutputType.Variable
42923
+ (output3) => output3.type === OutputType.Variable
43000
42924
  );
43001
42925
  }
43002
42926
  /**
@@ -43419,8 +43343,8 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
43419
43343
  }) {
43420
43344
  const contractCallReceipts = getReceiptsCall(receipts);
43421
43345
  const contractOutputs = getOutputsContract(outputs);
43422
- const contractCallOperations = contractOutputs.reduce((prevOutputCallOps, output2) => {
43423
- const contractInput = getInputContractFromIndex(inputs, output2.inputIndex);
43346
+ const contractCallOperations = contractOutputs.reduce((prevOutputCallOps, output3) => {
43347
+ const contractInput = getInputContractFromIndex(inputs, output3.inputIndex);
43424
43348
  if (contractInput) {
43425
43349
  const newCallOps = contractCallReceipts.reduce((prevContractCallOps, receipt) => {
43426
43350
  if (receipt.to === contractInput.contractID) {
@@ -43474,7 +43398,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
43474
43398
  let { from: fromAddress } = receipt;
43475
43399
  const toType = contractInputs.some((input) => input.contractID === toAddress) ? 0 /* contract */ : 1 /* account */;
43476
43400
  if (ZeroBytes32 === fromAddress) {
43477
- const change = changeOutputs.find((output2) => output2.assetId === assetId);
43401
+ const change = changeOutputs.find((output3) => output3.assetId === assetId);
43478
43402
  fromAddress = change?.to || fromAddress;
43479
43403
  }
43480
43404
  const fromType = contractInputs.some((input) => input.contractID === fromAddress) ? 0 /* contract */ : 1 /* account */;
@@ -43505,8 +43429,8 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
43505
43429
  const coinOutputs = getOutputsCoin(outputs);
43506
43430
  const contractInputs = getInputsContract(inputs);
43507
43431
  const changeOutputs = getOutputsChange(outputs);
43508
- coinOutputs.forEach((output2) => {
43509
- const { amount, assetId, to } = output2;
43432
+ coinOutputs.forEach((output3) => {
43433
+ const { amount, assetId, to } = output3;
43510
43434
  const changeOutput = changeOutputs.find((change) => change.assetId === assetId);
43511
43435
  if (changeOutput) {
43512
43436
  operations = addOperation(operations, {
@@ -43544,7 +43468,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
43544
43468
  }
43545
43469
  function getPayProducerOperations(outputs) {
43546
43470
  const coinOutputs = getOutputsCoin(outputs);
43547
- const payProducerOperations = coinOutputs.reduce((prev, output2) => {
43471
+ const payProducerOperations = coinOutputs.reduce((prev, output3) => {
43548
43472
  const operations = addOperation(prev, {
43549
43473
  name: "Pay network fee to block producer" /* payBlockProducer */,
43550
43474
  from: {
@@ -43553,12 +43477,12 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
43553
43477
  },
43554
43478
  to: {
43555
43479
  type: 1 /* account */,
43556
- address: output2.to.toString()
43480
+ address: output3.to.toString()
43557
43481
  },
43558
43482
  assetsSent: [
43559
43483
  {
43560
- assetId: output2.assetId.toString(),
43561
- amount: output2.amount
43484
+ assetId: output3.assetId.toString(),
43485
+ amount: output3.amount
43562
43486
  }
43563
43487
  ]
43564
43488
  });
@@ -43957,12 +43881,18 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
43957
43881
  await this.fetch();
43958
43882
  }
43959
43883
  /**
43960
- * Waits for transaction to complete and returns the result.
43884
+ * Assembles the result of a transaction by retrieving the transaction summary,
43885
+ * decoding logs (if available), and handling transaction failure.
43961
43886
  *
43962
- * @returns The completed transaction result
43887
+ * This method can be used to obtain the result of a transaction that has just
43888
+ * been submitted or one that has already been processed.
43889
+ *
43890
+ * @template TTransactionType - The type of the transaction.
43891
+ * @param contractsAbiMap - The map of contract ABIs.
43892
+ * @returns - The assembled transaction result.
43893
+ * @throws If the transaction status is a failure.
43963
43894
  */
43964
- async waitForResult(contractsAbiMap) {
43965
- await this.waitForStatusChange();
43895
+ async assembleResult(contractsAbiMap) {
43966
43896
  const transactionSummary = await this.getTransactionSummary(contractsAbiMap);
43967
43897
  const transactionResult = {
43968
43898
  gqlTransaction: this.gqlTransaction,
@@ -43988,6 +43918,15 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
43988
43918
  }
43989
43919
  return transactionResult;
43990
43920
  }
43921
+ /**
43922
+ * Waits for transaction to complete and returns the result.
43923
+ *
43924
+ * @returns The completed transaction result
43925
+ */
43926
+ async waitForResult(contractsAbiMap) {
43927
+ await this.waitForStatusChange();
43928
+ return this.assembleResult(contractsAbiMap);
43929
+ }
43991
43930
  /**
43992
43931
  * Waits for transaction to complete and returns the result.
43993
43932
  *
@@ -44050,6 +43989,8 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
44050
43989
 
44051
43990
  // src/providers/provider.ts
44052
43991
  var MAX_RETRIES = 10;
43992
+ var RESOURCES_PAGE_SIZE_LIMIT = 512;
43993
+ var BLOCKS_PAGE_SIZE_LIMIT = 5;
44053
43994
  var processGqlChain = (chain) => {
44054
43995
  const { name, daHeight, consensusParameters, latestBlock } = chain;
44055
43996
  const {
@@ -44693,7 +44634,7 @@ Supported fuel-core version: ${supportedVersion}.`
44693
44634
  /**
44694
44635
  * Returns a transaction cost to enable user
44695
44636
  * to set gasLimit and also reserve balance amounts
44696
- * on the the transaction.
44637
+ * on the transaction.
44697
44638
  *
44698
44639
  * @param transactionRequestLike - The transaction request object.
44699
44640
  * @param transactionCostParams - The transaction cost parameters (optional).
@@ -44804,20 +44745,27 @@ Supported fuel-core version: ${supportedVersion}.`
44804
44745
  */
44805
44746
  async getCoins(owner, assetId, paginationArgs) {
44806
44747
  const ownerAddress = Address.fromAddressOrString(owner);
44807
- const result = await this.operations.getCoins({
44808
- first: 10,
44809
- ...paginationArgs,
44748
+ const {
44749
+ coins: { edges, pageInfo }
44750
+ } = await this.operations.getCoins({
44751
+ ...this.validatePaginationArgs({
44752
+ paginationLimit: RESOURCES_PAGE_SIZE_LIMIT,
44753
+ inputArgs: paginationArgs
44754
+ }),
44810
44755
  filter: { owner: ownerAddress.toB256(), assetId: assetId && hexlify(assetId) }
44811
44756
  });
44812
- const coins = result.coins.edges.map((edge) => edge.node);
44813
- return coins.map((coin) => ({
44814
- id: coin.utxoId,
44815
- assetId: coin.assetId,
44816
- amount: bn(coin.amount),
44817
- owner: Address.fromAddressOrString(coin.owner),
44818
- blockCreated: bn(coin.blockCreated),
44819
- txCreatedIdx: bn(coin.txCreatedIdx)
44757
+ const coins = edges.map(({ node }) => ({
44758
+ id: node.utxoId,
44759
+ assetId: node.assetId,
44760
+ amount: bn(node.amount),
44761
+ owner: Address.fromAddressOrString(node.owner),
44762
+ blockCreated: bn(node.blockCreated),
44763
+ txCreatedIdx: bn(node.txCreatedIdx)
44820
44764
  }));
44765
+ return {
44766
+ coins,
44767
+ pageInfo
44768
+ };
44821
44769
  }
44822
44770
  /**
44823
44771
  * Returns resources for the given owner satisfying the spend query.
@@ -44910,14 +44858,21 @@ Supported fuel-core version: ${supportedVersion}.`
44910
44858
  * @returns A promise that resolves to the blocks.
44911
44859
  */
44912
44860
  async getBlocks(params) {
44913
- const { blocks: fetchedData } = await this.operations.getBlocks(params);
44914
- const blocks = fetchedData.edges.map(({ node: block2 }) => ({
44861
+ const {
44862
+ blocks: { edges, pageInfo }
44863
+ } = await this.operations.getBlocks({
44864
+ ...this.validatePaginationArgs({
44865
+ paginationLimit: BLOCKS_PAGE_SIZE_LIMIT,
44866
+ inputArgs: params
44867
+ })
44868
+ });
44869
+ const blocks = edges.map(({ node: block2 }) => ({
44915
44870
  id: block2.id,
44916
44871
  height: bn(block2.height),
44917
44872
  time: block2.header.time,
44918
44873
  transactionIds: block2.transactions.map((tx) => tx.id)
44919
44874
  }));
44920
- return blocks;
44875
+ return { blocks, pageInfo };
44921
44876
  }
44922
44877
  /**
44923
44878
  * Returns block matching the given ID or type, including transaction data.
@@ -45027,17 +44982,22 @@ Supported fuel-core version: ${supportedVersion}.`
45027
44982
  * @param paginationArgs - Pagination arguments (optional).
45028
44983
  * @returns A promise that resolves to the balances.
45029
44984
  */
45030
- async getBalances(owner, paginationArgs) {
45031
- const result = await this.operations.getBalances({
45032
- first: 10,
45033
- ...paginationArgs,
44985
+ async getBalances(owner) {
44986
+ const {
44987
+ balances: { edges }
44988
+ } = await this.operations.getBalances({
44989
+ /**
44990
+ * The query parameters for this method were designed to support pagination,
44991
+ * but the current Fuel-Core implementation does not support pagination yet.
44992
+ */
44993
+ first: 1e4,
45034
44994
  filter: { owner: Address.fromAddressOrString(owner).toB256() }
45035
44995
  });
45036
- const balances = result.balances.edges.map((edge) => edge.node);
45037
- return balances.map((balance) => ({
45038
- assetId: balance.assetId,
45039
- amount: bn(balance.amount)
44996
+ const balances = edges.map(({ node }) => ({
44997
+ assetId: node.assetId,
44998
+ amount: bn(node.amount)
45040
44999
  }));
45000
+ return { balances };
45041
45001
  }
45042
45002
  /**
45043
45003
  * Returns message for the given address.
@@ -45047,27 +45007,34 @@ Supported fuel-core version: ${supportedVersion}.`
45047
45007
  * @returns A promise that resolves to the messages.
45048
45008
  */
45049
45009
  async getMessages(address, paginationArgs) {
45050
- const result = await this.operations.getMessages({
45051
- first: 10,
45052
- ...paginationArgs,
45010
+ const {
45011
+ messages: { edges, pageInfo }
45012
+ } = await this.operations.getMessages({
45013
+ ...this.validatePaginationArgs({
45014
+ inputArgs: paginationArgs,
45015
+ paginationLimit: RESOURCES_PAGE_SIZE_LIMIT
45016
+ }),
45053
45017
  owner: Address.fromAddressOrString(address).toB256()
45054
45018
  });
45055
- const messages = result.messages.edges.map((edge) => edge.node);
45056
- return messages.map((message) => ({
45019
+ const messages = edges.map(({ node }) => ({
45057
45020
  messageId: InputMessageCoder.getMessageId({
45058
- sender: message.sender,
45059
- recipient: message.recipient,
45060
- nonce: message.nonce,
45061
- amount: bn(message.amount),
45062
- data: message.data
45021
+ sender: node.sender,
45022
+ recipient: node.recipient,
45023
+ nonce: node.nonce,
45024
+ amount: bn(node.amount),
45025
+ data: node.data
45063
45026
  }),
45064
- sender: Address.fromAddressOrString(message.sender),
45065
- recipient: Address.fromAddressOrString(message.recipient),
45066
- nonce: message.nonce,
45067
- amount: bn(message.amount),
45068
- data: InputMessageCoder.decodeData(message.data),
45069
- daHeight: bn(message.daHeight)
45027
+ sender: Address.fromAddressOrString(node.sender),
45028
+ recipient: Address.fromAddressOrString(node.recipient),
45029
+ nonce: node.nonce,
45030
+ amount: bn(node.amount),
45031
+ data: InputMessageCoder.decodeData(node.data),
45032
+ daHeight: bn(node.daHeight)
45070
45033
  }));
45034
+ return {
45035
+ messages,
45036
+ pageInfo
45037
+ };
45071
45038
  }
45072
45039
  /**
45073
45040
  * Returns Message Proof for given transaction id and the message id from MessageOut receipt.
@@ -45246,6 +45213,41 @@ Supported fuel-core version: ${supportedVersion}.`
45246
45213
  }
45247
45214
  return relayedTransactionStatus;
45248
45215
  }
45216
+ /**
45217
+ * @hidden
45218
+ */
45219
+ validatePaginationArgs(params) {
45220
+ const { paginationLimit, inputArgs = {} } = params;
45221
+ const { first, last, after, before } = inputArgs;
45222
+ if (after && before) {
45223
+ throw new FuelError(
45224
+ ErrorCode.INVALID_INPUT_PARAMETERS,
45225
+ 'Pagination arguments "after" and "before" cannot be used together'
45226
+ );
45227
+ }
45228
+ if ((first || 0) > paginationLimit || (last || 0) > paginationLimit) {
45229
+ throw new FuelError(
45230
+ ErrorCode.INVALID_INPUT_PARAMETERS,
45231
+ `Pagination limit for this query cannot exceed ${paginationLimit} items`
45232
+ );
45233
+ }
45234
+ if (first && before) {
45235
+ throw new FuelError(
45236
+ ErrorCode.INVALID_INPUT_PARAMETERS,
45237
+ 'The use of pagination argument "first" with "before" is not supported'
45238
+ );
45239
+ }
45240
+ if (last && after) {
45241
+ throw new FuelError(
45242
+ ErrorCode.INVALID_INPUT_PARAMETERS,
45243
+ 'The use of pagination argument "last" with "after" is not supported'
45244
+ );
45245
+ }
45246
+ if (!first && !last) {
45247
+ inputArgs.first = paginationLimit;
45248
+ }
45249
+ return inputArgs;
45250
+ }
45249
45251
  /**
45250
45252
  * @hidden
45251
45253
  */
@@ -45462,52 +45464,16 @@ Supported fuel-core version: ${supportedVersion}.`
45462
45464
  * @param assetId - The asset ID of the coins to retrieve (optional).
45463
45465
  * @returns A promise that resolves to an array of Coins.
45464
45466
  */
45465
- async getCoins(assetId) {
45466
- const coins = [];
45467
- const pageSize = 9999;
45468
- let cursor;
45469
- for (; ; ) {
45470
- const pageCoins = await this.provider.getCoins(this.address, assetId, {
45471
- first: pageSize,
45472
- after: cursor
45473
- });
45474
- coins.push(...pageCoins);
45475
- const hasNextPage = pageCoins.length >= pageSize;
45476
- if (!hasNextPage) {
45477
- break;
45478
- }
45479
- throw new FuelError(
45480
- ErrorCode.NOT_SUPPORTED,
45481
- `Wallets containing more than ${pageSize} coins exceed the current supported limit.`
45482
- );
45483
- }
45484
- return coins;
45467
+ async getCoins(assetId, paginationArgs) {
45468
+ return this.provider.getCoins(this.address, assetId, paginationArgs);
45485
45469
  }
45486
45470
  /**
45487
45471
  * Retrieves messages owned by the account.
45488
45472
  *
45489
45473
  * @returns A promise that resolves to an array of Messages.
45490
45474
  */
45491
- async getMessages() {
45492
- const messages = [];
45493
- const pageSize = 9999;
45494
- let cursor;
45495
- for (; ; ) {
45496
- const pageMessages = await this.provider.getMessages(this.address, {
45497
- first: pageSize,
45498
- after: cursor
45499
- });
45500
- messages.push(...pageMessages);
45501
- const hasNextPage = pageMessages.length >= pageSize;
45502
- if (!hasNextPage) {
45503
- break;
45504
- }
45505
- throw new FuelError(
45506
- ErrorCode.NOT_SUPPORTED,
45507
- `Wallets containing more than ${pageSize} messages exceed the current supported limit.`
45508
- );
45509
- }
45510
- return messages;
45475
+ async getMessages(paginationArgs) {
45476
+ return this.provider.getMessages(this.address, paginationArgs);
45511
45477
  }
45512
45478
  /**
45513
45479
  * Retrieves the balance of the account for the given asset.
@@ -45526,25 +45492,7 @@ Supported fuel-core version: ${supportedVersion}.`
45526
45492
  * @returns A promise that resolves to an array of Coins and their quantities.
45527
45493
  */
45528
45494
  async getBalances() {
45529
- const balances = [];
45530
- const pageSize = 9999;
45531
- let cursor;
45532
- for (; ; ) {
45533
- const pageBalances = await this.provider.getBalances(this.address, {
45534
- first: pageSize,
45535
- after: cursor
45536
- });
45537
- balances.push(...pageBalances);
45538
- const hasNextPage = pageBalances.length >= pageSize;
45539
- if (!hasNextPage) {
45540
- break;
45541
- }
45542
- throw new FuelError(
45543
- ErrorCode.NOT_SUPPORTED,
45544
- `Wallets containing more than ${pageSize} balances exceed the current supported limit.`
45545
- );
45546
- }
45547
- return balances;
45495
+ return this.provider.getBalances(this.address);
45548
45496
  }
45549
45497
  /**
45550
45498
  * Funds a transaction request by adding the necessary resources.
@@ -45866,7 +45814,7 @@ Supported fuel-core version: ${supportedVersion}.`
45866
45814
  */
45867
45815
  generateFakeResources(coins) {
45868
45816
  return coins.map((coin) => ({
45869
- id: hexlify(randomBytes22(UTXO_ID_LEN)),
45817
+ id: hexlify(randomBytes2(UTXO_ID_LEN)),
45870
45818
  owner: this.address,
45871
45819
  blockCreated: bn(1),
45872
45820
  txCreatedIdx: bn(1),
@@ -45925,7 +45873,414 @@ Supported fuel-core version: ${supportedVersion}.`
45925
45873
  }
45926
45874
  };
45927
45875
 
45928
- // ../../node_modules/.pnpm/@noble+curves@1.3.0/node_modules/@noble/curves/esm/abstract/modular.js
45876
+ // ../../node_modules/.pnpm/@noble+hashes@1.4.0/node_modules/@noble/hashes/esm/_assert.js
45877
+ function number2(n) {
45878
+ if (!Number.isSafeInteger(n) || n < 0)
45879
+ throw new Error(`positive integer expected, not ${n}`);
45880
+ }
45881
+ function isBytes4(a) {
45882
+ return a instanceof Uint8Array || a != null && typeof a === "object" && a.constructor.name === "Uint8Array";
45883
+ }
45884
+ function bytes2(b, ...lengths) {
45885
+ if (!isBytes4(b))
45886
+ throw new Error("Uint8Array expected");
45887
+ if (lengths.length > 0 && !lengths.includes(b.length))
45888
+ throw new Error(`Uint8Array expected of length ${lengths}, not of length=${b.length}`);
45889
+ }
45890
+ function hash3(h) {
45891
+ if (typeof h !== "function" || typeof h.create !== "function")
45892
+ throw new Error("Hash should be wrapped by utils.wrapConstructor");
45893
+ number2(h.outputLen);
45894
+ number2(h.blockLen);
45895
+ }
45896
+ function exists2(instance, checkFinished = true) {
45897
+ if (instance.destroyed)
45898
+ throw new Error("Hash instance has been destroyed");
45899
+ if (checkFinished && instance.finished)
45900
+ throw new Error("Hash#digest() has already been called");
45901
+ }
45902
+ function output2(out, instance) {
45903
+ bytes2(out);
45904
+ const min = instance.outputLen;
45905
+ if (out.length < min) {
45906
+ throw new Error(`digestInto() expects output buffer of length at least ${min}`);
45907
+ }
45908
+ }
45909
+
45910
+ // ../../node_modules/.pnpm/@noble+hashes@1.4.0/node_modules/@noble/hashes/esm/cryptoNode.js
45911
+ var nc = __toESM(__require("crypto"), 1);
45912
+ var crypto4 = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : void 0;
45913
+
45914
+ // ../../node_modules/.pnpm/@noble+hashes@1.4.0/node_modules/@noble/hashes/esm/utils.js
45915
+ var createView2 = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
45916
+ var rotr2 = (word, shift) => word << 32 - shift | word >>> shift;
45917
+ var isLE2 = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
45918
+ function utf8ToBytes3(str) {
45919
+ if (typeof str !== "string")
45920
+ throw new Error(`utf8ToBytes expected string, got ${typeof str}`);
45921
+ return new Uint8Array(new TextEncoder().encode(str));
45922
+ }
45923
+ function toBytes3(data) {
45924
+ if (typeof data === "string")
45925
+ data = utf8ToBytes3(data);
45926
+ bytes2(data);
45927
+ return data;
45928
+ }
45929
+ function concatBytes3(...arrays) {
45930
+ let sum = 0;
45931
+ for (let i = 0; i < arrays.length; i++) {
45932
+ const a = arrays[i];
45933
+ bytes2(a);
45934
+ sum += a.length;
45935
+ }
45936
+ const res = new Uint8Array(sum);
45937
+ for (let i = 0, pad3 = 0; i < arrays.length; i++) {
45938
+ const a = arrays[i];
45939
+ res.set(a, pad3);
45940
+ pad3 += a.length;
45941
+ }
45942
+ return res;
45943
+ }
45944
+ var Hash2 = class {
45945
+ // Safe version that clones internal state
45946
+ clone() {
45947
+ return this._cloneInto();
45948
+ }
45949
+ };
45950
+ var toStr2 = {}.toString;
45951
+ function wrapConstructor2(hashCons) {
45952
+ const hashC = (msg) => hashCons().update(toBytes3(msg)).digest();
45953
+ const tmp = hashCons();
45954
+ hashC.outputLen = tmp.outputLen;
45955
+ hashC.blockLen = tmp.blockLen;
45956
+ hashC.create = () => hashCons();
45957
+ return hashC;
45958
+ }
45959
+ function randomBytes3(bytesLength = 32) {
45960
+ if (crypto4 && typeof crypto4.getRandomValues === "function") {
45961
+ return crypto4.getRandomValues(new Uint8Array(bytesLength));
45962
+ }
45963
+ throw new Error("crypto.getRandomValues must be defined");
45964
+ }
45965
+
45966
+ // ../../node_modules/.pnpm/@noble+hashes@1.4.0/node_modules/@noble/hashes/esm/_md.js
45967
+ function setBigUint642(view, byteOffset, value, isLE3) {
45968
+ if (typeof view.setBigUint64 === "function")
45969
+ return view.setBigUint64(byteOffset, value, isLE3);
45970
+ const _32n2 = BigInt(32);
45971
+ const _u32_max = BigInt(4294967295);
45972
+ const wh = Number(value >> _32n2 & _u32_max);
45973
+ const wl = Number(value & _u32_max);
45974
+ const h = isLE3 ? 4 : 0;
45975
+ const l = isLE3 ? 0 : 4;
45976
+ view.setUint32(byteOffset + h, wh, isLE3);
45977
+ view.setUint32(byteOffset + l, wl, isLE3);
45978
+ }
45979
+ var Chi2 = (a, b, c) => a & b ^ ~a & c;
45980
+ var Maj2 = (a, b, c) => a & b ^ a & c ^ b & c;
45981
+ var HashMD = class extends Hash2 {
45982
+ constructor(blockLen, outputLen, padOffset, isLE3) {
45983
+ super();
45984
+ this.blockLen = blockLen;
45985
+ this.outputLen = outputLen;
45986
+ this.padOffset = padOffset;
45987
+ this.isLE = isLE3;
45988
+ this.finished = false;
45989
+ this.length = 0;
45990
+ this.pos = 0;
45991
+ this.destroyed = false;
45992
+ this.buffer = new Uint8Array(blockLen);
45993
+ this.view = createView2(this.buffer);
45994
+ }
45995
+ update(data) {
45996
+ exists2(this);
45997
+ const { view, buffer, blockLen } = this;
45998
+ data = toBytes3(data);
45999
+ const len = data.length;
46000
+ for (let pos = 0; pos < len; ) {
46001
+ const take = Math.min(blockLen - this.pos, len - pos);
46002
+ if (take === blockLen) {
46003
+ const dataView = createView2(data);
46004
+ for (; blockLen <= len - pos; pos += blockLen)
46005
+ this.process(dataView, pos);
46006
+ continue;
46007
+ }
46008
+ buffer.set(data.subarray(pos, pos + take), this.pos);
46009
+ this.pos += take;
46010
+ pos += take;
46011
+ if (this.pos === blockLen) {
46012
+ this.process(view, 0);
46013
+ this.pos = 0;
46014
+ }
46015
+ }
46016
+ this.length += data.length;
46017
+ this.roundClean();
46018
+ return this;
46019
+ }
46020
+ digestInto(out) {
46021
+ exists2(this);
46022
+ output2(out, this);
46023
+ this.finished = true;
46024
+ const { buffer, view, blockLen, isLE: isLE3 } = this;
46025
+ let { pos } = this;
46026
+ buffer[pos++] = 128;
46027
+ this.buffer.subarray(pos).fill(0);
46028
+ if (this.padOffset > blockLen - pos) {
46029
+ this.process(view, 0);
46030
+ pos = 0;
46031
+ }
46032
+ for (let i = pos; i < blockLen; i++)
46033
+ buffer[i] = 0;
46034
+ setBigUint642(view, blockLen - 8, BigInt(this.length * 8), isLE3);
46035
+ this.process(view, 0);
46036
+ const oview = createView2(out);
46037
+ const len = this.outputLen;
46038
+ if (len % 4)
46039
+ throw new Error("_sha2: outputLen should be aligned to 32bit");
46040
+ const outLen = len / 4;
46041
+ const state = this.get();
46042
+ if (outLen > state.length)
46043
+ throw new Error("_sha2: outputLen bigger than state");
46044
+ for (let i = 0; i < outLen; i++)
46045
+ oview.setUint32(4 * i, state[i], isLE3);
46046
+ }
46047
+ digest() {
46048
+ const { buffer, outputLen } = this;
46049
+ this.digestInto(buffer);
46050
+ const res = buffer.slice(0, outputLen);
46051
+ this.destroy();
46052
+ return res;
46053
+ }
46054
+ _cloneInto(to) {
46055
+ to || (to = new this.constructor());
46056
+ to.set(...this.get());
46057
+ const { blockLen, buffer, length, finished, destroyed, pos } = this;
46058
+ to.length = length;
46059
+ to.pos = pos;
46060
+ to.finished = finished;
46061
+ to.destroyed = destroyed;
46062
+ if (length % blockLen)
46063
+ to.buffer.set(buffer);
46064
+ return to;
46065
+ }
46066
+ };
46067
+
46068
+ // ../../node_modules/.pnpm/@noble+hashes@1.4.0/node_modules/@noble/hashes/esm/sha256.js
46069
+ var SHA256_K2 = /* @__PURE__ */ new Uint32Array([
46070
+ 1116352408,
46071
+ 1899447441,
46072
+ 3049323471,
46073
+ 3921009573,
46074
+ 961987163,
46075
+ 1508970993,
46076
+ 2453635748,
46077
+ 2870763221,
46078
+ 3624381080,
46079
+ 310598401,
46080
+ 607225278,
46081
+ 1426881987,
46082
+ 1925078388,
46083
+ 2162078206,
46084
+ 2614888103,
46085
+ 3248222580,
46086
+ 3835390401,
46087
+ 4022224774,
46088
+ 264347078,
46089
+ 604807628,
46090
+ 770255983,
46091
+ 1249150122,
46092
+ 1555081692,
46093
+ 1996064986,
46094
+ 2554220882,
46095
+ 2821834349,
46096
+ 2952996808,
46097
+ 3210313671,
46098
+ 3336571891,
46099
+ 3584528711,
46100
+ 113926993,
46101
+ 338241895,
46102
+ 666307205,
46103
+ 773529912,
46104
+ 1294757372,
46105
+ 1396182291,
46106
+ 1695183700,
46107
+ 1986661051,
46108
+ 2177026350,
46109
+ 2456956037,
46110
+ 2730485921,
46111
+ 2820302411,
46112
+ 3259730800,
46113
+ 3345764771,
46114
+ 3516065817,
46115
+ 3600352804,
46116
+ 4094571909,
46117
+ 275423344,
46118
+ 430227734,
46119
+ 506948616,
46120
+ 659060556,
46121
+ 883997877,
46122
+ 958139571,
46123
+ 1322822218,
46124
+ 1537002063,
46125
+ 1747873779,
46126
+ 1955562222,
46127
+ 2024104815,
46128
+ 2227730452,
46129
+ 2361852424,
46130
+ 2428436474,
46131
+ 2756734187,
46132
+ 3204031479,
46133
+ 3329325298
46134
+ ]);
46135
+ var SHA256_IV = /* @__PURE__ */ new Uint32Array([
46136
+ 1779033703,
46137
+ 3144134277,
46138
+ 1013904242,
46139
+ 2773480762,
46140
+ 1359893119,
46141
+ 2600822924,
46142
+ 528734635,
46143
+ 1541459225
46144
+ ]);
46145
+ var SHA256_W2 = /* @__PURE__ */ new Uint32Array(64);
46146
+ var SHA2562 = class extends HashMD {
46147
+ constructor() {
46148
+ super(64, 32, 8, false);
46149
+ this.A = SHA256_IV[0] | 0;
46150
+ this.B = SHA256_IV[1] | 0;
46151
+ this.C = SHA256_IV[2] | 0;
46152
+ this.D = SHA256_IV[3] | 0;
46153
+ this.E = SHA256_IV[4] | 0;
46154
+ this.F = SHA256_IV[5] | 0;
46155
+ this.G = SHA256_IV[6] | 0;
46156
+ this.H = SHA256_IV[7] | 0;
46157
+ }
46158
+ get() {
46159
+ const { A, B, C, D, E, F, G, H } = this;
46160
+ return [A, B, C, D, E, F, G, H];
46161
+ }
46162
+ // prettier-ignore
46163
+ set(A, B, C, D, E, F, G, H) {
46164
+ this.A = A | 0;
46165
+ this.B = B | 0;
46166
+ this.C = C | 0;
46167
+ this.D = D | 0;
46168
+ this.E = E | 0;
46169
+ this.F = F | 0;
46170
+ this.G = G | 0;
46171
+ this.H = H | 0;
46172
+ }
46173
+ process(view, offset) {
46174
+ for (let i = 0; i < 16; i++, offset += 4)
46175
+ SHA256_W2[i] = view.getUint32(offset, false);
46176
+ for (let i = 16; i < 64; i++) {
46177
+ const W15 = SHA256_W2[i - 15];
46178
+ const W2 = SHA256_W2[i - 2];
46179
+ const s0 = rotr2(W15, 7) ^ rotr2(W15, 18) ^ W15 >>> 3;
46180
+ const s1 = rotr2(W2, 17) ^ rotr2(W2, 19) ^ W2 >>> 10;
46181
+ SHA256_W2[i] = s1 + SHA256_W2[i - 7] + s0 + SHA256_W2[i - 16] | 0;
46182
+ }
46183
+ let { A, B, C, D, E, F, G, H } = this;
46184
+ for (let i = 0; i < 64; i++) {
46185
+ const sigma1 = rotr2(E, 6) ^ rotr2(E, 11) ^ rotr2(E, 25);
46186
+ const T1 = H + sigma1 + Chi2(E, F, G) + SHA256_K2[i] + SHA256_W2[i] | 0;
46187
+ const sigma0 = rotr2(A, 2) ^ rotr2(A, 13) ^ rotr2(A, 22);
46188
+ const T2 = sigma0 + Maj2(A, B, C) | 0;
46189
+ H = G;
46190
+ G = F;
46191
+ F = E;
46192
+ E = D + T1 | 0;
46193
+ D = C;
46194
+ C = B;
46195
+ B = A;
46196
+ A = T1 + T2 | 0;
46197
+ }
46198
+ A = A + this.A | 0;
46199
+ B = B + this.B | 0;
46200
+ C = C + this.C | 0;
46201
+ D = D + this.D | 0;
46202
+ E = E + this.E | 0;
46203
+ F = F + this.F | 0;
46204
+ G = G + this.G | 0;
46205
+ H = H + this.H | 0;
46206
+ this.set(A, B, C, D, E, F, G, H);
46207
+ }
46208
+ roundClean() {
46209
+ SHA256_W2.fill(0);
46210
+ }
46211
+ destroy() {
46212
+ this.set(0, 0, 0, 0, 0, 0, 0, 0);
46213
+ this.buffer.fill(0);
46214
+ }
46215
+ };
46216
+ var sha2563 = /* @__PURE__ */ wrapConstructor2(() => new SHA2562());
46217
+
46218
+ // ../../node_modules/.pnpm/@noble+hashes@1.4.0/node_modules/@noble/hashes/esm/hmac.js
46219
+ var HMAC2 = class extends Hash2 {
46220
+ constructor(hash4, _key) {
46221
+ super();
46222
+ this.finished = false;
46223
+ this.destroyed = false;
46224
+ hash3(hash4);
46225
+ const key = toBytes3(_key);
46226
+ this.iHash = hash4.create();
46227
+ if (typeof this.iHash.update !== "function")
46228
+ throw new Error("Expected instance of class which extends utils.Hash");
46229
+ this.blockLen = this.iHash.blockLen;
46230
+ this.outputLen = this.iHash.outputLen;
46231
+ const blockLen = this.blockLen;
46232
+ const pad3 = new Uint8Array(blockLen);
46233
+ pad3.set(key.length > blockLen ? hash4.create().update(key).digest() : key);
46234
+ for (let i = 0; i < pad3.length; i++)
46235
+ pad3[i] ^= 54;
46236
+ this.iHash.update(pad3);
46237
+ this.oHash = hash4.create();
46238
+ for (let i = 0; i < pad3.length; i++)
46239
+ pad3[i] ^= 54 ^ 92;
46240
+ this.oHash.update(pad3);
46241
+ pad3.fill(0);
46242
+ }
46243
+ update(buf) {
46244
+ exists2(this);
46245
+ this.iHash.update(buf);
46246
+ return this;
46247
+ }
46248
+ digestInto(out) {
46249
+ exists2(this);
46250
+ bytes2(out, this.outputLen);
46251
+ this.finished = true;
46252
+ this.iHash.digestInto(out);
46253
+ this.oHash.update(out);
46254
+ this.oHash.digestInto(out);
46255
+ this.destroy();
46256
+ }
46257
+ digest() {
46258
+ const out = new Uint8Array(this.oHash.outputLen);
46259
+ this.digestInto(out);
46260
+ return out;
46261
+ }
46262
+ _cloneInto(to) {
46263
+ to || (to = Object.create(Object.getPrototypeOf(this), {}));
46264
+ const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;
46265
+ to = to;
46266
+ to.finished = finished;
46267
+ to.destroyed = destroyed;
46268
+ to.blockLen = blockLen;
46269
+ to.outputLen = outputLen;
46270
+ to.oHash = oHash._cloneInto(to.oHash);
46271
+ to.iHash = iHash._cloneInto(to.iHash);
46272
+ return to;
46273
+ }
46274
+ destroy() {
46275
+ this.destroyed = true;
46276
+ this.oHash.destroy();
46277
+ this.iHash.destroy();
46278
+ }
46279
+ };
46280
+ var hmac2 = (hash4, key, message) => new HMAC2(hash4, key).update(message).digest();
46281
+ hmac2.create = (hash4, key) => new HMAC2(hash4, key);
46282
+
46283
+ // ../../node_modules/.pnpm/@noble+curves@1.4.2/node_modules/@noble/curves/esm/abstract/modular.js
45929
46284
  var _0n3 = BigInt(0);
45930
46285
  var _1n3 = BigInt(1);
45931
46286
  var _2n3 = BigInt(2);
@@ -45961,11 +46316,11 @@ Supported fuel-core version: ${supportedVersion}.`
45961
46316
  }
45962
46317
  return res;
45963
46318
  }
45964
- function invert(number2, modulo) {
45965
- if (number2 === _0n3 || modulo <= _0n3) {
45966
- throw new Error(`invert: expected positive integers, got n=${number2} mod=${modulo}`);
46319
+ function invert(number3, modulo) {
46320
+ if (number3 === _0n3 || modulo <= _0n3) {
46321
+ throw new Error(`invert: expected positive integers, got n=${number3} mod=${modulo}`);
45967
46322
  }
45968
- let a = mod(number2, modulo);
46323
+ let a = mod(number3, modulo);
45969
46324
  let b = modulo;
45970
46325
  let x = _0n3, y = _1n3, u = _1n3, v = _0n3;
45971
46326
  while (a !== _0n3) {
@@ -46120,7 +46475,7 @@ Supported fuel-core version: ${supportedVersion}.`
46120
46475
  const nByteLength = Math.ceil(_nBitLength / 8);
46121
46476
  return { nBitLength: _nBitLength, nByteLength };
46122
46477
  }
46123
- function Field(ORDER, bitLen2, isLE2 = false, redef = {}) {
46478
+ function Field(ORDER, bitLen2, isLE3 = false, redef = {}) {
46124
46479
  if (ORDER <= _0n3)
46125
46480
  throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);
46126
46481
  const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen2);
@@ -46161,11 +46516,11 @@ Supported fuel-core version: ${supportedVersion}.`
46161
46516
  // TODO: do we really need constant cmov?
46162
46517
  // We don't have const-time bigints anyway, so probably will be not very useful
46163
46518
  cmov: (a, b, c) => c ? b : a,
46164
- toBytes: (num) => isLE2 ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES),
46165
- fromBytes: (bytes2) => {
46166
- if (bytes2.length !== BYTES)
46167
- throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes2.length}`);
46168
- return isLE2 ? bytesToNumberLE(bytes2) : bytesToNumberBE(bytes2);
46519
+ toBytes: (num) => isLE3 ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES),
46520
+ fromBytes: (bytes3) => {
46521
+ if (bytes3.length !== BYTES)
46522
+ throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes3.length}`);
46523
+ return isLE3 ? bytesToNumberLE(bytes3) : bytesToNumberBE(bytes3);
46169
46524
  }
46170
46525
  });
46171
46526
  return Object.freeze(f2);
@@ -46180,18 +46535,18 @@ Supported fuel-core version: ${supportedVersion}.`
46180
46535
  const length = getFieldBytesLength(fieldOrder);
46181
46536
  return length + Math.ceil(length / 2);
46182
46537
  }
46183
- function mapHashToField(key, fieldOrder, isLE2 = false) {
46538
+ function mapHashToField(key, fieldOrder, isLE3 = false) {
46184
46539
  const len = key.length;
46185
46540
  const fieldLen = getFieldBytesLength(fieldOrder);
46186
46541
  const minLen = getMinHashLength(fieldOrder);
46187
46542
  if (len < 16 || len < minLen || len > 1024)
46188
46543
  throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);
46189
- const num = isLE2 ? bytesToNumberBE(key) : bytesToNumberLE(key);
46544
+ const num = isLE3 ? bytesToNumberBE(key) : bytesToNumberLE(key);
46190
46545
  const reduced = mod(num, fieldOrder - _1n3) + _1n3;
46191
- return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
46546
+ return isLE3 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
46192
46547
  }
46193
46548
 
46194
- // ../../node_modules/.pnpm/@noble+curves@1.3.0/node_modules/@noble/curves/esm/abstract/curve.js
46549
+ // ../../node_modules/.pnpm/@noble+curves@1.4.2/node_modules/@noble/curves/esm/abstract/curve.js
46195
46550
  var _0n4 = BigInt(0);
46196
46551
  var _1n4 = BigInt(1);
46197
46552
  function wNAF(c, bits) {
@@ -46309,7 +46664,7 @@ Supported fuel-core version: ${supportedVersion}.`
46309
46664
  });
46310
46665
  }
46311
46666
 
46312
- // ../../node_modules/.pnpm/@noble+curves@1.3.0/node_modules/@noble/curves/esm/abstract/weierstrass.js
46667
+ // ../../node_modules/.pnpm/@noble+curves@1.4.2/node_modules/@noble/curves/esm/abstract/weierstrass.js
46313
46668
  function validatePointOpts(curve) {
46314
46669
  const opts = validateBasic(curve);
46315
46670
  validateObject(opts, {
@@ -46360,8 +46715,7 @@ Supported fuel-core version: ${supportedVersion}.`
46360
46715
  toSig(hex) {
46361
46716
  const { Err: E } = DER;
46362
46717
  const data = typeof hex === "string" ? h2b(hex) : hex;
46363
- if (!isBytes3(data))
46364
- throw new Error("ui8a expected");
46718
+ abytes(data);
46365
46719
  let l = data.length;
46366
46720
  if (l < 2 || data[0] != 48)
46367
46721
  throw new E("Invalid signature tag");
@@ -46396,12 +46750,12 @@ Supported fuel-core version: ${supportedVersion}.`
46396
46750
  function weierstrassPoints(opts) {
46397
46751
  const CURVE = validatePointOpts(opts);
46398
46752
  const { Fp: Fp2 } = CURVE;
46399
- const toBytes3 = CURVE.toBytes || ((_c, point, _isCompressed) => {
46753
+ const toBytes4 = CURVE.toBytes || ((_c, point, _isCompressed) => {
46400
46754
  const a = point.toAffine();
46401
- return concatBytes3(Uint8Array.from([4]), Fp2.toBytes(a.x), Fp2.toBytes(a.y));
46755
+ return concatBytes2(Uint8Array.from([4]), Fp2.toBytes(a.x), Fp2.toBytes(a.y));
46402
46756
  });
46403
- const fromBytes = CURVE.fromBytes || ((bytes2) => {
46404
- const tail = bytes2.subarray(1);
46757
+ const fromBytes = CURVE.fromBytes || ((bytes3) => {
46758
+ const tail = bytes3.subarray(1);
46405
46759
  const x = Fp2.fromBytes(tail.subarray(0, Fp2.BYTES));
46406
46760
  const y = Fp2.fromBytes(tail.subarray(Fp2.BYTES, 2 * Fp2.BYTES));
46407
46761
  return { x, y };
@@ -46764,7 +47118,7 @@ Supported fuel-core version: ${supportedVersion}.`
46764
47118
  }
46765
47119
  toRawBytes(isCompressed = true) {
46766
47120
  this.assertValidity();
46767
- return toBytes3(Point2, this, isCompressed);
47121
+ return toBytes4(Point2, this, isCompressed);
46768
47122
  }
46769
47123
  toHex(isCompressed = true) {
46770
47124
  return bytesToHex(this.toRawBytes(isCompressed));
@@ -46814,23 +47168,29 @@ Supported fuel-core version: ${supportedVersion}.`
46814
47168
  toBytes(_c, point, isCompressed) {
46815
47169
  const a = point.toAffine();
46816
47170
  const x = Fp2.toBytes(a.x);
46817
- const cat = concatBytes3;
47171
+ const cat = concatBytes2;
46818
47172
  if (isCompressed) {
46819
47173
  return cat(Uint8Array.from([point.hasEvenY() ? 2 : 3]), x);
46820
47174
  } else {
46821
47175
  return cat(Uint8Array.from([4]), x, Fp2.toBytes(a.y));
46822
47176
  }
46823
47177
  },
46824
- fromBytes(bytes2) {
46825
- const len = bytes2.length;
46826
- const head = bytes2[0];
46827
- const tail = bytes2.subarray(1);
47178
+ fromBytes(bytes3) {
47179
+ const len = bytes3.length;
47180
+ const head = bytes3[0];
47181
+ const tail = bytes3.subarray(1);
46828
47182
  if (len === compressedLen && (head === 2 || head === 3)) {
46829
47183
  const x = bytesToNumberBE(tail);
46830
47184
  if (!isValidFieldElement(x))
46831
47185
  throw new Error("Point is not on curve");
46832
47186
  const y2 = weierstrassEquation(x);
46833
- let y = Fp2.sqrt(y2);
47187
+ let y;
47188
+ try {
47189
+ y = Fp2.sqrt(y2);
47190
+ } catch (sqrtError) {
47191
+ const suffix = sqrtError instanceof Error ? ": " + sqrtError.message : "";
47192
+ throw new Error("Point is not on curve" + suffix);
47193
+ }
46834
47194
  const isYOdd = (y & _1n5) === _1n5;
46835
47195
  const isHeadOdd = (head & 1) === 1;
46836
47196
  if (isHeadOdd !== isYOdd)
@@ -46846,9 +47206,9 @@ Supported fuel-core version: ${supportedVersion}.`
46846
47206
  }
46847
47207
  });
46848
47208
  const numToNByteStr = (num) => bytesToHex(numberToBytesBE(num, CURVE.nByteLength));
46849
- function isBiggerThanHalfOrder(number2) {
47209
+ function isBiggerThanHalfOrder(number3) {
46850
47210
  const HALF = CURVE_ORDER >> _1n5;
46851
- return number2 > HALF;
47211
+ return number3 > HALF;
46852
47212
  }
46853
47213
  function normalizeS(s) {
46854
47214
  return isBiggerThanHalfOrder(s) ? modN(-s) : s;
@@ -46978,13 +47338,13 @@ Supported fuel-core version: ${supportedVersion}.`
46978
47338
  const b = Point2.fromHex(publicB);
46979
47339
  return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);
46980
47340
  }
46981
- const bits2int = CURVE.bits2int || function(bytes2) {
46982
- const num = bytesToNumberBE(bytes2);
46983
- const delta = bytes2.length * 8 - CURVE.nBitLength;
47341
+ const bits2int = CURVE.bits2int || function(bytes3) {
47342
+ const num = bytesToNumberBE(bytes3);
47343
+ const delta = bytes3.length * 8 - CURVE.nBitLength;
46984
47344
  return delta > 0 ? num >> BigInt(delta) : num;
46985
47345
  };
46986
- const bits2int_modN = CURVE.bits2int_modN || function(bytes2) {
46987
- return modN(bits2int(bytes2));
47346
+ const bits2int_modN = CURVE.bits2int_modN || function(bytes3) {
47347
+ return modN(bits2int(bytes3));
46988
47348
  };
46989
47349
  const ORDER_MASK = bitMask(CURVE.nBitLength);
46990
47350
  function int2octets(num) {
@@ -46997,21 +47357,21 @@ Supported fuel-core version: ${supportedVersion}.`
46997
47357
  function prepSig(msgHash, privateKey, opts = defaultSigOpts) {
46998
47358
  if (["recovered", "canonical"].some((k) => k in opts))
46999
47359
  throw new Error("sign() legacy options not supported");
47000
- const { hash: hash3, randomBytes: randomBytes3 } = CURVE;
47360
+ const { hash: hash4, randomBytes: randomBytes4 } = CURVE;
47001
47361
  let { lowS, prehash, extraEntropy: ent } = opts;
47002
47362
  if (lowS == null)
47003
47363
  lowS = true;
47004
47364
  msgHash = ensureBytes("msgHash", msgHash);
47005
47365
  if (prehash)
47006
- msgHash = ensureBytes("prehashed msgHash", hash3(msgHash));
47366
+ msgHash = ensureBytes("prehashed msgHash", hash4(msgHash));
47007
47367
  const h1int = bits2int_modN(msgHash);
47008
47368
  const d = normPrivateKeyToScalar(privateKey);
47009
47369
  const seedArgs = [int2octets(d), int2octets(h1int)];
47010
- if (ent != null) {
47011
- const e = ent === true ? randomBytes3(Fp2.BYTES) : ent;
47370
+ if (ent != null && ent !== false) {
47371
+ const e = ent === true ? randomBytes4(Fp2.BYTES) : ent;
47012
47372
  seedArgs.push(ensureBytes("extraEntropy", e));
47013
47373
  }
47014
- const seed = concatBytes3(...seedArgs);
47374
+ const seed = concatBytes2(...seedArgs);
47015
47375
  const m = h1int;
47016
47376
  function k2sig(kBytes) {
47017
47377
  const k = bits2int(kBytes);
@@ -47101,20 +47461,20 @@ Supported fuel-core version: ${supportedVersion}.`
47101
47461
  };
47102
47462
  }
47103
47463
 
47104
- // ../../node_modules/.pnpm/@noble+curves@1.3.0/node_modules/@noble/curves/esm/_shortw_utils.js
47105
- function getHash(hash3) {
47464
+ // ../../node_modules/.pnpm/@noble+curves@1.4.2/node_modules/@noble/curves/esm/_shortw_utils.js
47465
+ function getHash(hash4) {
47106
47466
  return {
47107
- hash: hash3,
47108
- hmac: (key, ...msgs) => hmac(hash3, key, concatBytes(...msgs)),
47109
- randomBytes
47467
+ hash: hash4,
47468
+ hmac: (key, ...msgs) => hmac2(hash4, key, concatBytes3(...msgs)),
47469
+ randomBytes: randomBytes3
47110
47470
  };
47111
47471
  }
47112
47472
  function createCurve(curveDef, defHash) {
47113
- const create = (hash3) => weierstrass({ ...curveDef, ...getHash(hash3) });
47473
+ const create = (hash4) => weierstrass({ ...curveDef, ...getHash(hash4) });
47114
47474
  return Object.freeze({ ...create(defHash), create });
47115
47475
  }
47116
47476
 
47117
- // ../../node_modules/.pnpm/@noble+curves@1.3.0/node_modules/@noble/curves/esm/secp256k1.js
47477
+ // ../../node_modules/.pnpm/@noble+curves@1.4.2/node_modules/@noble/curves/esm/secp256k1.js
47118
47478
  var secp256k1P = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f");
47119
47479
  var secp256k1N = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");
47120
47480
  var _1n6 = BigInt(1);
@@ -47190,7 +47550,7 @@ Supported fuel-core version: ${supportedVersion}.`
47190
47550
  return { k1neg, k1, k2neg, k2 };
47191
47551
  }
47192
47552
  }
47193
- }, sha256);
47553
+ }, sha2563);
47194
47554
  var _0n6 = BigInt(0);
47195
47555
  var Point = secp256k1.ProjectivePoint;
47196
47556
 
@@ -47283,7 +47643,7 @@ Supported fuel-core version: ${supportedVersion}.`
47283
47643
  * @returns random 32-byte hashed
47284
47644
  */
47285
47645
  static generatePrivateKey(entropy) {
47286
- return entropy ? hash2(concat([randomBytes22(32), arrayify(entropy)])) : randomBytes22(32);
47646
+ return entropy ? hash2(concat([randomBytes2(32), arrayify(entropy)])) : randomBytes2(32);
47287
47647
  }
47288
47648
  /**
47289
47649
  * Extended publicKey from a compact publicKey
@@ -47297,34 +47657,34 @@ Supported fuel-core version: ${supportedVersion}.`
47297
47657
  }
47298
47658
  };
47299
47659
 
47300
- // ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/rng.js
47301
- var import_crypto13 = __toESM(__require("crypto"));
47660
+ // ../../node_modules/.pnpm/uuid@10.0.0/node_modules/uuid/dist/esm-node/stringify.js
47661
+ var byteToHex = [];
47662
+ for (let i = 0; i < 256; ++i) {
47663
+ byteToHex.push((i + 256).toString(16).slice(1));
47664
+ }
47665
+ function unsafeStringify(arr, offset = 0) {
47666
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
47667
+ }
47668
+
47669
+ // ../../node_modules/.pnpm/uuid@10.0.0/node_modules/uuid/dist/esm-node/rng.js
47670
+ var import_node_crypto = __toESM(__require("crypto"));
47302
47671
  var rnds8Pool = new Uint8Array(256);
47303
47672
  var poolPtr = rnds8Pool.length;
47304
47673
  function rng() {
47305
47674
  if (poolPtr > rnds8Pool.length - 16) {
47306
- import_crypto13.default.randomFillSync(rnds8Pool);
47675
+ import_node_crypto.default.randomFillSync(rnds8Pool);
47307
47676
  poolPtr = 0;
47308
47677
  }
47309
47678
  return rnds8Pool.slice(poolPtr, poolPtr += 16);
47310
47679
  }
47311
47680
 
47312
- // ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/stringify.js
47313
- var byteToHex = [];
47314
- for (let i = 0; i < 256; ++i) {
47315
- byteToHex.push((i + 256).toString(16).slice(1));
47316
- }
47317
- function unsafeStringify(arr, offset = 0) {
47318
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
47319
- }
47320
-
47321
- // ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/native.js
47322
- var import_crypto14 = __toESM(__require("crypto"));
47681
+ // ../../node_modules/.pnpm/uuid@10.0.0/node_modules/uuid/dist/esm-node/native.js
47682
+ var import_node_crypto2 = __toESM(__require("crypto"));
47323
47683
  var native_default = {
47324
- randomUUID: import_crypto14.default.randomUUID
47684
+ randomUUID: import_node_crypto2.default.randomUUID
47325
47685
  };
47326
47686
 
47327
- // ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/v4.js
47687
+ // ../../node_modules/.pnpm/uuid@10.0.0/node_modules/uuid/dist/esm-node/v4.js
47328
47688
  function v4(options, buf, offset) {
47329
47689
  if (native_default.randomUUID && !buf && !options) {
47330
47690
  return native_default.randomUUID();
@@ -47359,7 +47719,7 @@ Supported fuel-core version: ${supportedVersion}.`
47359
47719
  async function encryptKeystoreWallet(privateKey, address, password) {
47360
47720
  const privateKeyBuffer = bufferFromString2(removeHexPrefix(privateKey), "hex");
47361
47721
  const ownerAddress = Address.fromAddressOrString(address);
47362
- const salt = randomBytes22(DEFAULT_KEY_SIZE);
47722
+ const salt = randomBytes2(DEFAULT_KEY_SIZE);
47363
47723
  const key = scrypt22({
47364
47724
  password: bufferFromString2(password),
47365
47725
  salt,
@@ -47368,7 +47728,7 @@ Supported fuel-core version: ${supportedVersion}.`
47368
47728
  r: DEFAULT_KDF_PARAMS_R,
47369
47729
  p: DEFAULT_KDF_PARAMS_P
47370
47730
  });
47371
- const iv = randomBytes22(DEFAULT_IV_SIZE);
47731
+ const iv = randomBytes2(DEFAULT_IV_SIZE);
47372
47732
  const ciphertext = await encryptJsonWalletData2(privateKeyBuffer, key, iv);
47373
47733
  const data = Uint8Array.from([...key.subarray(16, 32), ...ciphertext]);
47374
47734
  const macHashUint8Array = keccak2562(data);
@@ -49864,7 +50224,7 @@ Supported fuel-core version: ${supportedVersion}.`
49864
50224
  * @returns A randomly generated mnemonic
49865
50225
  */
49866
50226
  static generate(size = 32, extraEntropy = "") {
49867
- const entropy = extraEntropy ? sha2562(concat([randomBytes22(size), arrayify(extraEntropy)])) : randomBytes22(size);
50227
+ const entropy = extraEntropy ? sha2562(concat([randomBytes2(size), arrayify(extraEntropy)])) : randomBytes2(size);
49868
50228
  return Mnemonic.entropyToMnemonic(entropy);
49869
50229
  }
49870
50230
  };
@@ -49965,9 +50325,9 @@ Supported fuel-core version: ${supportedVersion}.`
49965
50325
  data.set(arrayify(this.publicKey));
49966
50326
  }
49967
50327
  data.set(toBytes2(index, 4), 33);
49968
- const bytes2 = arrayify(computeHmac2("sha512", chainCode, data));
49969
- const IL = bytes2.slice(0, 32);
49970
- const IR = bytes2.slice(32);
50328
+ const bytes3 = arrayify(computeHmac2("sha512", chainCode, data));
50329
+ const IL = bytes3.slice(0, 32);
50330
+ const IR = bytes3.slice(32);
49971
50331
  if (privateKey) {
49972
50332
  const N = "0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141";
49973
50333
  const ki = bn(IL).add(privateKey).mod(N).toBytes(32);
@@ -50037,26 +50397,26 @@ Supported fuel-core version: ${supportedVersion}.`
50037
50397
  }
50038
50398
  static fromExtendedKey(extendedKey) {
50039
50399
  const decoded = hexlify(toBytes2(decodeBase58(extendedKey)));
50040
- const bytes2 = arrayify(decoded);
50041
- const validChecksum = base58check(bytes2.slice(0, 78)) === extendedKey;
50042
- if (bytes2.length !== 82 || !isValidExtendedKey(bytes2)) {
50400
+ const bytes3 = arrayify(decoded);
50401
+ const validChecksum = base58check(bytes3.slice(0, 78)) === extendedKey;
50402
+ if (bytes3.length !== 82 || !isValidExtendedKey(bytes3)) {
50043
50403
  throw new FuelError(ErrorCode.HD_WALLET_ERROR, "Provided key is not a valid extended key.");
50044
50404
  }
50045
50405
  if (!validChecksum) {
50046
50406
  throw new FuelError(ErrorCode.HD_WALLET_ERROR, "Provided key has an invalid checksum.");
50047
50407
  }
50048
- const depth = bytes2[4];
50049
- const parentFingerprint = hexlify(bytes2.slice(5, 9));
50050
- const index = parseInt(hexlify(bytes2.slice(9, 13)).substring(2), 16);
50051
- const chainCode = hexlify(bytes2.slice(13, 45));
50052
- const key = bytes2.slice(45, 78);
50408
+ const depth = bytes3[4];
50409
+ const parentFingerprint = hexlify(bytes3.slice(5, 9));
50410
+ const index = parseInt(hexlify(bytes3.slice(9, 13)).substring(2), 16);
50411
+ const chainCode = hexlify(bytes3.slice(13, 45));
50412
+ const key = bytes3.slice(45, 78);
50053
50413
  if (depth === 0 && parentFingerprint !== "0x00000000" || depth === 0 && index !== 0) {
50054
50414
  throw new FuelError(
50055
50415
  ErrorCode.HD_WALLET_ERROR,
50056
50416
  "Inconsistency detected: Depth is zero but fingerprint/index is non-zero."
50057
50417
  );
50058
50418
  }
50059
- if (isPublicExtendedKey(bytes2)) {
50419
+ if (isPublicExtendedKey(bytes3)) {
50060
50420
  if (key[0] !== 3) {
50061
50421
  throw new FuelError(ErrorCode.HD_WALLET_ERROR, "Invalid public extended key.");
50062
50422
  }
@@ -50238,7 +50598,7 @@ Supported fuel-core version: ${supportedVersion}.`
50238
50598
  var seedTestWallet = async (wallet, quantities, utxosAmount = 1) => {
50239
50599
  const accountsToBeFunded = Array.isArray(wallet) ? wallet : [wallet];
50240
50600
  const [{ provider }] = accountsToBeFunded;
50241
- const genesisWallet = new WalletUnlocked(process.env.GENESIS_SECRET || randomBytes22(32), provider);
50601
+ const genesisWallet = new WalletUnlocked(process.env.GENESIS_SECRET || randomBytes2(32), provider);
50242
50602
  const request = new ScriptTransactionRequest();
50243
50603
  quantities.map(coinQuantityfy).forEach(
50244
50604
  ({ amount, assetId }) => accountsToBeFunded.forEach(({ address }) => {
@@ -50264,13 +50624,11 @@ Supported fuel-core version: ${supportedVersion}.`
50264
50624
  };
50265
50625
 
50266
50626
  // src/test-utils/launchNode.ts
50267
- var import_child_process = __require("child_process");
50268
- var import_crypto20 = __require("crypto");
50627
+ var import_crypto18 = __require("crypto");
50269
50628
  var import_fs = __require("fs");
50270
50629
  var import_os = __toESM(__require("os"));
50271
50630
  var import_path7 = __toESM(__require("path"));
50272
50631
  var import_portfinder = __toESM(require_portfinder());
50273
- var import_tree_kill = __toESM(require_tree_kill());
50274
50632
  var getFlagValueFromArgs = (args, flag) => {
50275
50633
  const flagIndex = args.indexOf(flag);
50276
50634
  if (flagIndex === -1) {
@@ -50288,20 +50646,6 @@ Supported fuel-core version: ${supportedVersion}.`
50288
50646
  });
50289
50647
  return newArgs;
50290
50648
  };
50291
- var killNode = (params) => {
50292
- const { child, configPath, state, killFn } = params;
50293
- if (!state.isDead) {
50294
- if (child.pid) {
50295
- state.isDead = true;
50296
- killFn(Number(child.pid));
50297
- }
50298
- child.stdout.removeAllListeners();
50299
- child.stderr.removeAllListeners();
50300
- if ((0, import_fs.existsSync)(configPath)) {
50301
- (0, import_fs.rmSync)(configPath, { recursive: true });
50302
- }
50303
- }
50304
- };
50305
50649
  function getFinalStateConfigJSON({ stateConfig, chainConfig }) {
50306
50650
  const defaultCoins = defaultSnapshotConfigs.stateConfig.coins.map((coin) => ({
50307
50651
  ...coin,
@@ -50318,7 +50662,7 @@ Supported fuel-core version: ${supportedVersion}.`
50318
50662
  const signer = new Signer(pk);
50319
50663
  process.env.GENESIS_SECRET = hexlify(pk);
50320
50664
  coins.push({
50321
- tx_id: hexlify(randomBytes22(BYTES_32)),
50665
+ tx_id: hexlify(randomBytes2(BYTES_32)),
50322
50666
  owner: signer.address.toHexString(),
50323
50667
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
50324
50668
  amount: "18446744073709551615",
@@ -50340,12 +50684,11 @@ Supported fuel-core version: ${supportedVersion}.`
50340
50684
  ip,
50341
50685
  port,
50342
50686
  args = [],
50343
- fuelCorePath = process.env.FUEL_CORE_PATH ?? void 0,
50687
+ fuelCorePath = process.env.FUEL_CORE_PATH || void 0,
50344
50688
  loggingEnabled = true,
50345
- debugEnabled = false,
50346
50689
  basePath,
50347
50690
  snapshotConfig = defaultSnapshotConfigs
50348
- }) => (
50691
+ } = {}) => (
50349
50692
  // eslint-disable-next-line no-async-promise-executor
50350
50693
  new Promise(async (resolve, reject) => {
50351
50694
  const remainingArgs = extractRemainingArgs(args, [
@@ -50362,7 +50705,7 @@ Supported fuel-core version: ${supportedVersion}.`
50362
50705
  const poaInstant = poaInstantFlagValue === "true" || poaInstantFlagValue === void 0;
50363
50706
  const nativeExecutorVersion = getFlagValueFromArgs(args, "--native-executor-version") || "0";
50364
50707
  const graphQLStartSubstring = "Binding GraphQL provider to";
50365
- const command = fuelCorePath ?? "fuel-core";
50708
+ const command = fuelCorePath || "fuel-core";
50366
50709
  const ipToUse = ip || "0.0.0.0";
50367
50710
  const portToUse = port || (await (0, import_portfinder.getPortPromise)({
50368
50711
  port: 4e3,
@@ -50372,7 +50715,7 @@ Supported fuel-core version: ${supportedVersion}.`
50372
50715
  })).toString();
50373
50716
  let snapshotDirToUse;
50374
50717
  const prefix = basePath || import_os.default.tmpdir();
50375
- const suffix = basePath ? "" : (0, import_crypto20.randomUUID)();
50718
+ const suffix = basePath ? "" : (0, import_crypto18.randomUUID)();
50376
50719
  const tempDir = import_path7.default.join(prefix, ".fuels", suffix, "snapshotDir");
50377
50720
  if (snapshotDir) {
50378
50721
  snapshotDirToUse = snapshotDir;
@@ -50391,7 +50734,8 @@ Supported fuel-core version: ${supportedVersion}.`
50391
50734
  (0, import_fs.writeFileSync)(stateTransitionPath, JSON.stringify(""));
50392
50735
  snapshotDirToUse = tempDir;
50393
50736
  }
50394
- const child = (0, import_child_process.spawn)(
50737
+ const { spawn } = await import("child_process");
50738
+ const child = spawn(
50395
50739
  command,
50396
50740
  [
50397
50741
  "run",
@@ -50408,22 +50752,45 @@ Supported fuel-core version: ${supportedVersion}.`
50408
50752
  "--debug",
50409
50753
  ...remainingArgs
50410
50754
  ].flat(),
50411
- {
50412
- stdio: "pipe"
50413
- }
50755
+ { stdio: "pipe", detached: true }
50414
50756
  );
50415
50757
  if (loggingEnabled) {
50416
- child.stderr.pipe(process.stderr);
50417
- }
50418
- if (debugEnabled) {
50419
- child.stdout.pipe(process.stdout);
50758
+ child.stderr.on("data", (chunk) => {
50759
+ console.log(chunk.toString());
50760
+ });
50420
50761
  }
50421
- const cleanupConfig = {
50422
- child,
50423
- configPath: tempDir,
50424
- killFn: import_tree_kill.default,
50425
- state: {
50426
- isDead: false
50762
+ const removeSideffects = () => {
50763
+ child.stderr.removeAllListeners();
50764
+ if ((0, import_fs.existsSync)(tempDir)) {
50765
+ (0, import_fs.rmSync)(tempDir, { recursive: true });
50766
+ }
50767
+ };
50768
+ child.on("error", removeSideffects);
50769
+ child.on("exit", removeSideffects);
50770
+ const childState = {
50771
+ isDead: false
50772
+ };
50773
+ const cleanup = () => {
50774
+ if (childState.isDead) {
50775
+ return;
50776
+ }
50777
+ childState.isDead = true;
50778
+ removeSideffects();
50779
+ if (child.pid !== void 0) {
50780
+ try {
50781
+ process.kill(-child.pid);
50782
+ } catch (e) {
50783
+ const error = e;
50784
+ if (error.code === "ESRCH") {
50785
+ console.log(
50786
+ `fuel-core node under pid ${child.pid} does not exist. The node might have been killed before cleanup was called. Exiting cleanly.`
50787
+ );
50788
+ } else {
50789
+ throw e;
50790
+ }
50791
+ }
50792
+ } else {
50793
+ console.error("No PID available for the child process, unable to kill launched node");
50427
50794
  }
50428
50795
  };
50429
50796
  child.stderr.on("data", (chunk) => {
@@ -50433,23 +50800,25 @@ Supported fuel-core version: ${supportedVersion}.`
50433
50800
  const rowWithUrl = rows.find((row) => row.indexOf(graphQLStartSubstring) !== -1);
50434
50801
  const [realIp, realPort] = rowWithUrl.split(" ").at(-1).trim().split(":");
50435
50802
  resolve({
50436
- cleanup: () => killNode(cleanupConfig),
50803
+ cleanup,
50437
50804
  ip: realIp,
50438
50805
  port: realPort,
50439
50806
  url: `http://${realIp}:${realPort}/v1/graphql`,
50440
- snapshotDir: snapshotDirToUse
50807
+ snapshotDir: snapshotDirToUse,
50808
+ pid: child.pid
50441
50809
  });
50442
50810
  }
50443
50811
  if (/error/i.test(text)) {
50444
- reject(text.toString());
50812
+ console.log(text);
50813
+ reject(new FuelError(FuelError.CODES.NODE_LAUNCH_FAILED, text));
50445
50814
  }
50446
50815
  });
50447
- process.on("exit", () => killNode(cleanupConfig));
50448
- process.on("SIGINT", () => killNode(cleanupConfig));
50449
- process.on("SIGUSR1", () => killNode(cleanupConfig));
50450
- process.on("SIGUSR2", () => killNode(cleanupConfig));
50451
- process.on("beforeExit", () => killNode(cleanupConfig));
50452
- process.on("uncaughtException", () => killNode(cleanupConfig));
50816
+ process.on("exit", cleanup);
50817
+ process.on("SIGINT", cleanup);
50818
+ process.on("SIGUSR1", cleanup);
50819
+ process.on("SIGUSR2", cleanup);
50820
+ process.on("beforeExit", cleanup);
50821
+ process.on("uncaughtException", cleanup);
50453
50822
  child.on("error", reject);
50454
50823
  })
50455
50824
  );
@@ -50483,7 +50852,7 @@ Supported fuel-core version: ${supportedVersion}.`
50483
50852
  static random(count = 1) {
50484
50853
  const assetIds = [];
50485
50854
  for (let i = 0; i < count; i++) {
50486
- assetIds.push(new _AssetId(hexlify(randomBytes22(32))));
50855
+ assetIds.push(new _AssetId(hexlify(randomBytes2(32))));
50487
50856
  }
50488
50857
  return assetIds;
50489
50858
  }
@@ -50504,7 +50873,7 @@ Supported fuel-core version: ${supportedVersion}.`
50504
50873
  generateWallets = () => {
50505
50874
  const generatedWallets = [];
50506
50875
  for (let index = 1; index <= this.options.count; index++) {
50507
- generatedWallets.push(new WalletUnlocked(randomBytes22(32)));
50876
+ generatedWallets.push(new WalletUnlocked(randomBytes2(32)));
50508
50877
  }
50509
50878
  return generatedWallets;
50510
50879
  };
@@ -50561,7 +50930,7 @@ Supported fuel-core version: ${supportedVersion}.`
50561
50930
  tx_pointer_block_height: 0,
50562
50931
  tx_pointer_tx_idx: 0,
50563
50932
  output_index: 0,
50564
- tx_id: hexlify(randomBytes22(32))
50933
+ tx_id: hexlify(randomBytes2(32))
50565
50934
  });
50566
50935
  }
50567
50936
  });
@@ -50612,7 +50981,8 @@ Supported fuel-core version: ${supportedVersion}.`
50612
50981
  async function setupTestProviderAndWallets({
50613
50982
  walletsConfig: walletsConfigOptions = {},
50614
50983
  providerOptions,
50615
- nodeOptions = {}
50984
+ nodeOptions = {},
50985
+ launchNodeServerPort = process.env.LAUNCH_NODE_SERVER_PORT || void 0
50616
50986
  } = {}) {
50617
50987
  Symbol.dispose ??= Symbol("Symbol.dispose");
50618
50988
  const walletsConfig = new WalletsConfig(
@@ -50622,7 +50992,7 @@ Supported fuel-core version: ${supportedVersion}.`
50622
50992
  ...walletsConfigOptions
50623
50993
  }
50624
50994
  );
50625
- const { cleanup, url } = await launchNode({
50995
+ const launchNodeOptions = {
50626
50996
  loggingEnabled: false,
50627
50997
  ...nodeOptions,
50628
50998
  snapshotConfig: mergeDeepRight_default(
@@ -50630,7 +51000,20 @@ Supported fuel-core version: ${supportedVersion}.`
50630
51000
  walletsConfig.apply(nodeOptions?.snapshotConfig)
50631
51001
  ),
50632
51002
  port: "0"
50633
- });
51003
+ };
51004
+ let cleanup;
51005
+ let url;
51006
+ if (launchNodeServerPort) {
51007
+ const serverUrl = `http://localhost:${launchNodeServerPort}`;
51008
+ url = await (await fetch(serverUrl, { method: "POST", body: JSON.stringify(launchNodeOptions) })).text();
51009
+ cleanup = () => {
51010
+ fetch(`${serverUrl}/cleanup/${url}`);
51011
+ };
51012
+ } else {
51013
+ const settings = await launchNode(launchNodeOptions);
51014
+ url = settings.url;
51015
+ cleanup = settings.cleanup;
51016
+ }
50634
51017
  let provider;
50635
51018
  try {
50636
51019
  provider = await Provider.create(url, providerOptions);
@@ -50667,7 +51050,7 @@ Supported fuel-core version: ${supportedVersion}.`
50667
51050
  constructor({
50668
51051
  sender = Address.fromRandom(),
50669
51052
  recipient = Address.fromRandom(),
50670
- nonce = hexlify(randomBytes22(32)),
51053
+ nonce = hexlify(randomBytes2(32)),
50671
51054
  amount = 1e6,
50672
51055
  data = "02",
50673
51056
  da_height = 0
@@ -50715,6 +51098,9 @@ mime-types/index.js:
50715
51098
  @noble/curves/esm/abstract/utils.js:
50716
51099
  (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
50717
51100
 
51101
+ @noble/hashes/esm/utils.js:
51102
+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
51103
+
50718
51104
  @noble/curves/esm/abstract/modular.js:
50719
51105
  (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
50720
51106