@fuel-ts/account 0.94.5 → 0.94.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configs.d.ts +6 -0
- package/dist/configs.d.ts.map +1 -1
- package/dist/configs.global.js.map +1 -1
- package/dist/configs.js.map +1 -1
- package/dist/configs.mjs.map +1 -1
- package/dist/connectors/fuel-connector.d.ts +3 -4
- package/dist/connectors/fuel-connector.d.ts.map +1 -1
- package/dist/connectors/types/data-type.d.ts +7 -0
- package/dist/connectors/types/data-type.d.ts.map +1 -1
- package/dist/connectors/types/local-storage.d.ts +0 -1
- package/dist/connectors/types/local-storage.d.ts.map +1 -1
- package/dist/index.global.js +1620 -967
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +1308 -405
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1237 -338
- package/dist/index.mjs.map +1 -1
- package/dist/providers/__generated__/operations.d.ts.map +1 -1
- package/dist/providers/assets/assets.d.ts +1 -1
- package/dist/providers/assets/assets.d.ts.map +1 -1
- package/dist/providers/assets/utils/network.d.ts.map +1 -1
- package/dist/providers/assets/utils/resolveIconPaths.d.ts +1 -1
- package/dist/providers/chains.d.ts +2 -0
- package/dist/providers/chains.d.ts.map +1 -1
- package/dist/providers/fuel-graphql-subscriber.d.ts +0 -2
- package/dist/providers/fuel-graphql-subscriber.d.ts.map +1 -1
- package/dist/providers/message.d.ts.map +1 -1
- package/dist/providers/provider.d.ts +8 -3
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/resource.d.ts.map +1 -1
- package/dist/providers/transaction-request/helpers.d.ts.map +1 -1
- package/dist/providers/transaction-request/index.d.ts +2 -0
- package/dist/providers/transaction-request/index.d.ts.map +1 -1
- package/dist/providers/transaction-request/transaction-request.d.ts +2 -2
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/types.d.ts +8 -2
- package/dist/providers/transaction-request/types.d.ts.map +1 -1
- package/dist/providers/transaction-request/upgrade-transaction-request.d.ts +87 -0
- package/dist/providers/transaction-request/upgrade-transaction-request.d.ts.map +1 -0
- package/dist/providers/transaction-request/upload-transaction-request.d.ts +82 -0
- package/dist/providers/transaction-request/upload-transaction-request.d.ts.map +1 -0
- package/dist/providers/transaction-request/utils.d.ts +6 -0
- package/dist/providers/transaction-request/utils.d.ts.map +1 -1
- package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -1
- package/dist/providers/transaction-summary/input.d.ts.map +1 -1
- package/dist/providers/transaction-summary/operations.d.ts.map +1 -1
- package/dist/providers/transaction-summary/output.d.ts.map +1 -1
- package/dist/providers/transaction-summary/receipt.d.ts.map +1 -1
- package/dist/providers/utils/extract-tx-error.d.ts.map +1 -1
- package/dist/providers/utils/gas.d.ts +16 -0
- package/dist/providers/utils/gas.d.ts.map +1 -1
- package/dist/providers/utils/receipts.d.ts.map +1 -1
- package/dist/test-utils/launchNode.d.ts.map +1 -1
- package/dist/test-utils/resources.d.ts.map +1 -1
- package/dist/test-utils/transactionRequest.d.ts.map +1 -1
- package/dist/test-utils.global.js +1614 -963
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +1219 -332
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +1161 -271
- package/dist/test-utils.mjs.map +1 -1
- package/dist/wallet-manager/wallet-manager.d.ts +0 -1
- package/dist/wallet-manager/wallet-manager.d.ts.map +1 -1
- package/package.json +18 -17
package/dist/index.global.js
CHANGED
@@ -85,20 +85,20 @@
|
|
85
85
|
ctor.prototype = new TempCtor();
|
86
86
|
ctor.prototype.constructor = ctor;
|
87
87
|
}
|
88
|
-
function BN2(
|
89
|
-
if (BN2.isBN(
|
90
|
-
return
|
88
|
+
function BN2(number2, base, endian) {
|
89
|
+
if (BN2.isBN(number2)) {
|
90
|
+
return number2;
|
91
91
|
}
|
92
92
|
this.negative = 0;
|
93
93
|
this.words = null;
|
94
94
|
this.length = 0;
|
95
95
|
this.red = null;
|
96
|
-
if (
|
96
|
+
if (number2 !== null) {
|
97
97
|
if (base === "le" || base === "be") {
|
98
98
|
endian = base;
|
99
99
|
base = 10;
|
100
100
|
}
|
101
|
-
this._init(
|
101
|
+
this._init(number2 || 0, base || 10, endian || "be");
|
102
102
|
}
|
103
103
|
}
|
104
104
|
if (typeof module2 === "object") {
|
@@ -133,53 +133,53 @@
|
|
133
133
|
return left;
|
134
134
|
return right;
|
135
135
|
};
|
136
|
-
BN2.prototype._init = function init(
|
137
|
-
if (typeof
|
138
|
-
return this._initNumber(
|
136
|
+
BN2.prototype._init = function init(number2, base, endian) {
|
137
|
+
if (typeof number2 === "number") {
|
138
|
+
return this._initNumber(number2, base, endian);
|
139
139
|
}
|
140
|
-
if (typeof
|
141
|
-
return this._initArray(
|
140
|
+
if (typeof number2 === "object") {
|
141
|
+
return this._initArray(number2, base, endian);
|
142
142
|
}
|
143
143
|
if (base === "hex") {
|
144
144
|
base = 16;
|
145
145
|
}
|
146
146
|
assert2(base === (base | 0) && base >= 2 && base <= 36);
|
147
|
-
|
147
|
+
number2 = number2.toString().replace(/\s+/g, "");
|
148
148
|
var start = 0;
|
149
|
-
if (
|
149
|
+
if (number2[0] === "-") {
|
150
150
|
start++;
|
151
151
|
this.negative = 1;
|
152
152
|
}
|
153
|
-
if (start <
|
153
|
+
if (start < number2.length) {
|
154
154
|
if (base === 16) {
|
155
|
-
this._parseHex(
|
155
|
+
this._parseHex(number2, start, endian);
|
156
156
|
} else {
|
157
|
-
this._parseBase(
|
157
|
+
this._parseBase(number2, base, start);
|
158
158
|
if (endian === "le") {
|
159
159
|
this._initArray(this.toArray(), base, endian);
|
160
160
|
}
|
161
161
|
}
|
162
162
|
}
|
163
163
|
};
|
164
|
-
BN2.prototype._initNumber = function _initNumber(
|
165
|
-
if (
|
164
|
+
BN2.prototype._initNumber = function _initNumber(number2, base, endian) {
|
165
|
+
if (number2 < 0) {
|
166
166
|
this.negative = 1;
|
167
|
-
|
167
|
+
number2 = -number2;
|
168
168
|
}
|
169
|
-
if (
|
170
|
-
this.words = [
|
169
|
+
if (number2 < 67108864) {
|
170
|
+
this.words = [number2 & 67108863];
|
171
171
|
this.length = 1;
|
172
|
-
} else if (
|
172
|
+
} else if (number2 < 4503599627370496) {
|
173
173
|
this.words = [
|
174
|
-
|
175
|
-
|
174
|
+
number2 & 67108863,
|
175
|
+
number2 / 67108864 & 67108863
|
176
176
|
];
|
177
177
|
this.length = 2;
|
178
178
|
} else {
|
179
|
-
assert2(
|
179
|
+
assert2(number2 < 9007199254740992);
|
180
180
|
this.words = [
|
181
|
-
|
182
|
-
|
181
|
+
number2 & 67108863,
|
182
|
+
number2 / 67108864 & 67108863,
|
183
183
|
1
|
184
184
|
];
|
185
185
|
this.length = 3;
|
@@ -188,14 +188,14 @@
|
|
188
188
|
return;
|
189
189
|
this._initArray(this.toArray(), base, endian);
|
190
190
|
};
|
191
|
-
BN2.prototype._initArray = function _initArray(
|
192
|
-
assert2(typeof
|
193
|
-
if (
|
191
|
+
BN2.prototype._initArray = function _initArray(number2, base, endian) {
|
192
|
+
assert2(typeof number2.length === "number");
|
193
|
+
if (number2.length <= 0) {
|
194
194
|
this.words = [0];
|
195
195
|
this.length = 1;
|
196
196
|
return this;
|
197
197
|
}
|
198
|
-
this.length = Math.ceil(
|
198
|
+
this.length = Math.ceil(number2.length / 3);
|
199
199
|
this.words = new Array(this.length);
|
200
200
|
for (var i = 0; i < this.length; i++) {
|
201
201
|
this.words[i] = 0;
|
@@ -203,8 +203,8 @@
|
|
203
203
|
var j, w;
|
204
204
|
var off = 0;
|
205
205
|
if (endian === "be") {
|
206
|
-
for (i =
|
207
|
-
w =
|
206
|
+
for (i = number2.length - 1, j = 0; i >= 0; i -= 3) {
|
207
|
+
w = number2[i] | number2[i - 1] << 8 | number2[i - 2] << 16;
|
208
208
|
this.words[j] |= w << off & 67108863;
|
209
209
|
this.words[j + 1] = w >>> 26 - off & 67108863;
|
210
210
|
off += 24;
|
@@ -214,8 +214,8 @@
|
|
214
214
|
}
|
215
215
|
}
|
216
216
|
} else if (endian === "le") {
|
217
|
-
for (i = 0, j = 0; i <
|
218
|
-
w =
|
217
|
+
for (i = 0, j = 0; i < number2.length; i += 3) {
|
218
|
+
w = number2[i] | number2[i + 1] << 8 | number2[i + 2] << 16;
|
219
219
|
this.words[j] |= w << off & 67108863;
|
220
220
|
this.words[j + 1] = w >>> 26 - off & 67108863;
|
221
221
|
off += 24;
|
@@ -246,8 +246,8 @@
|
|
246
246
|
}
|
247
247
|
return r;
|
248
248
|
}
|
249
|
-
BN2.prototype._parseHex = function _parseHex(
|
250
|
-
this.length = Math.ceil((
|
249
|
+
BN2.prototype._parseHex = function _parseHex(number2, start, endian) {
|
250
|
+
this.length = Math.ceil((number2.length - start) / 6);
|
251
251
|
this.words = new Array(this.length);
|
252
252
|
for (var i = 0; i < this.length; i++) {
|
253
253
|
this.words[i] = 0;
|
@@ -256,8 +256,8 @@
|
|
256
256
|
var j = 0;
|
257
257
|
var w;
|
258
258
|
if (endian === "be") {
|
259
|
-
for (i =
|
260
|
-
w = parseHexByte(
|
259
|
+
for (i = number2.length - 1; i >= start; i -= 2) {
|
260
|
+
w = parseHexByte(number2, start, i) << off;
|
261
261
|
this.words[j] |= w & 67108863;
|
262
262
|
if (off >= 18) {
|
263
263
|
off -= 18;
|
@@ -268,9 +268,9 @@
|
|
268
268
|
}
|
269
269
|
}
|
270
270
|
} else {
|
271
|
-
var parseLength =
|
272
|
-
for (i = parseLength % 2 === 0 ? start + 1 : start; i <
|
273
|
-
w = parseHexByte(
|
271
|
+
var parseLength = number2.length - start;
|
272
|
+
for (i = parseLength % 2 === 0 ? start + 1 : start; i < number2.length; i += 2) {
|
273
|
+
w = parseHexByte(number2, start, i) << off;
|
274
274
|
this.words[j] |= w & 67108863;
|
275
275
|
if (off >= 18) {
|
276
276
|
off -= 18;
|
@@ -302,7 +302,7 @@
|
|
302
302
|
}
|
303
303
|
return r;
|
304
304
|
}
|
305
|
-
BN2.prototype._parseBase = function _parseBase(
|
305
|
+
BN2.prototype._parseBase = function _parseBase(number2, base, start) {
|
306
306
|
this.words = [0];
|
307
307
|
this.length = 1;
|
308
308
|
for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base) {
|
@@ -310,12 +310,12 @@
|
|
310
310
|
}
|
311
311
|
limbLen--;
|
312
312
|
limbPow = limbPow / base | 0;
|
313
|
-
var total =
|
313
|
+
var total = number2.length - start;
|
314
314
|
var mod2 = total % limbLen;
|
315
315
|
var end = Math.min(total, total - mod2) + start;
|
316
316
|
var word = 0;
|
317
317
|
for (var i = start; i < end; i += limbLen) {
|
318
|
-
word = parseBase(
|
318
|
+
word = parseBase(number2, i, i + limbLen, base);
|
319
319
|
this.imuln(limbPow);
|
320
320
|
if (this.words[0] + word < 67108864) {
|
321
321
|
this.words[0] += word;
|
@@ -325,7 +325,7 @@
|
|
325
325
|
}
|
326
326
|
if (mod2 !== 0) {
|
327
327
|
var pow3 = 1;
|
328
|
-
word = parseBase(
|
328
|
+
word = parseBase(number2, i, number2.length, base);
|
329
329
|
for (i = 0; i < mod2; i++) {
|
330
330
|
pow3 *= base;
|
331
331
|
}
|
@@ -2651,20 +2651,20 @@
|
|
2651
2651
|
);
|
2652
2652
|
}
|
2653
2653
|
inherits(K256, MPrime);
|
2654
|
-
K256.prototype.split = function split2(input,
|
2654
|
+
K256.prototype.split = function split2(input, output2) {
|
2655
2655
|
var mask = 4194303;
|
2656
2656
|
var outLen = Math.min(input.length, 9);
|
2657
2657
|
for (var i = 0; i < outLen; i++) {
|
2658
|
-
|
2658
|
+
output2.words[i] = input.words[i];
|
2659
2659
|
}
|
2660
|
-
|
2660
|
+
output2.length = outLen;
|
2661
2661
|
if (input.length <= 9) {
|
2662
2662
|
input.words[0] = 0;
|
2663
2663
|
input.length = 1;
|
2664
2664
|
return;
|
2665
2665
|
}
|
2666
2666
|
var prev = input.words[9];
|
2667
|
-
|
2667
|
+
output2.words[output2.length++] = prev & mask;
|
2668
2668
|
for (i = 10; i < input.length; i++) {
|
2669
2669
|
var next = input.words[i] | 0;
|
2670
2670
|
input.words[i - 10] = (next & mask) << 4 | prev >>> 22;
|
@@ -3060,8 +3060,8 @@
|
|
3060
3060
|
}
|
3061
3061
|
return result;
|
3062
3062
|
}
|
3063
|
-
function toWords(
|
3064
|
-
return convert2(
|
3063
|
+
function toWords(bytes2) {
|
3064
|
+
return convert2(bytes2, 8, 5, true);
|
3065
3065
|
}
|
3066
3066
|
function fromWordsUnsafe(words) {
|
3067
3067
|
const res = convert2(words, 5, 8, false);
|
@@ -3600,18 +3600,18 @@
|
|
3600
3600
|
}
|
3601
3601
|
function utf8PercentDecode(str) {
|
3602
3602
|
const input = new Buffer(str);
|
3603
|
-
const
|
3603
|
+
const output2 = [];
|
3604
3604
|
for (let i = 0; i < input.length; ++i) {
|
3605
3605
|
if (input[i] !== 37) {
|
3606
|
-
|
3606
|
+
output2.push(input[i]);
|
3607
3607
|
} else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) {
|
3608
|
-
|
3608
|
+
output2.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));
|
3609
3609
|
i += 2;
|
3610
3610
|
} else {
|
3611
|
-
|
3611
|
+
output2.push(input[i]);
|
3612
3612
|
}
|
3613
3613
|
}
|
3614
|
-
return new Buffer(
|
3614
|
+
return new Buffer(output2).toString();
|
3615
3615
|
}
|
3616
3616
|
function isC0ControlPercentEncode(c) {
|
3617
3617
|
return c <= 31 || c > 126;
|
@@ -3687,16 +3687,16 @@
|
|
3687
3687
|
return ipv4;
|
3688
3688
|
}
|
3689
3689
|
function serializeIPv4(address) {
|
3690
|
-
let
|
3690
|
+
let output2 = "";
|
3691
3691
|
let n = address;
|
3692
3692
|
for (let i = 1; i <= 4; ++i) {
|
3693
|
-
|
3693
|
+
output2 = String(n % 256) + output2;
|
3694
3694
|
if (i !== 4) {
|
3695
|
-
|
3695
|
+
output2 = "." + output2;
|
3696
3696
|
}
|
3697
3697
|
n = Math.floor(n / 256);
|
3698
3698
|
}
|
3699
|
-
return
|
3699
|
+
return output2;
|
3700
3700
|
}
|
3701
3701
|
function parseIPv6(input) {
|
3702
3702
|
const address = [0, 0, 0, 0, 0, 0, 0, 0];
|
@@ -3754,13 +3754,13 @@
|
|
3754
3754
|
return failure;
|
3755
3755
|
}
|
3756
3756
|
while (isASCIIDigit(input[pointer])) {
|
3757
|
-
const
|
3757
|
+
const number2 = parseInt(at(input, pointer));
|
3758
3758
|
if (ipv4Piece === null) {
|
3759
|
-
ipv4Piece =
|
3759
|
+
ipv4Piece = number2;
|
3760
3760
|
} else if (ipv4Piece === 0) {
|
3761
3761
|
return failure;
|
3762
3762
|
} else {
|
3763
|
-
ipv4Piece = ipv4Piece * 10 +
|
3763
|
+
ipv4Piece = ipv4Piece * 10 + number2;
|
3764
3764
|
}
|
3765
3765
|
if (ipv4Piece > 255) {
|
3766
3766
|
return failure;
|
@@ -3804,7 +3804,7 @@
|
|
3804
3804
|
return address;
|
3805
3805
|
}
|
3806
3806
|
function serializeIPv6(address) {
|
3807
|
-
let
|
3807
|
+
let output2 = "";
|
3808
3808
|
const seqResult = findLongestZeroSequence(address);
|
3809
3809
|
const compress = seqResult.idx;
|
3810
3810
|
let ignore0 = false;
|
@@ -3816,16 +3816,16 @@
|
|
3816
3816
|
}
|
3817
3817
|
if (compress === pieceIndex) {
|
3818
3818
|
const separator = pieceIndex === 0 ? "::" : ":";
|
3819
|
-
|
3819
|
+
output2 += separator;
|
3820
3820
|
ignore0 = true;
|
3821
3821
|
continue;
|
3822
3822
|
}
|
3823
|
-
|
3823
|
+
output2 += address[pieceIndex].toString(16);
|
3824
3824
|
if (pieceIndex !== 7) {
|
3825
|
-
|
3825
|
+
output2 += ":";
|
3826
3826
|
}
|
3827
3827
|
}
|
3828
|
-
return
|
3828
|
+
return output2;
|
3829
3829
|
}
|
3830
3830
|
function parseHost(input, isSpecialArg) {
|
3831
3831
|
if (input[0] === "[") {
|
@@ -3855,12 +3855,12 @@
|
|
3855
3855
|
if (containsForbiddenHostCodePointExcludingPercent(input)) {
|
3856
3856
|
return failure;
|
3857
3857
|
}
|
3858
|
-
let
|
3858
|
+
let output2 = "";
|
3859
3859
|
const decoded = punycode.ucs2.decode(input);
|
3860
3860
|
for (let i = 0; i < decoded.length; ++i) {
|
3861
|
-
|
3861
|
+
output2 += percentEncodeChar(decoded[i], isC0ControlPercentEncode);
|
3862
3862
|
}
|
3863
|
-
return
|
3863
|
+
return output2;
|
3864
3864
|
}
|
3865
3865
|
function findLongestZeroSequence(arr) {
|
3866
3866
|
let maxIdx = null;
|
@@ -4485,37 +4485,37 @@
|
|
4485
4485
|
return true;
|
4486
4486
|
};
|
4487
4487
|
function serializeURL(url, excludeFragment) {
|
4488
|
-
let
|
4488
|
+
let output2 = url.scheme + ":";
|
4489
4489
|
if (url.host !== null) {
|
4490
|
-
|
4490
|
+
output2 += "//";
|
4491
4491
|
if (url.username !== "" || url.password !== "") {
|
4492
|
-
|
4492
|
+
output2 += url.username;
|
4493
4493
|
if (url.password !== "") {
|
4494
|
-
|
4494
|
+
output2 += ":" + url.password;
|
4495
4495
|
}
|
4496
|
-
|
4496
|
+
output2 += "@";
|
4497
4497
|
}
|
4498
|
-
|
4498
|
+
output2 += serializeHost(url.host);
|
4499
4499
|
if (url.port !== null) {
|
4500
|
-
|
4500
|
+
output2 += ":" + url.port;
|
4501
4501
|
}
|
4502
4502
|
} else if (url.host === null && url.scheme === "file") {
|
4503
|
-
|
4503
|
+
output2 += "//";
|
4504
4504
|
}
|
4505
4505
|
if (url.cannotBeABaseURL) {
|
4506
|
-
|
4506
|
+
output2 += url.path[0];
|
4507
4507
|
} else {
|
4508
4508
|
for (const string of url.path) {
|
4509
|
-
|
4509
|
+
output2 += "/" + string;
|
4510
4510
|
}
|
4511
4511
|
}
|
4512
4512
|
if (url.query !== null) {
|
4513
|
-
|
4513
|
+
output2 += "?" + url.query;
|
4514
4514
|
}
|
4515
4515
|
if (!excludeFragment && url.fragment !== null) {
|
4516
|
-
|
4516
|
+
output2 += "#" + url.fragment;
|
4517
4517
|
}
|
4518
|
-
return
|
4518
|
+
return output2;
|
4519
4519
|
}
|
4520
4520
|
function serializeOrigin(tuple) {
|
4521
4521
|
let result = tuple.scheme + "://";
|
@@ -6459,19 +6459,19 @@
|
|
6459
6459
|
return "GraphQLError";
|
6460
6460
|
}
|
6461
6461
|
toString() {
|
6462
|
-
let
|
6462
|
+
let output2 = this.message;
|
6463
6463
|
if (this.nodes) {
|
6464
6464
|
for (const node of this.nodes) {
|
6465
6465
|
if (node.loc) {
|
6466
|
-
|
6466
|
+
output2 += "\n\n" + (0, _printLocation.printLocation)(node.loc);
|
6467
6467
|
}
|
6468
6468
|
}
|
6469
6469
|
} else if (this.source && this.locations) {
|
6470
6470
|
for (const location of this.locations) {
|
6471
|
-
|
6471
|
+
output2 += "\n\n" + (0, _printLocation.printSourceLocation)(this.source, location);
|
6472
6472
|
}
|
6473
6473
|
}
|
6474
|
-
return
|
6474
|
+
return output2;
|
6475
6475
|
}
|
6476
6476
|
toJSON() {
|
6477
6477
|
const formattedError = {
|
@@ -18788,7 +18788,7 @@ spurious results.`);
|
|
18788
18788
|
module.exports = iterate;
|
18789
18789
|
function iterate(list, iterator, state, callback) {
|
18790
18790
|
var key = state["keyedList"] ? state["keyedList"][state.index] : state.index;
|
18791
|
-
state.jobs[key] = runJob(iterator, key, list[key], function(error,
|
18791
|
+
state.jobs[key] = runJob(iterator, key, list[key], function(error, output2) {
|
18792
18792
|
if (!(key in state.jobs)) {
|
18793
18793
|
return;
|
18794
18794
|
}
|
@@ -18796,7 +18796,7 @@ spurious results.`);
|
|
18796
18796
|
if (error) {
|
18797
18797
|
abort(state);
|
18798
18798
|
} else {
|
18799
|
-
state.results[key] =
|
18799
|
+
state.results[key] = output2;
|
18800
18800
|
}
|
18801
18801
|
callback(error, state.results);
|
18802
18802
|
});
|
@@ -20558,8 +20558,8 @@ spurious results.`);
|
|
20558
20558
|
const ret3 = wasm$1.retd(addr, len);
|
20559
20559
|
return Instruction.__wrap(ret3);
|
20560
20560
|
}
|
20561
|
-
function aloc(
|
20562
|
-
const ret3 = wasm$1.aloc(
|
20561
|
+
function aloc(bytes2) {
|
20562
|
+
const ret3 = wasm$1.aloc(bytes2);
|
20563
20563
|
return Instruction.__wrap(ret3);
|
20564
20564
|
}
|
20565
20565
|
function mcl(dst_addr, len) {
|
@@ -21791,9 +21791,9 @@ spurious results.`);
|
|
21791
21791
|
* Construct the instruction from its parts.
|
21792
21792
|
* @param {RegId} bytes
|
21793
21793
|
*/
|
21794
|
-
constructor(
|
21795
|
-
_assertClass(
|
21796
|
-
var ptr0 =
|
21794
|
+
constructor(bytes2) {
|
21795
|
+
_assertClass(bytes2, RegId);
|
21796
|
+
var ptr0 = bytes2.__destroy_into_raw();
|
21797
21797
|
const ret3 = wasm$1.aloc_new_typescript(ptr0);
|
21798
21798
|
this.__wbg_ptr = ret3 >>> 0;
|
21799
21799
|
return this;
|
@@ -28464,8 +28464,8 @@ spurious results.`);
|
|
28464
28464
|
}
|
28465
28465
|
}
|
28466
28466
|
}
|
28467
|
-
const
|
28468
|
-
return await WebAssembly.instantiate(
|
28467
|
+
const bytes2 = await module2.arrayBuffer();
|
28468
|
+
return await WebAssembly.instantiate(bytes2, imports);
|
28469
28469
|
} else {
|
28470
28470
|
const instance = await WebAssembly.instantiate(module2, imports);
|
28471
28471
|
if (instance instanceof WebAssembly.Instance) {
|
@@ -28801,7 +28801,7 @@ spurious results.`);
|
|
28801
28801
|
return {
|
28802
28802
|
FORC: "0.63.5",
|
28803
28803
|
FUEL_CORE: "0.35.0",
|
28804
|
-
FUELS: "0.94.
|
28804
|
+
FUELS: "0.94.6"
|
28805
28805
|
};
|
28806
28806
|
}
|
28807
28807
|
function parseVersion(version) {
|
@@ -28884,6 +28884,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
28884
28884
|
ErrorCode2["MISSING_PROVIDER"] = "missing-provider";
|
28885
28885
|
ErrorCode2["INVALID_PROVIDER"] = "invalid-provider";
|
28886
28886
|
ErrorCode2["CONNECTION_REFUSED"] = "connection-refused";
|
28887
|
+
ErrorCode2["INVALID_URL"] = "invalid-url";
|
28887
28888
|
ErrorCode2["INVALID_PUBLIC_KEY"] = "invalid-public-key";
|
28888
28889
|
ErrorCode2["WALLET_MANAGER_ERROR"] = "wallet-manager-error";
|
28889
28890
|
ErrorCode2["HD_WALLET_ERROR"] = "hd-wallet-error";
|
@@ -29015,15 +29016,15 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
29015
29016
|
// ANCHOR: HELPERS
|
29016
29017
|
// make sure we always include `0x` in hex strings
|
29017
29018
|
toString(base, length) {
|
29018
|
-
const
|
29019
|
+
const output2 = super.toString(base, length);
|
29019
29020
|
if (base === 16 || base === "hex") {
|
29020
|
-
return `0x${
|
29021
|
+
return `0x${output2}`;
|
29021
29022
|
}
|
29022
|
-
return
|
29023
|
+
return output2;
|
29023
29024
|
}
|
29024
29025
|
toHex(bytesPadding) {
|
29025
|
-
const
|
29026
|
-
const bytesLength =
|
29026
|
+
const bytes2 = bytesPadding || 0;
|
29027
|
+
const bytesLength = bytes2 * 2;
|
29027
29028
|
if (this.isNeg()) {
|
29028
29029
|
throw new FuelError(ErrorCode.CONVERTING_FAILED, "Cannot convert negative value to hex.");
|
29029
29030
|
}
|
@@ -29134,21 +29135,21 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
29134
29135
|
// END ANCHOR: OVERRIDES to output our BN type
|
29135
29136
|
// ANCHOR: OVERRIDES to avoid losing references
|
29136
29137
|
caller(v, methodName) {
|
29137
|
-
const
|
29138
|
-
if (BN.isBN(
|
29139
|
-
return new BN(
|
29138
|
+
const output2 = super[methodName](new BN(v));
|
29139
|
+
if (BN.isBN(output2)) {
|
29140
|
+
return new BN(output2.toArray());
|
29140
29141
|
}
|
29141
|
-
if (typeof
|
29142
|
-
return
|
29142
|
+
if (typeof output2 === "boolean") {
|
29143
|
+
return output2;
|
29143
29144
|
}
|
29144
|
-
return
|
29145
|
+
return output2;
|
29145
29146
|
}
|
29146
29147
|
clone() {
|
29147
29148
|
return new BN(this.toArray());
|
29148
29149
|
}
|
29149
29150
|
mulTo(num, out) {
|
29150
|
-
const
|
29151
|
-
return new BN(
|
29151
|
+
const output2 = new import_bn.default(this.toArray()).mulTo(num, out);
|
29152
|
+
return new BN(output2.toArray());
|
29152
29153
|
}
|
29153
29154
|
egcd(p) {
|
29154
29155
|
const { a, b, gcd } = new import_bn.default(this.toArray()).egcd(p);
|
@@ -29206,15 +29207,15 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
29206
29207
|
__defNormalProp3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
29207
29208
|
return value;
|
29208
29209
|
};
|
29209
|
-
var chunkAndPadBytes = (
|
29210
|
+
var chunkAndPadBytes = (bytes2, chunkSize) => {
|
29210
29211
|
const chunks = [];
|
29211
|
-
for (let offset = 0; offset <
|
29212
|
+
for (let offset = 0; offset < bytes2.length; offset += chunkSize) {
|
29212
29213
|
const chunk = new Uint8Array(chunkSize);
|
29213
|
-
chunk.set(
|
29214
|
+
chunk.set(bytes2.slice(offset, offset + chunkSize));
|
29214
29215
|
chunks.push(chunk);
|
29215
29216
|
}
|
29216
29217
|
const lastChunk = chunks[chunks.length - 1];
|
29217
|
-
const remainingBytes =
|
29218
|
+
const remainingBytes = bytes2.length % chunkSize;
|
29218
29219
|
const paddedChunkLength = remainingBytes + (8 - remainingBytes % 8) % 8;
|
29219
29220
|
const newChunk = lastChunk.slice(0, paddedChunkLength);
|
29220
29221
|
chunks[chunks.length - 1] = newChunk;
|
@@ -29257,15 +29258,15 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29257
29258
|
return concatenated;
|
29258
29259
|
};
|
29259
29260
|
var concat = (arrays) => {
|
29260
|
-
const
|
29261
|
-
return concatBytes(
|
29261
|
+
const bytes2 = arrays.map((v) => arrayify(v));
|
29262
|
+
return concatBytes(bytes2);
|
29262
29263
|
};
|
29263
29264
|
var HexCharacters = "0123456789abcdef";
|
29264
29265
|
function hexlify(data) {
|
29265
|
-
const
|
29266
|
+
const bytes2 = arrayify(data);
|
29266
29267
|
let result = "0x";
|
29267
|
-
for (let i = 0; i <
|
29268
|
-
const v =
|
29268
|
+
for (let i = 0; i < bytes2.length; i++) {
|
29269
|
+
const v = bytes2[i];
|
29269
29270
|
result += HexCharacters[(v & 240) >> 4] + HexCharacters[v & 15];
|
29270
29271
|
}
|
29271
29272
|
return result;
|
@@ -29358,15 +29359,15 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29358
29359
|
return bn(result);
|
29359
29360
|
}
|
29360
29361
|
function encodeBase58(_value) {
|
29361
|
-
const
|
29362
|
-
let value = bn(
|
29362
|
+
const bytes2 = arrayify(_value);
|
29363
|
+
let value = bn(bytes2);
|
29363
29364
|
let result = "";
|
29364
29365
|
while (value.gt(BN_0)) {
|
29365
29366
|
result = Alphabet[Number(value.mod(BN_58))] + result;
|
29366
29367
|
value = value.div(BN_58);
|
29367
29368
|
}
|
29368
|
-
for (let i = 0; i <
|
29369
|
-
if (
|
29369
|
+
for (let i = 0; i < bytes2.length; i++) {
|
29370
|
+
if (bytes2[i]) {
|
29370
29371
|
break;
|
29371
29372
|
}
|
29372
29373
|
result = Alphabet[0] + result;
|
@@ -29382,11 +29383,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29382
29383
|
return result;
|
29383
29384
|
}
|
29384
29385
|
function dataSlice(data, start, end) {
|
29385
|
-
const
|
29386
|
-
if (end != null && end >
|
29386
|
+
const bytes2 = arrayify(data);
|
29387
|
+
if (end != null && end > bytes2.length) {
|
29387
29388
|
throw new FuelError(ErrorCode.INVALID_DATA, "cannot slice beyond data bounds");
|
29388
29389
|
}
|
29389
|
-
return hexlify(
|
29390
|
+
return hexlify(bytes2.slice(start == null ? 0 : start, end == null ? bytes2.length : end));
|
29390
29391
|
}
|
29391
29392
|
function toUtf8Bytes(stri, form = true) {
|
29392
29393
|
let str = stri;
|
@@ -29423,8 +29424,8 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29423
29424
|
}
|
29424
29425
|
return new Uint8Array(result);
|
29425
29426
|
}
|
29426
|
-
function onError(reason, offset,
|
29427
|
-
console.log(`invalid codepoint at offset ${offset}; ${reason}, bytes: ${
|
29427
|
+
function onError(reason, offset, bytes2, output2, badCodepoint) {
|
29428
|
+
console.log(`invalid codepoint at offset ${offset}; ${reason}, bytes: ${bytes2}`);
|
29428
29429
|
return offset;
|
29429
29430
|
}
|
29430
29431
|
function helper(codePoints) {
|
@@ -29440,11 +29441,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29440
29441
|
}).join("");
|
29441
29442
|
}
|
29442
29443
|
function getUtf8CodePoints(_bytes) {
|
29443
|
-
const
|
29444
|
+
const bytes2 = arrayify(_bytes, "bytes");
|
29444
29445
|
const result = [];
|
29445
29446
|
let i = 0;
|
29446
|
-
while (i <
|
29447
|
-
const c =
|
29447
|
+
while (i < bytes2.length) {
|
29448
|
+
const c = bytes2[i++];
|
29448
29449
|
if (c >> 7 === 0) {
|
29449
29450
|
result.push(c);
|
29450
29451
|
continue;
|
@@ -29462,21 +29463,21 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29462
29463
|
overlongMask = 65535;
|
29463
29464
|
} else {
|
29464
29465
|
if ((c & 192) === 128) {
|
29465
|
-
i += onError("UNEXPECTED_CONTINUE", i - 1,
|
29466
|
+
i += onError("UNEXPECTED_CONTINUE", i - 1, bytes2, result);
|
29466
29467
|
} else {
|
29467
|
-
i += onError("BAD_PREFIX", i - 1,
|
29468
|
+
i += onError("BAD_PREFIX", i - 1, bytes2, result);
|
29468
29469
|
}
|
29469
29470
|
continue;
|
29470
29471
|
}
|
29471
|
-
if (i - 1 + extraLength >=
|
29472
|
-
i += onError("OVERRUN", i - 1,
|
29472
|
+
if (i - 1 + extraLength >= bytes2.length) {
|
29473
|
+
i += onError("OVERRUN", i - 1, bytes2, result);
|
29473
29474
|
continue;
|
29474
29475
|
}
|
29475
29476
|
let res = c & (1 << 8 - extraLength - 1) - 1;
|
29476
29477
|
for (let j = 0; j < extraLength; j++) {
|
29477
|
-
const nextChar =
|
29478
|
+
const nextChar = bytes2[i];
|
29478
29479
|
if ((nextChar & 192) !== 128) {
|
29479
|
-
i += onError("MISSING_CONTINUE", i,
|
29480
|
+
i += onError("MISSING_CONTINUE", i, bytes2, result);
|
29480
29481
|
res = null;
|
29481
29482
|
break;
|
29482
29483
|
}
|
@@ -29487,47 +29488,47 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29487
29488
|
continue;
|
29488
29489
|
}
|
29489
29490
|
if (res > 1114111) {
|
29490
|
-
i += onError("OUT_OF_RANGE", i - 1 - extraLength,
|
29491
|
+
i += onError("OUT_OF_RANGE", i - 1 - extraLength, bytes2, result, res);
|
29491
29492
|
continue;
|
29492
29493
|
}
|
29493
29494
|
if (res >= 55296 && res <= 57343) {
|
29494
|
-
i += onError("UTF16_SURROGATE", i - 1 - extraLength,
|
29495
|
+
i += onError("UTF16_SURROGATE", i - 1 - extraLength, bytes2, result, res);
|
29495
29496
|
continue;
|
29496
29497
|
}
|
29497
29498
|
if (res <= overlongMask) {
|
29498
|
-
i += onError("OVERLONG", i - 1 - extraLength,
|
29499
|
+
i += onError("OVERLONG", i - 1 - extraLength, bytes2, result, res);
|
29499
29500
|
continue;
|
29500
29501
|
}
|
29501
29502
|
result.push(res);
|
29502
29503
|
}
|
29503
29504
|
return result;
|
29504
29505
|
}
|
29505
|
-
function toUtf8String(
|
29506
|
-
return helper(getUtf8CodePoints(
|
29506
|
+
function toUtf8String(bytes2) {
|
29507
|
+
return helper(getUtf8CodePoints(bytes2));
|
29507
29508
|
}
|
29508
29509
|
function assertUnreachable(_x) {
|
29509
29510
|
throw new Error("Didn't expect to get here");
|
29510
29511
|
}
|
29511
29512
|
|
29512
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.
|
29513
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/_assert.js
|
29513
29514
|
function number(n) {
|
29514
29515
|
if (!Number.isSafeInteger(n) || n < 0)
|
29515
|
-
throw new Error(`
|
29516
|
+
throw new Error(`positive integer expected, not ${n}`);
|
29516
29517
|
}
|
29517
29518
|
function isBytes(a) {
|
29518
29519
|
return a instanceof Uint8Array || a != null && typeof a === "object" && a.constructor.name === "Uint8Array";
|
29519
29520
|
}
|
29520
29521
|
function bytes(b, ...lengths) {
|
29521
29522
|
if (!isBytes(b))
|
29522
|
-
throw new Error("
|
29523
|
+
throw new Error("Uint8Array expected");
|
29523
29524
|
if (lengths.length > 0 && !lengths.includes(b.length))
|
29524
|
-
throw new Error(`
|
29525
|
+
throw new Error(`Uint8Array expected of length ${lengths}, not of length=${b.length}`);
|
29525
29526
|
}
|
29526
|
-
function hash(
|
29527
|
-
if (typeof
|
29527
|
+
function hash(h) {
|
29528
|
+
if (typeof h !== "function" || typeof h.create !== "function")
|
29528
29529
|
throw new Error("Hash should be wrapped by utils.wrapConstructor");
|
29529
|
-
number(
|
29530
|
-
number(
|
29530
|
+
number(h.outputLen);
|
29531
|
+
number(h.blockLen);
|
29531
29532
|
}
|
29532
29533
|
function exists(instance, checkFinished = true) {
|
29533
29534
|
if (instance.destroyed)
|
@@ -29543,16 +29544,22 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29543
29544
|
}
|
29544
29545
|
}
|
29545
29546
|
|
29546
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.
|
29547
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/cryptoNode.js
|
29548
|
+
var nc = __toESM(__require("crypto"), 1);
|
29549
|
+
var crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && "randomBytes" in nc ? nc : void 0;
|
29550
|
+
|
29551
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/utils.js
|
29547
29552
|
var u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
29548
|
-
function isBytes2(a) {
|
29549
|
-
return a instanceof Uint8Array || a != null && typeof a === "object" && a.constructor.name === "Uint8Array";
|
29550
|
-
}
|
29551
29553
|
var createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
|
29552
29554
|
var rotr = (word, shift) => word << 32 - shift | word >>> shift;
|
29555
|
+
var rotl = (word, shift) => word << shift | word >>> 32 - shift >>> 0;
|
29553
29556
|
var isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
29554
|
-
|
29555
|
-
|
29557
|
+
var byteSwap = (word) => word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
|
29558
|
+
function byteSwap32(arr) {
|
29559
|
+
for (let i = 0; i < arr.length; i++) {
|
29560
|
+
arr[i] = byteSwap(arr[i]);
|
29561
|
+
}
|
29562
|
+
}
|
29556
29563
|
function utf8ToBytes(str) {
|
29557
29564
|
if (typeof str !== "string")
|
29558
29565
|
throw new Error(`utf8ToBytes expected string, got ${typeof str}`);
|
@@ -29561,10 +29568,24 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29561
29568
|
function toBytes2(data) {
|
29562
29569
|
if (typeof data === "string")
|
29563
29570
|
data = utf8ToBytes(data);
|
29564
|
-
|
29565
|
-
throw new Error(`expected Uint8Array, got ${typeof data}`);
|
29571
|
+
bytes(data);
|
29566
29572
|
return data;
|
29567
29573
|
}
|
29574
|
+
function concatBytes2(...arrays) {
|
29575
|
+
let sum = 0;
|
29576
|
+
for (let i = 0; i < arrays.length; i++) {
|
29577
|
+
const a = arrays[i];
|
29578
|
+
bytes(a);
|
29579
|
+
sum += a.length;
|
29580
|
+
}
|
29581
|
+
const res = new Uint8Array(sum);
|
29582
|
+
for (let i = 0, pad = 0; i < arrays.length; i++) {
|
29583
|
+
const a = arrays[i];
|
29584
|
+
res.set(a, pad);
|
29585
|
+
pad += a.length;
|
29586
|
+
}
|
29587
|
+
return res;
|
29588
|
+
}
|
29568
29589
|
var Hash = class {
|
29569
29590
|
// Safe version that clones internal state
|
29570
29591
|
clone() {
|
@@ -29594,27 +29615,38 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29594
29615
|
hashC.create = (opts) => hashCons(opts);
|
29595
29616
|
return hashC;
|
29596
29617
|
}
|
29618
|
+
function randomBytes(bytesLength = 32) {
|
29619
|
+
if (crypto && typeof crypto.getRandomValues === "function") {
|
29620
|
+
return crypto.getRandomValues(new Uint8Array(bytesLength));
|
29621
|
+
}
|
29622
|
+
if (crypto && typeof crypto.randomBytes === "function") {
|
29623
|
+
return crypto.randomBytes(bytesLength);
|
29624
|
+
}
|
29625
|
+
throw new Error("crypto.getRandomValues must be defined");
|
29626
|
+
}
|
29597
29627
|
|
29598
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.
|
29599
|
-
function setBigUint64(view, byteOffset, value,
|
29628
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/_md.js
|
29629
|
+
function setBigUint64(view, byteOffset, value, isLE2) {
|
29600
29630
|
if (typeof view.setBigUint64 === "function")
|
29601
|
-
return view.setBigUint64(byteOffset, value,
|
29631
|
+
return view.setBigUint64(byteOffset, value, isLE2);
|
29602
29632
|
const _32n2 = BigInt(32);
|
29603
29633
|
const _u32_max = BigInt(4294967295);
|
29604
29634
|
const wh = Number(value >> _32n2 & _u32_max);
|
29605
29635
|
const wl = Number(value & _u32_max);
|
29606
|
-
const h =
|
29607
|
-
const l =
|
29608
|
-
view.setUint32(byteOffset + h, wh,
|
29609
|
-
view.setUint32(byteOffset + l, wl,
|
29636
|
+
const h = isLE2 ? 4 : 0;
|
29637
|
+
const l = isLE2 ? 0 : 4;
|
29638
|
+
view.setUint32(byteOffset + h, wh, isLE2);
|
29639
|
+
view.setUint32(byteOffset + l, wl, isLE2);
|
29610
29640
|
}
|
29611
|
-
var
|
29612
|
-
|
29641
|
+
var Chi = (a, b, c) => a & b ^ ~a & c;
|
29642
|
+
var Maj = (a, b, c) => a & b ^ a & c ^ b & c;
|
29643
|
+
var HashMD = class extends Hash {
|
29644
|
+
constructor(blockLen, outputLen, padOffset, isLE2) {
|
29613
29645
|
super();
|
29614
29646
|
this.blockLen = blockLen;
|
29615
29647
|
this.outputLen = outputLen;
|
29616
29648
|
this.padOffset = padOffset;
|
29617
|
-
this.isLE =
|
29649
|
+
this.isLE = isLE2;
|
29618
29650
|
this.finished = false;
|
29619
29651
|
this.length = 0;
|
29620
29652
|
this.pos = 0;
|
@@ -29651,7 +29683,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29651
29683
|
exists(this);
|
29652
29684
|
output(out, this);
|
29653
29685
|
this.finished = true;
|
29654
|
-
const { buffer, view, blockLen, isLE:
|
29686
|
+
const { buffer, view, blockLen, isLE: isLE2 } = this;
|
29655
29687
|
let { pos } = this;
|
29656
29688
|
buffer[pos++] = 128;
|
29657
29689
|
this.buffer.subarray(pos).fill(0);
|
@@ -29661,7 +29693,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29661
29693
|
}
|
29662
29694
|
for (let i = pos; i < blockLen; i++)
|
29663
29695
|
buffer[i] = 0;
|
29664
|
-
setBigUint64(view, blockLen - 8, BigInt(this.length * 8),
|
29696
|
+
setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE2);
|
29665
29697
|
this.process(view, 0);
|
29666
29698
|
const oview = createView(out);
|
29667
29699
|
const len = this.outputLen;
|
@@ -29672,7 +29704,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29672
29704
|
if (outLen > state.length)
|
29673
29705
|
throw new Error("_sha2: outputLen bigger than state");
|
29674
29706
|
for (let i = 0; i < outLen; i++)
|
29675
|
-
oview.setUint32(4 * i, state[i],
|
29707
|
+
oview.setUint32(4 * i, state[i], isLE2);
|
29676
29708
|
}
|
29677
29709
|
digest() {
|
29678
29710
|
const { buffer, outputLen } = this;
|
@@ -29695,9 +29727,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29695
29727
|
}
|
29696
29728
|
};
|
29697
29729
|
|
29698
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.
|
29699
|
-
var Chi = (a, b, c) => a & b ^ ~a & c;
|
29700
|
-
var Maj = (a, b, c) => a & b ^ a & c ^ b & c;
|
29730
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/sha256.js
|
29701
29731
|
var SHA256_K = /* @__PURE__ */ new Uint32Array([
|
29702
29732
|
1116352408,
|
29703
29733
|
1899447441,
|
@@ -29764,7 +29794,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29764
29794
|
3204031479,
|
29765
29795
|
3329325298
|
29766
29796
|
]);
|
29767
|
-
var
|
29797
|
+
var SHA256_IV = /* @__PURE__ */ new Uint32Array([
|
29768
29798
|
1779033703,
|
29769
29799
|
3144134277,
|
29770
29800
|
1013904242,
|
@@ -29775,17 +29805,17 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29775
29805
|
1541459225
|
29776
29806
|
]);
|
29777
29807
|
var SHA256_W = /* @__PURE__ */ new Uint32Array(64);
|
29778
|
-
var SHA256 = class extends
|
29808
|
+
var SHA256 = class extends HashMD {
|
29779
29809
|
constructor() {
|
29780
29810
|
super(64, 32, 8, false);
|
29781
|
-
this.A =
|
29782
|
-
this.B =
|
29783
|
-
this.C =
|
29784
|
-
this.D =
|
29785
|
-
this.E =
|
29786
|
-
this.F =
|
29787
|
-
this.G =
|
29788
|
-
this.H =
|
29811
|
+
this.A = SHA256_IV[0] | 0;
|
29812
|
+
this.B = SHA256_IV[1] | 0;
|
29813
|
+
this.C = SHA256_IV[2] | 0;
|
29814
|
+
this.D = SHA256_IV[3] | 0;
|
29815
|
+
this.E = SHA256_IV[4] | 0;
|
29816
|
+
this.F = SHA256_IV[5] | 0;
|
29817
|
+
this.G = SHA256_IV[6] | 0;
|
29818
|
+
this.H = SHA256_IV[7] | 0;
|
29789
29819
|
}
|
29790
29820
|
get() {
|
29791
29821
|
const { A, B, C, D, E, F, G, H } = this;
|
@@ -29847,26 +29877,26 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29847
29877
|
};
|
29848
29878
|
var sha256 = /* @__PURE__ */ wrapConstructor(() => new SHA256());
|
29849
29879
|
|
29850
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.
|
29880
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/hmac.js
|
29851
29881
|
var HMAC = class extends Hash {
|
29852
|
-
constructor(
|
29882
|
+
constructor(hash3, _key) {
|
29853
29883
|
super();
|
29854
29884
|
this.finished = false;
|
29855
29885
|
this.destroyed = false;
|
29856
|
-
hash(
|
29886
|
+
hash(hash3);
|
29857
29887
|
const key = toBytes2(_key);
|
29858
|
-
this.iHash =
|
29888
|
+
this.iHash = hash3.create();
|
29859
29889
|
if (typeof this.iHash.update !== "function")
|
29860
29890
|
throw new Error("Expected instance of class which extends utils.Hash");
|
29861
29891
|
this.blockLen = this.iHash.blockLen;
|
29862
29892
|
this.outputLen = this.iHash.outputLen;
|
29863
29893
|
const blockLen = this.blockLen;
|
29864
29894
|
const pad = new Uint8Array(blockLen);
|
29865
|
-
pad.set(key.length > blockLen ?
|
29895
|
+
pad.set(key.length > blockLen ? hash3.create().update(key).digest() : key);
|
29866
29896
|
for (let i = 0; i < pad.length; i++)
|
29867
29897
|
pad[i] ^= 54;
|
29868
29898
|
this.iHash.update(pad);
|
29869
|
-
this.oHash =
|
29899
|
+
this.oHash = hash3.create();
|
29870
29900
|
for (let i = 0; i < pad.length; i++)
|
29871
29901
|
pad[i] ^= 54 ^ 92;
|
29872
29902
|
this.oHash.update(pad);
|
@@ -29909,12 +29939,12 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29909
29939
|
this.iHash.destroy();
|
29910
29940
|
}
|
29911
29941
|
};
|
29912
|
-
var hmac = (
|
29913
|
-
hmac.create = (
|
29942
|
+
var hmac = (hash3, key, message) => new HMAC(hash3, key).update(message).digest();
|
29943
|
+
hmac.create = (hash3, key) => new HMAC(hash3, key);
|
29914
29944
|
|
29915
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.
|
29916
|
-
function pbkdf2Init(
|
29917
|
-
hash(
|
29945
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/pbkdf2.js
|
29946
|
+
function pbkdf2Init(hash3, _password, _salt, _opts) {
|
29947
|
+
hash(hash3);
|
29918
29948
|
const opts = checkOpts({ dkLen: 32, asyncTick: 10 }, _opts);
|
29919
29949
|
const { c, dkLen, asyncTick } = opts;
|
29920
29950
|
number(c);
|
@@ -29925,7 +29955,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29925
29955
|
const password = toBytes2(_password);
|
29926
29956
|
const salt = toBytes2(_salt);
|
29927
29957
|
const DK = new Uint8Array(dkLen);
|
29928
|
-
const PRF = hmac.create(
|
29958
|
+
const PRF = hmac.create(hash3, password);
|
29929
29959
|
const PRFSalt = PRF._cloneInto().update(salt);
|
29930
29960
|
return { c, dkLen, asyncTick, DK, PRF, PRFSalt };
|
29931
29961
|
}
|
@@ -29937,8 +29967,8 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29937
29967
|
u.fill(0);
|
29938
29968
|
return DK;
|
29939
29969
|
}
|
29940
|
-
function pbkdf2(
|
29941
|
-
const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(
|
29970
|
+
function pbkdf2(hash3, password, salt, opts) {
|
29971
|
+
const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash3, password, salt, opts);
|
29942
29972
|
let prfW;
|
29943
29973
|
const arr = new Uint8Array(4);
|
29944
29974
|
const view = createView(arr);
|
@@ -29957,8 +29987,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
29957
29987
|
return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
|
29958
29988
|
}
|
29959
29989
|
|
29960
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.
|
29961
|
-
var rotl = (a, b) => a << b | a >>> 32 - b;
|
29990
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/scrypt.js
|
29962
29991
|
function XorAndSalsa(prev, pi, input, ii, out, oi) {
|
29963
29992
|
let y00 = prev[pi++] ^ input[ii++], y01 = prev[pi++] ^ input[ii++];
|
29964
29993
|
let y02 = prev[pi++] ^ input[ii++], y03 = prev[pi++] ^ input[ii++];
|
@@ -30049,8 +30078,8 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30049
30078
|
throw new Error("progressCb should be function");
|
30050
30079
|
const blockSize = 128 * r;
|
30051
30080
|
const blockSize32 = blockSize / 4;
|
30052
|
-
if (N <= 1 || (N & N - 1) !== 0 || N
|
30053
|
-
throw new Error("Scrypt: N must be larger than 1, a power of 2,
|
30081
|
+
if (N <= 1 || (N & N - 1) !== 0 || N > 2 ** 32) {
|
30082
|
+
throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");
|
30054
30083
|
}
|
30055
30084
|
if (p < 0 || p > (2 ** 32 - 1) * 32 / blockSize) {
|
30056
30085
|
throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");
|
@@ -30089,6 +30118,8 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30089
30118
|
}
|
30090
30119
|
function scrypt(password, salt, opts) {
|
30091
30120
|
const { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb } = scryptInit(password, salt, opts);
|
30121
|
+
if (!isLE)
|
30122
|
+
byteSwap32(B32);
|
30092
30123
|
for (let pi = 0; pi < p; pi++) {
|
30093
30124
|
const Pi2 = blockSize32 * pi;
|
30094
30125
|
for (let i = 0; i < blockSize32; i++)
|
@@ -30107,10 +30138,12 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30107
30138
|
blockMixCb();
|
30108
30139
|
}
|
30109
30140
|
}
|
30141
|
+
if (!isLE)
|
30142
|
+
byteSwap32(B32);
|
30110
30143
|
return scryptOutput(password, dkLen, B, V, tmp);
|
30111
30144
|
}
|
30112
30145
|
|
30113
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.
|
30146
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/_u64.js
|
30114
30147
|
var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
30115
30148
|
var _32n = /* @__PURE__ */ BigInt(32);
|
30116
30149
|
function fromBig(n, le = false) {
|
@@ -30132,8 +30165,10 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30132
30165
|
var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
|
30133
30166
|
var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
|
30134
30167
|
|
30135
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.
|
30136
|
-
var
|
30168
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/sha3.js
|
30169
|
+
var SHA3_PI = [];
|
30170
|
+
var SHA3_ROTL = [];
|
30171
|
+
var _SHA3_IOTA = [];
|
30137
30172
|
var _0n = /* @__PURE__ */ BigInt(0);
|
30138
30173
|
var _1n = /* @__PURE__ */ BigInt(1);
|
30139
30174
|
var _2n = /* @__PURE__ */ BigInt(2);
|
@@ -30215,7 +30250,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30215
30250
|
this.state32 = u32(this.state);
|
30216
30251
|
}
|
30217
30252
|
keccak() {
|
30253
|
+
if (!isLE)
|
30254
|
+
byteSwap32(this.state32);
|
30218
30255
|
keccakP(this.state32, this.rounds);
|
30256
|
+
if (!isLE)
|
30257
|
+
byteSwap32(this.state32);
|
30219
30258
|
this.posOut = 0;
|
30220
30259
|
this.pos = 0;
|
30221
30260
|
}
|
@@ -30265,9 +30304,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30265
30304
|
throw new Error("XOF is not possible for this instance");
|
30266
30305
|
return this.writeInto(out);
|
30267
30306
|
}
|
30268
|
-
xof(
|
30269
|
-
number(
|
30270
|
-
return this.xofInto(new Uint8Array(
|
30307
|
+
xof(bytes2) {
|
30308
|
+
number(bytes2);
|
30309
|
+
return this.xofInto(new Uint8Array(bytes2));
|
30271
30310
|
}
|
30272
30311
|
digestInto(out) {
|
30273
30312
|
output(out, this);
|
@@ -30312,9 +30351,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30312
30351
|
var shake128 = /* @__PURE__ */ genShake(31, 168, 128 / 8);
|
30313
30352
|
var shake256 = /* @__PURE__ */ genShake(31, 136, 256 / 8);
|
30314
30353
|
|
30315
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.
|
30354
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/ripemd160.js
|
30316
30355
|
var Rho = /* @__PURE__ */ new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]);
|
30317
|
-
var Id = /* @__PURE__ */ Uint8Array
|
30356
|
+
var Id = /* @__PURE__ */ new Uint8Array(new Array(16).fill(0).map((_, i) => i));
|
30318
30357
|
var Pi = /* @__PURE__ */ Id.map((i) => (9 * i + 5) % 16);
|
30319
30358
|
var idxL = [Id];
|
30320
30359
|
var idxR = [Pi];
|
@@ -30344,7 +30383,6 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30344
30383
|
2053994217,
|
30345
30384
|
0
|
30346
30385
|
]);
|
30347
|
-
var rotl2 = (word, shift) => word << shift | word >>> 32 - shift;
|
30348
30386
|
function f(group, x, y, z) {
|
30349
30387
|
if (group === 0)
|
30350
30388
|
return x ^ y ^ z;
|
@@ -30357,8 +30395,8 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30357
30395
|
else
|
30358
30396
|
return x ^ (y | ~z);
|
30359
30397
|
}
|
30360
|
-
var
|
30361
|
-
var RIPEMD160 = class extends
|
30398
|
+
var R_BUF = /* @__PURE__ */ new Uint32Array(16);
|
30399
|
+
var RIPEMD160 = class extends HashMD {
|
30362
30400
|
constructor() {
|
30363
30401
|
super(64, 20, 8, true);
|
30364
30402
|
this.h0 = 1732584193 | 0;
|
@@ -30380,7 +30418,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30380
30418
|
}
|
30381
30419
|
process(view, offset) {
|
30382
30420
|
for (let i = 0; i < 16; i++, offset += 4)
|
30383
|
-
|
30421
|
+
R_BUF[i] = view.getUint32(offset, true);
|
30384
30422
|
let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;
|
30385
30423
|
for (let group = 0; group < 5; group++) {
|
30386
30424
|
const rGroup = 4 - group;
|
@@ -30388,18 +30426,18 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30388
30426
|
const rl = idxL[group], rr = idxR[group];
|
30389
30427
|
const sl = shiftsL[group], sr = shiftsR[group];
|
30390
30428
|
for (let i = 0; i < 16; i++) {
|
30391
|
-
const tl =
|
30392
|
-
al = el, el = dl, dl =
|
30429
|
+
const tl = rotl(al + f(group, bl, cl, dl) + R_BUF[rl[i]] + hbl, sl[i]) + el | 0;
|
30430
|
+
al = el, el = dl, dl = rotl(cl, 10) | 0, cl = bl, bl = tl;
|
30393
30431
|
}
|
30394
30432
|
for (let i = 0; i < 16; i++) {
|
30395
|
-
const tr2 =
|
30396
|
-
ar = er, er = dr, dr =
|
30433
|
+
const tr2 = rotl(ar + f(rGroup, br, cr, dr) + R_BUF[rr[i]] + hbr, sr[i]) + er | 0;
|
30434
|
+
ar = er, er = dr, dr = rotl(cr, 10) | 0, cr = br, br = tr2;
|
30397
30435
|
}
|
30398
30436
|
}
|
30399
30437
|
this.set(this.h1 + cl + dr | 0, this.h2 + dl + er | 0, this.h3 + el + ar | 0, this.h4 + al + br | 0, this.h0 + bl + cr | 0);
|
30400
30438
|
}
|
30401
30439
|
roundClean() {
|
30402
|
-
|
30440
|
+
R_BUF.fill(0);
|
30403
30441
|
}
|
30404
30442
|
destroy() {
|
30405
30443
|
this.destroyed = true;
|
@@ -30410,12 +30448,12 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30410
30448
|
var ripemd160 = /* @__PURE__ */ wrapConstructor(() => new RIPEMD160());
|
30411
30449
|
|
30412
30450
|
// ../crypto/dist/index.mjs
|
30413
|
-
var
|
30414
|
-
var
|
30415
|
-
var import_crypto3 = __toESM(__require("crypto"), 1);
|
30451
|
+
var import_crypto2 = __toESM(__require("crypto"), 1);
|
30452
|
+
var import_crypto3 = __require("crypto");
|
30416
30453
|
var import_crypto4 = __toESM(__require("crypto"), 1);
|
30417
|
-
var import_crypto5 = __require("crypto");
|
30454
|
+
var import_crypto5 = __toESM(__require("crypto"), 1);
|
30418
30455
|
var import_crypto6 = __require("crypto");
|
30456
|
+
var import_crypto7 = __require("crypto");
|
30419
30457
|
var scrypt2 = (params) => {
|
30420
30458
|
const { password, salt, n, p, r, dklen } = params;
|
30421
30459
|
const derivedKey = scrypt(password, salt, { N: n, r, p, dkLen: dklen });
|
@@ -30430,10 +30468,10 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30430
30468
|
function pbkdf22(_password, _salt, iterations, keylen, algo) {
|
30431
30469
|
const password = arrayify(_password, "password");
|
30432
30470
|
const salt = arrayify(_salt, "salt");
|
30433
|
-
return hexlify((0,
|
30471
|
+
return hexlify((0, import_crypto3.pbkdf2Sync)(password, salt, iterations, keylen, algo));
|
30434
30472
|
}
|
30435
|
-
var
|
30436
|
-
const randomValues = Uint8Array.from(
|
30473
|
+
var randomBytes2 = (length) => {
|
30474
|
+
const randomValues = Uint8Array.from(import_crypto4.default.randomBytes(length));
|
30437
30475
|
return randomValues;
|
30438
30476
|
};
|
30439
30477
|
var stringFromBuffer = (buffer, encoding = "base64") => Buffer.from(buffer).toString(encoding);
|
@@ -30444,11 +30482,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30444
30482
|
return arrayify(key);
|
30445
30483
|
};
|
30446
30484
|
var encrypt = async (password, data) => {
|
30447
|
-
const iv =
|
30448
|
-
const salt =
|
30485
|
+
const iv = randomBytes2(16);
|
30486
|
+
const salt = randomBytes2(32);
|
30449
30487
|
const secret = keyFromPassword(password, salt);
|
30450
30488
|
const dataBuffer = Uint8Array.from(Buffer.from(JSON.stringify(data), "utf-8"));
|
30451
|
-
const cipher = await
|
30489
|
+
const cipher = await import_crypto2.default.createCipheriv(ALGORITHM, secret, iv);
|
30452
30490
|
let cipherData = cipher.update(dataBuffer);
|
30453
30491
|
cipherData = Buffer.concat([cipherData, cipher.final()]);
|
30454
30492
|
return {
|
@@ -30462,7 +30500,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30462
30500
|
const salt = bufferFromString(keystore.salt);
|
30463
30501
|
const secret = keyFromPassword(password, salt);
|
30464
30502
|
const encryptedText = bufferFromString(keystore.data);
|
30465
|
-
const decipher = await
|
30503
|
+
const decipher = await import_crypto2.default.createDecipheriv(ALGORITHM, secret, iv);
|
30466
30504
|
const decrypted = decipher.update(encryptedText);
|
30467
30505
|
const deBuff = Buffer.concat([decrypted, decipher.final()]);
|
30468
30506
|
const decryptedData = Buffer.from(deBuff).toString("utf-8");
|
@@ -30473,28 +30511,28 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30473
30511
|
}
|
30474
30512
|
};
|
30475
30513
|
async function encryptJsonWalletData(data, key, iv) {
|
30476
|
-
const cipher = await
|
30514
|
+
const cipher = await import_crypto5.default.createCipheriv("aes-128-ctr", key.subarray(0, 16), iv);
|
30477
30515
|
const encrypted = Buffer.concat([cipher.update(data), cipher.final()]);
|
30478
30516
|
return new Uint8Array(encrypted);
|
30479
30517
|
}
|
30480
30518
|
async function decryptJsonWalletData(data, key, iv) {
|
30481
|
-
const decipher =
|
30519
|
+
const decipher = import_crypto5.default.createDecipheriv("aes-128-ctr", key.subarray(0, 16), iv);
|
30482
30520
|
const decrypted = await Buffer.concat([decipher.update(data), decipher.final()]);
|
30483
30521
|
return new Uint8Array(decrypted);
|
30484
30522
|
}
|
30485
30523
|
function computeHmac(algorithm, _key, _data) {
|
30486
30524
|
const key = arrayify(_key, "key");
|
30487
30525
|
const data = arrayify(_data, "data");
|
30488
|
-
return hexlify((0,
|
30526
|
+
return hexlify((0, import_crypto6.createHmac)(algorithm, key).update(data).digest());
|
30489
30527
|
}
|
30490
|
-
var randomUUID = () => (0,
|
30528
|
+
var randomUUID = () => (0, import_crypto7.randomUUID)();
|
30491
30529
|
var api = {
|
30492
30530
|
bufferFromString,
|
30493
30531
|
stringFromBuffer,
|
30494
30532
|
decrypt,
|
30495
30533
|
encrypt,
|
30496
30534
|
keyFromPassword,
|
30497
|
-
randomBytes,
|
30535
|
+
randomBytes: randomBytes2,
|
30498
30536
|
scrypt: scrypt2,
|
30499
30537
|
keccak256,
|
30500
30538
|
decryptJsonWalletData,
|
@@ -30510,7 +30548,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30510
30548
|
decrypt: decrypt2,
|
30511
30549
|
encrypt: encrypt2,
|
30512
30550
|
keyFromPassword: keyFromPassword2,
|
30513
|
-
randomBytes:
|
30551
|
+
randomBytes: randomBytes22,
|
30514
30552
|
stringFromBuffer: stringFromBuffer2,
|
30515
30553
|
scrypt: scrypt22,
|
30516
30554
|
keccak256: keccak2562,
|
@@ -30574,9 +30612,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30574
30612
|
var STR_SLICE_CODER_TYPE = "str";
|
30575
30613
|
var VOID_TYPE = "()";
|
30576
30614
|
var optionRegEx = /^enum (std::option::)?Option$/m;
|
30577
|
-
var stringRegEx =
|
30578
|
-
var arrayRegEx =
|
30579
|
-
var structRegEx =
|
30615
|
+
var stringRegEx = /^str\[(?<length>[0-9]+)\]/;
|
30616
|
+
var arrayRegEx = /^\[(?<item>[\w\s\\[\]]+);\s*(?<length>[0-9]+)\]/;
|
30617
|
+
var structRegEx = /^struct.+/;
|
30580
30618
|
var enumRegEx = /^enum.+$/;
|
30581
30619
|
var tupleRegEx = /^\((?<items>.*)\)$/;
|
30582
30620
|
var genericRegEx = /^generic.+$/;
|
@@ -30692,15 +30730,15 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30692
30730
|
if (data.length < this.encodedLength) {
|
30693
30731
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid b256 data size.`);
|
30694
30732
|
}
|
30695
|
-
let
|
30696
|
-
const decoded = bn(
|
30733
|
+
let bytes2 = data.slice(offset, offset + this.encodedLength);
|
30734
|
+
const decoded = bn(bytes2);
|
30697
30735
|
if (decoded.isZero()) {
|
30698
|
-
|
30736
|
+
bytes2 = new Uint8Array(32);
|
30699
30737
|
}
|
30700
|
-
if (
|
30738
|
+
if (bytes2.length !== this.encodedLength) {
|
30701
30739
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid b256 byte data size.`);
|
30702
30740
|
}
|
30703
|
-
return [toHex(
|
30741
|
+
return [toHex(bytes2, 32), offset + 32];
|
30704
30742
|
}
|
30705
30743
|
};
|
30706
30744
|
var B512Coder = class extends Coder {
|
@@ -30723,15 +30761,15 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30723
30761
|
if (data.length < this.encodedLength) {
|
30724
30762
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid b512 data size.`);
|
30725
30763
|
}
|
30726
|
-
let
|
30727
|
-
const decoded = bn(
|
30764
|
+
let bytes2 = data.slice(offset, offset + this.encodedLength);
|
30765
|
+
const decoded = bn(bytes2);
|
30728
30766
|
if (decoded.isZero()) {
|
30729
|
-
|
30767
|
+
bytes2 = new Uint8Array(64);
|
30730
30768
|
}
|
30731
|
-
if (
|
30769
|
+
if (bytes2.length !== this.encodedLength) {
|
30732
30770
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid b512 byte data size.`);
|
30733
30771
|
}
|
30734
|
-
return [toHex(
|
30772
|
+
return [toHex(bytes2, this.encodedLength), offset + this.encodedLength];
|
30735
30773
|
}
|
30736
30774
|
};
|
30737
30775
|
var encodedLengths = {
|
@@ -30743,24 +30781,24 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30743
30781
|
super("bigNumber", baseType, encodedLengths[baseType]);
|
30744
30782
|
}
|
30745
30783
|
encode(value) {
|
30746
|
-
let
|
30784
|
+
let bytes2;
|
30747
30785
|
try {
|
30748
|
-
|
30786
|
+
bytes2 = toBytes(value, this.encodedLength);
|
30749
30787
|
} catch (error) {
|
30750
30788
|
throw new FuelError(ErrorCode.ENCODE_ERROR, `Invalid ${this.type}.`);
|
30751
30789
|
}
|
30752
|
-
return
|
30790
|
+
return bytes2;
|
30753
30791
|
}
|
30754
30792
|
decode(data, offset) {
|
30755
30793
|
if (data.length < this.encodedLength) {
|
30756
30794
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid ${this.type} data size.`);
|
30757
30795
|
}
|
30758
|
-
let
|
30759
|
-
|
30760
|
-
if (
|
30796
|
+
let bytes2 = data.slice(offset, offset + this.encodedLength);
|
30797
|
+
bytes2 = bytes2.slice(0, this.encodedLength);
|
30798
|
+
if (bytes2.length !== this.encodedLength) {
|
30761
30799
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid ${this.type} byte data size.`);
|
30762
30800
|
}
|
30763
|
-
return [bn(
|
30801
|
+
return [bn(bytes2), offset + this.encodedLength];
|
30764
30802
|
}
|
30765
30803
|
};
|
30766
30804
|
var BooleanCoder = class extends Coder {
|
@@ -30783,11 +30821,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30783
30821
|
if (data.length < this.encodedLength) {
|
30784
30822
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid boolean data size.`);
|
30785
30823
|
}
|
30786
|
-
const
|
30787
|
-
if (
|
30824
|
+
const bytes2 = bn(data.slice(offset, offset + this.encodedLength));
|
30825
|
+
if (bytes2.isZero()) {
|
30788
30826
|
return [false, offset + this.encodedLength];
|
30789
30827
|
}
|
30790
|
-
if (!
|
30828
|
+
if (!bytes2.eq(bn(1))) {
|
30791
30829
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid boolean value.`);
|
30792
30830
|
}
|
30793
30831
|
return [true, offset + this.encodedLength];
|
@@ -30798,9 +30836,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30798
30836
|
super("struct", "struct Bytes", WORD_SIZE);
|
30799
30837
|
}
|
30800
30838
|
encode(value) {
|
30801
|
-
const
|
30802
|
-
const lengthBytes = new BigNumberCoder("u64").encode(
|
30803
|
-
return new Uint8Array([...lengthBytes, ...
|
30839
|
+
const bytes2 = value instanceof Uint8Array ? value : new Uint8Array(value);
|
30840
|
+
const lengthBytes = new BigNumberCoder("u64").encode(bytes2.length);
|
30841
|
+
return new Uint8Array([...lengthBytes, ...bytes2]);
|
30804
30842
|
}
|
30805
30843
|
decode(data, offset) {
|
30806
30844
|
if (data.length < WORD_SIZE) {
|
@@ -30922,26 +30960,26 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30922
30960
|
this.options = options;
|
30923
30961
|
}
|
30924
30962
|
encode(value) {
|
30925
|
-
let
|
30963
|
+
let bytes2;
|
30926
30964
|
try {
|
30927
|
-
|
30965
|
+
bytes2 = toBytes(value);
|
30928
30966
|
} catch (error) {
|
30929
30967
|
throw new FuelError(ErrorCode.ENCODE_ERROR, `Invalid ${this.baseType}.`);
|
30930
30968
|
}
|
30931
|
-
if (
|
30969
|
+
if (bytes2.length > this.encodedLength) {
|
30932
30970
|
throw new FuelError(ErrorCode.ENCODE_ERROR, `Invalid ${this.baseType}, too many bytes.`);
|
30933
30971
|
}
|
30934
|
-
return toBytes(
|
30972
|
+
return toBytes(bytes2, this.encodedLength);
|
30935
30973
|
}
|
30936
30974
|
decode(data, offset) {
|
30937
30975
|
if (data.length < this.encodedLength) {
|
30938
30976
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid number data size.`);
|
30939
30977
|
}
|
30940
|
-
const
|
30941
|
-
if (
|
30978
|
+
const bytes2 = data.slice(offset, offset + this.encodedLength);
|
30979
|
+
if (bytes2.length !== this.encodedLength) {
|
30942
30980
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid number byte data size.`);
|
30943
30981
|
}
|
30944
|
-
return [toNumber(
|
30982
|
+
return [toNumber(bytes2), offset + this.encodedLength];
|
30945
30983
|
}
|
30946
30984
|
};
|
30947
30985
|
var OptionCoder = class extends EnumCoder {
|
@@ -30959,9 +30997,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30959
30997
|
const [decoded, newOffset] = super.decode(data, offset);
|
30960
30998
|
return [this.toOption(decoded), newOffset];
|
30961
30999
|
}
|
30962
|
-
toOption(
|
30963
|
-
if (
|
30964
|
-
return
|
31000
|
+
toOption(output2) {
|
31001
|
+
if (output2 && "Some" in output2) {
|
31002
|
+
return output2.Some;
|
30965
31003
|
}
|
30966
31004
|
return void 0;
|
30967
31005
|
}
|
@@ -30975,9 +31013,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
30975
31013
|
throw new FuelError(ErrorCode.ENCODE_ERROR, `Expected array value.`);
|
30976
31014
|
}
|
30977
31015
|
const internalCoder = new ArrayCoder(new NumberCoder("u8"), value.length);
|
30978
|
-
const
|
30979
|
-
const lengthBytes = new BigNumberCoder("u64").encode(
|
30980
|
-
return new Uint8Array([...lengthBytes, ...
|
31016
|
+
const bytes2 = internalCoder.encode(value);
|
31017
|
+
const lengthBytes = new BigNumberCoder("u64").encode(bytes2.length);
|
31018
|
+
return new Uint8Array([...lengthBytes, ...bytes2]);
|
30981
31019
|
}
|
30982
31020
|
decode(data, offset) {
|
30983
31021
|
if (data.length < this.encodedLength) {
|
@@ -31000,9 +31038,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
31000
31038
|
super("struct", "struct String", WORD_SIZE);
|
31001
31039
|
}
|
31002
31040
|
encode(value) {
|
31003
|
-
const
|
31041
|
+
const bytes2 = toUtf8Bytes(value);
|
31004
31042
|
const lengthBytes = new BigNumberCoder("u64").encode(value.length);
|
31005
|
-
return new Uint8Array([...lengthBytes, ...
|
31043
|
+
return new Uint8Array([...lengthBytes, ...bytes2]);
|
31006
31044
|
}
|
31007
31045
|
decode(data, offset) {
|
31008
31046
|
if (data.length < this.encodedLength) {
|
@@ -31024,9 +31062,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
31024
31062
|
super("strSlice", "str", WORD_SIZE);
|
31025
31063
|
}
|
31026
31064
|
encode(value) {
|
31027
|
-
const
|
31065
|
+
const bytes2 = toUtf8Bytes(value);
|
31028
31066
|
const lengthBytes = new BigNumberCoder("u64").encode(value.length);
|
31029
|
-
return new Uint8Array([...lengthBytes, ...
|
31067
|
+
return new Uint8Array([...lengthBytes, ...bytes2]);
|
31030
31068
|
}
|
31031
31069
|
decode(data, offset) {
|
31032
31070
|
if (data.length < this.encodedLength) {
|
@@ -31035,11 +31073,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
31035
31073
|
const offsetAndLength = offset + WORD_SIZE;
|
31036
31074
|
const lengthBytes = data.slice(offset, offsetAndLength);
|
31037
31075
|
const length = bn(new BigNumberCoder("u64").decode(lengthBytes, 0)[0]).toNumber();
|
31038
|
-
const
|
31039
|
-
if (
|
31076
|
+
const bytes2 = data.slice(offsetAndLength, offsetAndLength + length);
|
31077
|
+
if (bytes2.length !== length) {
|
31040
31078
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid string slice byte data size.`);
|
31041
31079
|
}
|
31042
|
-
return [toUtf8String(
|
31080
|
+
return [toUtf8String(bytes2), offsetAndLength + length];
|
31043
31081
|
}
|
31044
31082
|
};
|
31045
31083
|
__publicField4(StrSliceCoder, "memorySize", 1);
|
@@ -31057,11 +31095,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
31057
31095
|
if (data.length < this.encodedLength) {
|
31058
31096
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid string data size.`);
|
31059
31097
|
}
|
31060
|
-
const
|
31061
|
-
if (
|
31098
|
+
const bytes2 = data.slice(offset, offset + this.encodedLength);
|
31099
|
+
if (bytes2.length !== this.encodedLength) {
|
31062
31100
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid string byte data size.`);
|
31063
31101
|
}
|
31064
|
-
return [toUtf8String(
|
31102
|
+
return [toUtf8String(bytes2), offset + this.encodedLength];
|
31065
31103
|
}
|
31066
31104
|
};
|
31067
31105
|
var StructCoder = class extends Coder {
|
@@ -31155,9 +31193,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
31155
31193
|
if (isUint8Array(value)) {
|
31156
31194
|
return new Uint8Array([...lengthCoder.encode(value.length), ...value]);
|
31157
31195
|
}
|
31158
|
-
const
|
31196
|
+
const bytes2 = value.map((v) => this.coder.encode(v));
|
31159
31197
|
const lengthBytes = lengthCoder.encode(value.length);
|
31160
|
-
return new Uint8Array([...lengthBytes, ...concatBytes(
|
31198
|
+
return new Uint8Array([...lengthBytes, ...concatBytes(bytes2)]);
|
31161
31199
|
}
|
31162
31200
|
decode(data, offset) {
|
31163
31201
|
if (!this.#hasNestedOption && data.length < this.encodedLength || data.length > MAX_BYTES) {
|
@@ -31545,10 +31583,10 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
31545
31583
|
return new TupleCoder(coders).encode(argumentValues);
|
31546
31584
|
}
|
31547
31585
|
decodeArguments(data) {
|
31548
|
-
const
|
31586
|
+
const bytes2 = arrayify(data);
|
31549
31587
|
const nonVoidInputs = findNonVoidInputs(this.jsonAbiOld, this.jsonFnOld.inputs);
|
31550
31588
|
if (nonVoidInputs.length === 0) {
|
31551
|
-
if (
|
31589
|
+
if (bytes2.length === 0) {
|
31552
31590
|
return void 0;
|
31553
31591
|
}
|
31554
31592
|
throw new FuelError(
|
@@ -31557,12 +31595,12 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
31557
31595
|
count: {
|
31558
31596
|
types: this.jsonFn.inputs.length,
|
31559
31597
|
nonVoidInputs: nonVoidInputs.length,
|
31560
|
-
values:
|
31598
|
+
values: bytes2.length
|
31561
31599
|
},
|
31562
31600
|
value: {
|
31563
31601
|
args: this.jsonFn.inputs,
|
31564
31602
|
nonVoidInputs,
|
31565
|
-
values:
|
31603
|
+
values: bytes2
|
31566
31604
|
}
|
31567
31605
|
})}`
|
31568
31606
|
);
|
@@ -31570,7 +31608,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
31570
31608
|
const result = this.jsonFnOld.inputs.reduce(
|
31571
31609
|
(obj, input) => {
|
31572
31610
|
const coder = AbiCoder.getCoder(this.jsonAbiOld, input, { encoding: this.encoding });
|
31573
|
-
const [decodedValue, decodedValueByteSize] = coder.decode(
|
31611
|
+
const [decodedValue, decodedValueByteSize] = coder.decode(bytes2, obj.offset);
|
31574
31612
|
return {
|
31575
31613
|
decoded: [...obj.decoded, decodedValue],
|
31576
31614
|
offset: obj.offset + decodedValueByteSize
|
@@ -31581,11 +31619,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
31581
31619
|
return result.decoded;
|
31582
31620
|
}
|
31583
31621
|
decodeOutput(data) {
|
31584
|
-
const
|
31622
|
+
const bytes2 = arrayify(data);
|
31585
31623
|
const coder = AbiCoder.getCoder(this.jsonAbiOld, this.jsonFnOld.output, {
|
31586
31624
|
encoding: this.encoding
|
31587
31625
|
});
|
31588
|
-
return coder.decode(
|
31626
|
+
return coder.decode(bytes2, 0);
|
31589
31627
|
}
|
31590
31628
|
/**
|
31591
31629
|
* Checks if the function is read-only i.e. it only reads from storage, does not write to it.
|
@@ -31673,8 +31711,8 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
31673
31711
|
const inputs = fn.inputs.map(
|
31674
31712
|
({ concreteTypeId, name }) => parseConcreteType(abi, types, concreteTypeId, name)
|
31675
31713
|
);
|
31676
|
-
const
|
31677
|
-
return { ...fn, inputs, output:
|
31714
|
+
const output2 = parseConcreteType(abi, types, fn.output, "");
|
31715
|
+
return { ...fn, inputs, output: output2 };
|
31678
31716
|
});
|
31679
31717
|
const configurables = abi.configurables.map((conf) => ({
|
31680
31718
|
name: conf.name,
|
@@ -31836,9 +31874,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
31836
31874
|
}
|
31837
31875
|
return addressLike;
|
31838
31876
|
};
|
31839
|
-
var getRandomB256 = () => hexlify(
|
31877
|
+
var getRandomB256 = () => hexlify(randomBytes22(32));
|
31840
31878
|
var clearFirst12BytesFromB256 = (b256) => {
|
31841
|
-
let
|
31879
|
+
let bytes2;
|
31842
31880
|
try {
|
31843
31881
|
if (!isB256(b256)) {
|
31844
31882
|
throw new FuelError(
|
@@ -31846,15 +31884,15 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
31846
31884
|
`Invalid Bech32 Address: ${b256}.`
|
31847
31885
|
);
|
31848
31886
|
}
|
31849
|
-
|
31850
|
-
|
31887
|
+
bytes2 = getBytesFromBech32(toBech32(b256));
|
31888
|
+
bytes2 = hexlify(bytes2.fill(0, 0, 12));
|
31851
31889
|
} catch (error) {
|
31852
31890
|
throw new FuelError(
|
31853
31891
|
FuelError.CODES.PARSE_FAILED,
|
31854
31892
|
`Cannot generate EVM Address B256 from: ${b256}.`
|
31855
31893
|
);
|
31856
31894
|
}
|
31857
|
-
return
|
31895
|
+
return bytes2;
|
31858
31896
|
};
|
31859
31897
|
var padFirst12BytesOfEvmAddress = (address) => {
|
31860
31898
|
if (!isEvmAddress(address)) {
|
@@ -32255,9 +32293,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
32255
32293
|
return sha2562(concat(parts));
|
32256
32294
|
}
|
32257
32295
|
static encodeData(messageData) {
|
32258
|
-
const
|
32259
|
-
const dataLength =
|
32260
|
-
return new ByteArrayCoder(dataLength).encode(
|
32296
|
+
const bytes2 = arrayify(messageData || "0x");
|
32297
|
+
const dataLength = bytes2.length;
|
32298
|
+
return new ByteArrayCoder(dataLength).encode(bytes2);
|
32261
32299
|
}
|
32262
32300
|
encode(value) {
|
32263
32301
|
const parts = [];
|
@@ -32279,9 +32317,9 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
32279
32317
|
return concat(parts);
|
32280
32318
|
}
|
32281
32319
|
static decodeData(messageData) {
|
32282
|
-
const
|
32283
|
-
const dataLength =
|
32284
|
-
const [data] = new ByteArrayCoder(dataLength).decode(
|
32320
|
+
const bytes2 = arrayify(messageData);
|
32321
|
+
const dataLength = bytes2.length;
|
32322
|
+
const [data] = new ByteArrayCoder(dataLength).decode(bytes2, 0);
|
32285
32323
|
return arrayify(data);
|
32286
32324
|
}
|
32287
32325
|
decode(data, offset) {
|
@@ -32723,6 +32761,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
32723
32761
|
});
|
32724
32762
|
}
|
32725
32763
|
};
|
32764
|
+
var UpgradePurposeTypeEnum = /* @__PURE__ */ ((UpgradePurposeTypeEnum2) => {
|
32765
|
+
UpgradePurposeTypeEnum2[UpgradePurposeTypeEnum2["ConsensusParameters"] = 0] = "ConsensusParameters";
|
32766
|
+
UpgradePurposeTypeEnum2[UpgradePurposeTypeEnum2["StateTransition"] = 1] = "StateTransition";
|
32767
|
+
return UpgradePurposeTypeEnum2;
|
32768
|
+
})(UpgradePurposeTypeEnum || {});
|
32726
32769
|
var UpgradePurposeCoder = class extends Coder {
|
32727
32770
|
constructor() {
|
32728
32771
|
super("UpgradePurpose", "UpgradePurpose", 0);
|
@@ -33453,9 +33496,11 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
33453
33496
|
return coinQuantities;
|
33454
33497
|
};
|
33455
33498
|
|
33456
|
-
// ../../node_modules/.pnpm/@noble+curves@1.
|
33499
|
+
// ../../node_modules/.pnpm/@noble+curves@1.6.0/node_modules/@noble/curves/esm/abstract/utils.js
|
33457
33500
|
var utils_exports = {};
|
33458
33501
|
__export(utils_exports, {
|
33502
|
+
aInRange: () => aInRange,
|
33503
|
+
abool: () => abool,
|
33459
33504
|
abytes: () => abytes,
|
33460
33505
|
bitGet: () => bitGet,
|
33461
33506
|
bitLen: () => bitLen,
|
@@ -33464,13 +33509,16 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
33464
33509
|
bytesToHex: () => bytesToHex,
|
33465
33510
|
bytesToNumberBE: () => bytesToNumberBE,
|
33466
33511
|
bytesToNumberLE: () => bytesToNumberLE,
|
33467
|
-
concatBytes: () =>
|
33512
|
+
concatBytes: () => concatBytes3,
|
33468
33513
|
createHmacDrbg: () => createHmacDrbg,
|
33469
33514
|
ensureBytes: () => ensureBytes,
|
33470
33515
|
equalBytes: () => equalBytes,
|
33471
33516
|
hexToBytes: () => hexToBytes,
|
33472
33517
|
hexToNumber: () => hexToNumber,
|
33473
|
-
|
33518
|
+
inRange: () => inRange,
|
33519
|
+
isBytes: () => isBytes2,
|
33520
|
+
memoized: () => memoized,
|
33521
|
+
notImplemented: () => notImplemented,
|
33474
33522
|
numberToBytesBE: () => numberToBytesBE,
|
33475
33523
|
numberToBytesLE: () => numberToBytesLE,
|
33476
33524
|
numberToHexUnpadded: () => numberToHexUnpadded,
|
@@ -33481,19 +33529,23 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
33481
33529
|
var _0n2 = /* @__PURE__ */ BigInt(0);
|
33482
33530
|
var _1n2 = /* @__PURE__ */ BigInt(1);
|
33483
33531
|
var _2n2 = /* @__PURE__ */ BigInt(2);
|
33484
|
-
function
|
33532
|
+
function isBytes2(a) {
|
33485
33533
|
return a instanceof Uint8Array || a != null && typeof a === "object" && a.constructor.name === "Uint8Array";
|
33486
33534
|
}
|
33487
33535
|
function abytes(item) {
|
33488
|
-
if (!
|
33536
|
+
if (!isBytes2(item))
|
33489
33537
|
throw new Error("Uint8Array expected");
|
33490
33538
|
}
|
33539
|
+
function abool(title, value) {
|
33540
|
+
if (typeof value !== "boolean")
|
33541
|
+
throw new Error(`${title} must be valid boolean, got "${value}".`);
|
33542
|
+
}
|
33491
33543
|
var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
|
33492
|
-
function bytesToHex(
|
33493
|
-
abytes(
|
33544
|
+
function bytesToHex(bytes2) {
|
33545
|
+
abytes(bytes2);
|
33494
33546
|
let hex = "";
|
33495
|
-
for (let i = 0; i <
|
33496
|
-
hex += hexes[
|
33547
|
+
for (let i = 0; i < bytes2.length; i++) {
|
33548
|
+
hex += hexes[bytes2[i]];
|
33497
33549
|
}
|
33498
33550
|
return hex;
|
33499
33551
|
}
|
@@ -33535,12 +33587,12 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
33535
33587
|
}
|
33536
33588
|
return array;
|
33537
33589
|
}
|
33538
|
-
function bytesToNumberBE(
|
33539
|
-
return hexToNumber(bytesToHex(
|
33590
|
+
function bytesToNumberBE(bytes2) {
|
33591
|
+
return hexToNumber(bytesToHex(bytes2));
|
33540
33592
|
}
|
33541
|
-
function bytesToNumberLE(
|
33542
|
-
abytes(
|
33543
|
-
return hexToNumber(bytesToHex(Uint8Array.from(
|
33593
|
+
function bytesToNumberLE(bytes2) {
|
33594
|
+
abytes(bytes2);
|
33595
|
+
return hexToNumber(bytesToHex(Uint8Array.from(bytes2).reverse()));
|
33544
33596
|
}
|
33545
33597
|
function numberToBytesBE(n, len) {
|
33546
33598
|
return hexToBytes(n.toString(16).padStart(len * 2, "0"));
|
@@ -33559,7 +33611,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
33559
33611
|
} catch (e) {
|
33560
33612
|
throw new Error(`${title} must be valid hex string, got "${hex}". Cause: ${e}`);
|
33561
33613
|
}
|
33562
|
-
} else if (
|
33614
|
+
} else if (isBytes2(hex)) {
|
33563
33615
|
res = Uint8Array.from(hex);
|
33564
33616
|
} else {
|
33565
33617
|
throw new Error(`${title} must be hex string or Uint8Array`);
|
@@ -33569,7 +33621,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
33569
33621
|
throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);
|
33570
33622
|
return res;
|
33571
33623
|
}
|
33572
|
-
function
|
33624
|
+
function concatBytes3(...arrays) {
|
33573
33625
|
let sum = 0;
|
33574
33626
|
for (let i = 0; i < arrays.length; i++) {
|
33575
33627
|
const a = arrays[i];
|
@@ -33597,6 +33649,14 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
33597
33649
|
throw new Error(`utf8ToBytes expected string, got ${typeof str}`);
|
33598
33650
|
return new Uint8Array(new TextEncoder().encode(str));
|
33599
33651
|
}
|
33652
|
+
var isPosBig = (n) => typeof n === "bigint" && _0n2 <= n;
|
33653
|
+
function inRange(n, min, max) {
|
33654
|
+
return isPosBig(n) && isPosBig(min) && isPosBig(max) && min <= n && n < max;
|
33655
|
+
}
|
33656
|
+
function aInRange(title, n, min, max) {
|
33657
|
+
if (!inRange(n, min, max))
|
33658
|
+
throw new Error(`expected valid ${title}: ${min} <= n < ${max}, got ${typeof n} ${n}`);
|
33659
|
+
}
|
33600
33660
|
function bitLen(n) {
|
33601
33661
|
let len;
|
33602
33662
|
for (len = 0; n > _0n2; n >>= _1n2, len += 1)
|
@@ -33647,7 +33707,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
33647
33707
|
out.push(sl);
|
33648
33708
|
len += v.length;
|
33649
33709
|
}
|
33650
|
-
return
|
33710
|
+
return concatBytes3(...out);
|
33651
33711
|
};
|
33652
33712
|
const genUntil = (seed, pred) => {
|
33653
33713
|
reset();
|
@@ -33665,7 +33725,7 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
33665
33725
|
function: (val) => typeof val === "function",
|
33666
33726
|
boolean: (val) => typeof val === "boolean",
|
33667
33727
|
string: (val) => typeof val === "string",
|
33668
|
-
stringOrUint8Array: (val) => typeof val === "string" ||
|
33728
|
+
stringOrUint8Array: (val) => typeof val === "string" || isBytes2(val),
|
33669
33729
|
isSafeInteger: (val) => Number.isSafeInteger(val),
|
33670
33730
|
array: (val) => Array.isArray(val),
|
33671
33731
|
field: (val, object) => object.Fp.isValid(val),
|
@@ -33689,6 +33749,20 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
33689
33749
|
checkField(fieldName, type3, true);
|
33690
33750
|
return object;
|
33691
33751
|
}
|
33752
|
+
var notImplemented = () => {
|
33753
|
+
throw new Error("not implemented");
|
33754
|
+
};
|
33755
|
+
function memoized(fn) {
|
33756
|
+
const map = /* @__PURE__ */ new WeakMap();
|
33757
|
+
return (arg, ...args) => {
|
33758
|
+
const val = map.get(arg);
|
33759
|
+
if (val !== void 0)
|
33760
|
+
return val;
|
33761
|
+
const computed = fn(arg, ...args);
|
33762
|
+
map.set(arg, computed);
|
33763
|
+
return computed;
|
33764
|
+
};
|
33765
|
+
}
|
33692
33766
|
|
33693
33767
|
// src/providers/provider.ts
|
33694
33768
|
var import_graphql_request = __toESM(require_dist2());
|
@@ -33911,19 +33985,19 @@ If you are attempting to transform a hex value, please make sure it is being pas
|
|
33911
33985
|
return "GraphQLError";
|
33912
33986
|
}
|
33913
33987
|
toString() {
|
33914
|
-
let
|
33988
|
+
let output2 = this.message;
|
33915
33989
|
if (this.nodes) {
|
33916
33990
|
for (const node of this.nodes) {
|
33917
33991
|
if (node.loc) {
|
33918
|
-
|
33992
|
+
output2 += "\n\n" + printLocation(node.loc);
|
33919
33993
|
}
|
33920
33994
|
}
|
33921
33995
|
} else if (this.source && this.locations) {
|
33922
33996
|
for (const location of this.locations) {
|
33923
|
-
|
33997
|
+
output2 += "\n\n" + printSourceLocation(this.source, location);
|
33924
33998
|
}
|
33925
33999
|
}
|
33926
|
-
return
|
34000
|
+
return output2;
|
33927
34001
|
}
|
33928
34002
|
toJSON() {
|
33929
34003
|
const formattedError = {
|
@@ -38454,7 +38528,7 @@ ${MessageFragmentDoc}`;
|
|
38454
38528
|
}
|
38455
38529
|
|
38456
38530
|
// src/providers/utils/block-explorer.ts
|
38457
|
-
var DEFAULT_BLOCK_EXPLORER_URL = "https://
|
38531
|
+
var DEFAULT_BLOCK_EXPLORER_URL = "https://app.fuel.network";
|
38458
38532
|
var getPathFromInput = (key, value) => {
|
38459
38533
|
const pathMap = {
|
38460
38534
|
address: `address`,
|
@@ -38611,6 +38685,39 @@ ${MessageFragmentDoc}`;
|
|
38611
38685
|
const blobLen = resolveGasDependentCosts(witnessBytesSize, gasCosts.s256);
|
38612
38686
|
return txId.add(blobLen);
|
38613
38687
|
}
|
38688
|
+
function calculateMetadataGasForTxUpgrade({
|
38689
|
+
gasCosts,
|
38690
|
+
txBytesSize,
|
38691
|
+
consensusSize
|
38692
|
+
}) {
|
38693
|
+
const txId = resolveGasDependentCosts(txBytesSize, gasCosts.s256);
|
38694
|
+
if (consensusSize) {
|
38695
|
+
const consensusLen = resolveGasDependentCosts(consensusSize, gasCosts.s256);
|
38696
|
+
txId.add(consensusLen);
|
38697
|
+
}
|
38698
|
+
return txId;
|
38699
|
+
}
|
38700
|
+
function calculateMetadataGasForTxUpload({
|
38701
|
+
gasCosts,
|
38702
|
+
txBytesSize,
|
38703
|
+
subsectionSize,
|
38704
|
+
subsectionsSize
|
38705
|
+
}) {
|
38706
|
+
const txId = resolveGasDependentCosts(txBytesSize, gasCosts.s256);
|
38707
|
+
const subsectionLen = resolveGasDependentCosts(subsectionSize, gasCosts.s256);
|
38708
|
+
txId.add(subsectionLen);
|
38709
|
+
const subsectionsLen = resolveGasDependentCosts(subsectionsSize, gasCosts.stateRoot);
|
38710
|
+
txId.add(subsectionsLen);
|
38711
|
+
return txId;
|
38712
|
+
}
|
38713
|
+
function calculateMinGasForTxUpload({
|
38714
|
+
gasCosts,
|
38715
|
+
baseMinGas,
|
38716
|
+
subsectionSize
|
38717
|
+
}) {
|
38718
|
+
const additionalStoragePerByte = bn(gasCosts.newStoragePerByte).mul(subsectionSize);
|
38719
|
+
return bn(baseMinGas).add(additionalStoragePerByte);
|
38720
|
+
}
|
38614
38721
|
var calculateGasFee = (params) => {
|
38615
38722
|
const { gas, gasPrice, priceFactor, tip } = params;
|
38616
38723
|
return gas.mul(gasPrice).div(priceFactor).add(bn(tip));
|
@@ -38909,8 +39016,8 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
38909
39016
|
*
|
38910
39017
|
* Pushes an output to the list without any side effects and returns the index
|
38911
39018
|
*/
|
38912
|
-
pushOutput(
|
38913
|
-
this.outputs.push(
|
39019
|
+
pushOutput(output2) {
|
39020
|
+
this.outputs.push(output2);
|
38914
39021
|
return this.outputs.length - 1;
|
38915
39022
|
}
|
38916
39023
|
/**
|
@@ -38994,7 +39101,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
38994
39101
|
*/
|
38995
39102
|
getCoinOutputs() {
|
38996
39103
|
return this.outputs.filter(
|
38997
|
-
(
|
39104
|
+
(output2) => output2.type === OutputType.Coin
|
38998
39105
|
);
|
38999
39106
|
}
|
39000
39107
|
/**
|
@@ -39004,7 +39111,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
39004
39111
|
*/
|
39005
39112
|
getChangeOutputs() {
|
39006
39113
|
return this.outputs.filter(
|
39007
|
-
(
|
39114
|
+
(output2) => output2.type === OutputType.Change
|
39008
39115
|
);
|
39009
39116
|
}
|
39010
39117
|
/**
|
@@ -39157,7 +39264,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
39157
39264
|
*/
|
39158
39265
|
addChangeOutput(to, assetId) {
|
39159
39266
|
const changeOutput = this.getChangeOutputs().find(
|
39160
|
-
(
|
39267
|
+
(output2) => hexlify(output2.assetId) === assetId
|
39161
39268
|
);
|
39162
39269
|
if (!changeOutput) {
|
39163
39270
|
this.pushOutput({
|
@@ -39237,12 +39344,12 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
39237
39344
|
usedQuantity = bn("1000000000000000000");
|
39238
39345
|
}
|
39239
39346
|
if (assetInput && "assetId" in assetInput) {
|
39240
|
-
assetInput.id = hexlify(
|
39347
|
+
assetInput.id = hexlify(randomBytes22(UTXO_ID_LEN));
|
39241
39348
|
assetInput.amount = usedQuantity;
|
39242
39349
|
} else {
|
39243
39350
|
this.addResources([
|
39244
39351
|
{
|
39245
|
-
id: hexlify(
|
39352
|
+
id: hexlify(randomBytes22(UTXO_ID_LEN)),
|
39246
39353
|
amount: usedQuantity,
|
39247
39354
|
assetId,
|
39248
39355
|
owner: resourcesOwner || Address.fromRandom(),
|
@@ -39342,8 +39449,8 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
39342
39449
|
return inputClone;
|
39343
39450
|
}
|
39344
39451
|
});
|
39345
|
-
transaction.outputs = transaction.outputs.map((
|
39346
|
-
const outputClone = clone_default(
|
39452
|
+
transaction.outputs = transaction.outputs.map((output2) => {
|
39453
|
+
const outputClone = clone_default(output2);
|
39347
39454
|
switch (outputClone.type) {
|
39348
39455
|
case OutputType.Contract: {
|
39349
39456
|
outputClone.balanceRoot = ZeroBytes32;
|
@@ -39503,7 +39610,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
39503
39610
|
*/
|
39504
39611
|
getContractCreatedOutputs() {
|
39505
39612
|
return this.outputs.filter(
|
39506
|
-
(
|
39613
|
+
(output2) => output2.type === OutputType.ContractCreated
|
39507
39614
|
);
|
39508
39615
|
}
|
39509
39616
|
/**
|
@@ -39626,7 +39733,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
39626
39733
|
*/
|
39627
39734
|
getContractOutputs() {
|
39628
39735
|
return this.outputs.filter(
|
39629
|
-
(
|
39736
|
+
(output2) => output2.type === OutputType.Contract
|
39630
39737
|
);
|
39631
39738
|
}
|
39632
39739
|
/**
|
@@ -39636,7 +39743,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
39636
39743
|
*/
|
39637
39744
|
getVariableOutputs() {
|
39638
39745
|
return this.outputs.filter(
|
39639
|
-
(
|
39746
|
+
(output2) => output2.type === OutputType.Variable
|
39640
39747
|
);
|
39641
39748
|
}
|
39642
39749
|
/**
|
@@ -39743,9 +39850,257 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
39743
39850
|
}
|
39744
39851
|
};
|
39745
39852
|
|
39853
|
+
// src/providers/transaction-request/upgrade-transaction-request.ts
|
39854
|
+
var UpgradeTransactionRequest = class extends BaseTransactionRequest {
|
39855
|
+
static from(obj) {
|
39856
|
+
if (obj instanceof UpgradeTransactionRequest) {
|
39857
|
+
return obj;
|
39858
|
+
}
|
39859
|
+
return new this(clone_default(obj));
|
39860
|
+
}
|
39861
|
+
/** The type of transaction */
|
39862
|
+
type = TransactionType.Upgrade;
|
39863
|
+
/** The upgrade purpose */
|
39864
|
+
upgradePurpose;
|
39865
|
+
/** Witness index of consensus */
|
39866
|
+
bytecodeWitnessIndex;
|
39867
|
+
/**
|
39868
|
+
* Creates an instance `UpgradeTransactionRequest`.
|
39869
|
+
*
|
39870
|
+
* @param upgradeTransactionRequestLike - The initial values for the instance
|
39871
|
+
*/
|
39872
|
+
constructor({
|
39873
|
+
upgradePurpose,
|
39874
|
+
bytecodeWitnessIndex,
|
39875
|
+
...rest
|
39876
|
+
} = {}) {
|
39877
|
+
super(rest);
|
39878
|
+
this.bytecodeWitnessIndex = bytecodeWitnessIndex ?? 0;
|
39879
|
+
this.upgradePurpose = upgradePurpose ?? {
|
39880
|
+
type: UpgradePurposeTypeEnum.ConsensusParameters,
|
39881
|
+
checksum: "0x"
|
39882
|
+
};
|
39883
|
+
}
|
39884
|
+
/**
|
39885
|
+
* Adds a consensus parameters upgrade purpose.
|
39886
|
+
*
|
39887
|
+
* @param consensus - The consensus bytecode.
|
39888
|
+
*
|
39889
|
+
* @returns - The current instance of `UpgradeTransactionRequest`.
|
39890
|
+
*/
|
39891
|
+
addConsensusParametersUpgradePurpose(consensus) {
|
39892
|
+
this.bytecodeWitnessIndex = this.addWitness(consensus);
|
39893
|
+
this.upgradePurpose = {
|
39894
|
+
type: UpgradePurposeTypeEnum.ConsensusParameters,
|
39895
|
+
checksum: hash2(consensus)
|
39896
|
+
};
|
39897
|
+
return this;
|
39898
|
+
}
|
39899
|
+
/**
|
39900
|
+
* Adds a state transition upgrade purpose.
|
39901
|
+
*
|
39902
|
+
* @param bytecodeRoot - The Merkle root of the state transition.
|
39903
|
+
*
|
39904
|
+
* @returns - The current instance of `UpgradeTransactionRequest`.
|
39905
|
+
*/
|
39906
|
+
addStateTransitionUpgradePurpose(bytecodeRoot) {
|
39907
|
+
this.upgradePurpose = {
|
39908
|
+
type: UpgradePurposeTypeEnum.StateTransition,
|
39909
|
+
data: hexlify(bytecodeRoot)
|
39910
|
+
};
|
39911
|
+
return this;
|
39912
|
+
}
|
39913
|
+
/**
|
39914
|
+
* Adds an upgrade purpose.
|
39915
|
+
*
|
39916
|
+
* @param type - The upgrade purpose type.
|
39917
|
+
* @param data - The bytecode or merkle root of upgrade purpose
|
39918
|
+
*
|
39919
|
+
* @returns - The current instance of `UpgradeTransactionRequest`.
|
39920
|
+
*/
|
39921
|
+
addUpgradePurpose(type3, data) {
|
39922
|
+
if (type3 === UpgradePurposeTypeEnum.ConsensusParameters) {
|
39923
|
+
this.addConsensusParametersUpgradePurpose(data);
|
39924
|
+
}
|
39925
|
+
if (type3 === UpgradePurposeTypeEnum.StateTransition) {
|
39926
|
+
this.addStateTransitionUpgradePurpose(data);
|
39927
|
+
}
|
39928
|
+
return this;
|
39929
|
+
}
|
39930
|
+
/**
|
39931
|
+
* Converts the transaction request to a `TransactionUpgrade`.
|
39932
|
+
*
|
39933
|
+
* @returns The transaction create object.
|
39934
|
+
*/
|
39935
|
+
toTransaction() {
|
39936
|
+
let upgradePurpose;
|
39937
|
+
if (this.upgradePurpose.type === UpgradePurposeTypeEnum.ConsensusParameters) {
|
39938
|
+
upgradePurpose = {
|
39939
|
+
type: UpgradePurposeTypeEnum.ConsensusParameters,
|
39940
|
+
data: {
|
39941
|
+
witnessIndex: this.bytecodeWitnessIndex,
|
39942
|
+
checksum: this.upgradePurpose.checksum
|
39943
|
+
}
|
39944
|
+
};
|
39945
|
+
} else if (this.upgradePurpose.type === UpgradePurposeTypeEnum.StateTransition) {
|
39946
|
+
upgradePurpose = {
|
39947
|
+
type: UpgradePurposeTypeEnum.StateTransition,
|
39948
|
+
data: {
|
39949
|
+
bytecodeRoot: hexlify(this.upgradePurpose.data)
|
39950
|
+
}
|
39951
|
+
};
|
39952
|
+
} else {
|
39953
|
+
throw new FuelError(FuelError.CODES.NOT_IMPLEMENTED, "Invalid upgrade purpose");
|
39954
|
+
}
|
39955
|
+
return {
|
39956
|
+
type: TransactionType.Upgrade,
|
39957
|
+
...super.getBaseTransaction(),
|
39958
|
+
upgradePurpose
|
39959
|
+
};
|
39960
|
+
}
|
39961
|
+
/**
|
39962
|
+
* Gets the Transaction ID by hashing the transaction
|
39963
|
+
*
|
39964
|
+
* @param chainId - The chain ID.
|
39965
|
+
*
|
39966
|
+
* @returns - A hash of the transaction, which is the transaction ID.
|
39967
|
+
*/
|
39968
|
+
getTransactionId(chainId) {
|
39969
|
+
return hashTransaction(this, chainId);
|
39970
|
+
}
|
39971
|
+
/**
|
39972
|
+
* Calculates the metadata gas cost for an upgrade transaction.
|
39973
|
+
*
|
39974
|
+
* @param gasCosts - gas costs passed from the chain.
|
39975
|
+
*
|
39976
|
+
* @returns metadata gas cost for the upgrade transaction.
|
39977
|
+
*/
|
39978
|
+
metadataGas(gasCosts) {
|
39979
|
+
const txBytesSize = this.byteSize();
|
39980
|
+
if (this.upgradePurpose.type === UpgradePurposeTypeEnum.ConsensusParameters) {
|
39981
|
+
const witnessIndex = this.bytecodeWitnessIndex;
|
39982
|
+
const consensusSize = this.witnesses[witnessIndex].length;
|
39983
|
+
return calculateMetadataGasForTxUpgrade({
|
39984
|
+
gasCosts,
|
39985
|
+
txBytesSize,
|
39986
|
+
consensusSize
|
39987
|
+
});
|
39988
|
+
}
|
39989
|
+
if (this.upgradePurpose.type === UpgradePurposeTypeEnum.StateTransition) {
|
39990
|
+
return calculateMetadataGasForTxUpgrade({
|
39991
|
+
gasCosts,
|
39992
|
+
txBytesSize
|
39993
|
+
});
|
39994
|
+
}
|
39995
|
+
throw new FuelError(FuelError.CODES.NOT_IMPLEMENTED, "Invalid upgrade purpose");
|
39996
|
+
}
|
39997
|
+
};
|
39998
|
+
|
39999
|
+
// src/providers/transaction-request/upload-transaction-request.ts
|
40000
|
+
var UploadTransactionRequest = class extends BaseTransactionRequest {
|
40001
|
+
static from(obj) {
|
40002
|
+
if (obj instanceof UploadTransactionRequest) {
|
40003
|
+
return obj;
|
40004
|
+
}
|
40005
|
+
return new this(clone_default(obj));
|
40006
|
+
}
|
40007
|
+
/** Type of the transaction */
|
40008
|
+
type = TransactionType.Upload;
|
40009
|
+
/** The witness index of the subsection of the bytecode. */
|
40010
|
+
witnessIndex;
|
40011
|
+
/** The subsection data. */
|
40012
|
+
subsection;
|
40013
|
+
/**
|
40014
|
+
* Creates an instance `UploadTransactionRequest`.
|
40015
|
+
*
|
40016
|
+
* @param uploadTransactionRequestLike - The initial values for the instance
|
40017
|
+
*/
|
40018
|
+
constructor({ witnessIndex, subsection, ...rest } = {}) {
|
40019
|
+
super(rest);
|
40020
|
+
this.witnessIndex = witnessIndex ?? 0;
|
40021
|
+
this.subsection = subsection ?? {
|
40022
|
+
proofSet: [],
|
40023
|
+
root: ZeroBytes32,
|
40024
|
+
subsectionIndex: 0,
|
40025
|
+
subsectionsNumber: 0
|
40026
|
+
};
|
40027
|
+
}
|
40028
|
+
/**
|
40029
|
+
* Adds the subsection.
|
40030
|
+
*
|
40031
|
+
* @param subsection - The subsection data.
|
40032
|
+
*/
|
40033
|
+
addSubsection(subsection) {
|
40034
|
+
const { subsection: subsectionBytecode, ...rest } = subsection;
|
40035
|
+
this.subsection = rest;
|
40036
|
+
this.witnessIndex = this.addWitness(subsectionBytecode);
|
40037
|
+
}
|
40038
|
+
/**
|
40039
|
+
* Gets the Transaction Request by hashing the transaction.
|
40040
|
+
*
|
40041
|
+
* @param chainId - The chain ID.
|
40042
|
+
*
|
40043
|
+
* @returns - A hash of the transaction, which is the transaction ID.
|
40044
|
+
*/
|
40045
|
+
getTransactionId(chainId) {
|
40046
|
+
return hashTransaction(this, chainId);
|
40047
|
+
}
|
40048
|
+
/**
|
40049
|
+
* Converts the transaction request to a `TransactionUpload`.
|
40050
|
+
*
|
40051
|
+
* @returns The transaction create object.
|
40052
|
+
*/
|
40053
|
+
toTransaction() {
|
40054
|
+
const baseTransaction = this.getBaseTransaction();
|
40055
|
+
const { subsectionIndex, subsectionsNumber, root, proofSet } = this.subsection;
|
40056
|
+
return {
|
40057
|
+
type: TransactionType.Upload,
|
40058
|
+
...baseTransaction,
|
40059
|
+
subsectionIndex,
|
40060
|
+
subsectionsNumber,
|
40061
|
+
root: hexlify(root),
|
40062
|
+
proofSet: proofSet.map(hexlify),
|
40063
|
+
witnessIndex: this.witnessIndex,
|
40064
|
+
proofSetCount: proofSet.length
|
40065
|
+
};
|
40066
|
+
}
|
40067
|
+
/**
|
40068
|
+
* Calculates the metadata gas cost for an upload transaction.
|
40069
|
+
*
|
40070
|
+
* @param gasCosts - gas costs passed from the chain.
|
40071
|
+
*
|
40072
|
+
* @returns metadata gas cost for the upload transaction.
|
40073
|
+
*/
|
40074
|
+
metadataGas(gasCosts) {
|
40075
|
+
return calculateMetadataGasForTxUpload({
|
40076
|
+
gasCosts,
|
40077
|
+
txBytesSize: this.byteSize(),
|
40078
|
+
subsectionSize: arrayify(this.witnesses[this.witnessIndex]).length,
|
40079
|
+
subsectionsSize: this.subsection.subsectionsNumber
|
40080
|
+
});
|
40081
|
+
}
|
40082
|
+
/**
|
40083
|
+
* Calculates the minimum gas for an upload transaction.
|
40084
|
+
*
|
40085
|
+
* @param chainInfo - The chain information.
|
40086
|
+
*
|
40087
|
+
* @returns the minimum gas for the upload transaction
|
40088
|
+
*/
|
40089
|
+
calculateMinGas(chainInfo) {
|
40090
|
+
const minGas = super.calculateMinGas(chainInfo);
|
40091
|
+
const { gasCosts } = chainInfo.consensusParameters;
|
40092
|
+
const bytecode = this.witnesses[this.witnessIndex] ?? ZeroBytes32;
|
40093
|
+
return calculateMinGasForTxUpload({
|
40094
|
+
gasCosts,
|
40095
|
+
baseMinGas: minGas.toNumber(),
|
40096
|
+
subsectionSize: arrayify(bytecode).length
|
40097
|
+
});
|
40098
|
+
}
|
40099
|
+
};
|
40100
|
+
|
39746
40101
|
// src/providers/transaction-request/utils.ts
|
39747
40102
|
var transactionRequestify = (obj) => {
|
39748
|
-
if (obj instanceof ScriptTransactionRequest || obj instanceof CreateTransactionRequest || obj instanceof BlobTransactionRequest) {
|
40103
|
+
if (obj instanceof ScriptTransactionRequest || obj instanceof CreateTransactionRequest || obj instanceof BlobTransactionRequest || obj instanceof UpgradeTransactionRequest || obj instanceof UploadTransactionRequest) {
|
39749
40104
|
return obj;
|
39750
40105
|
}
|
39751
40106
|
const { type: type3 } = obj;
|
@@ -39759,6 +40114,12 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
39759
40114
|
case TransactionType.Blob: {
|
39760
40115
|
return BlobTransactionRequest.from(obj);
|
39761
40116
|
}
|
40117
|
+
case TransactionType.Upgrade: {
|
40118
|
+
return UpgradeTransactionRequest.from(obj);
|
40119
|
+
}
|
40120
|
+
case TransactionType.Upload: {
|
40121
|
+
return UploadTransactionRequest.from(obj);
|
40122
|
+
}
|
39762
40123
|
default: {
|
39763
40124
|
throw new FuelError(
|
39764
40125
|
ErrorCode.UNSUPPORTED_TRANSACTION_TYPE,
|
@@ -39770,6 +40131,8 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
39770
40131
|
var isTransactionTypeScript = (request) => request.type === TransactionType.Script;
|
39771
40132
|
var isTransactionTypeCreate = (request) => request.type === TransactionType.Create;
|
39772
40133
|
var isTransactionTypeBlob = (request) => request.type === TransactionType.Blob;
|
40134
|
+
var isTransactionTypeUpgrade = (request) => request.type === TransactionType.Upgrade;
|
40135
|
+
var isTransactionTypeUpload = (request) => request.type === TransactionType.Upload;
|
39773
40136
|
|
39774
40137
|
// src/providers/transaction-summary/calculate-tx-fee-for-summary.ts
|
39775
40138
|
var calculateTXFeeForSummary = (params) => {
|
@@ -40029,6 +40392,10 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
40029
40392
|
return "Script" /* Script */;
|
40030
40393
|
case TransactionType.Blob:
|
40031
40394
|
return "Blob" /* Blob */;
|
40395
|
+
case TransactionType.Upgrade:
|
40396
|
+
return "Upgrade" /* Upgrade */;
|
40397
|
+
case TransactionType.Upload:
|
40398
|
+
return "Upload" /* Upload */;
|
40032
40399
|
default:
|
40033
40400
|
throw new FuelError(
|
40034
40401
|
ErrorCode.UNSUPPORTED_TRANSACTION_TYPE,
|
@@ -40210,8 +40577,8 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
40210
40577
|
}) {
|
40211
40578
|
const contractCallReceipts = getReceiptsCall(receipts);
|
40212
40579
|
const contractOutputs = getOutputsContract(outputs);
|
40213
|
-
return contractOutputs.flatMap((
|
40214
|
-
const contractInput = getInputContractFromIndex(inputs,
|
40580
|
+
return contractOutputs.flatMap((output2) => {
|
40581
|
+
const contractInput = getInputContractFromIndex(inputs, output2.inputIndex);
|
40215
40582
|
if (!contractInput) {
|
40216
40583
|
return [];
|
40217
40584
|
}
|
@@ -40233,7 +40600,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
40233
40600
|
let { from: fromAddress } = receipt;
|
40234
40601
|
const toType = contractInputs.some((input) => input.contractID === toAddress) ? 0 /* contract */ : 1 /* account */;
|
40235
40602
|
if (ZeroBytes32 === fromAddress) {
|
40236
|
-
const change = changeOutputs.find((
|
40603
|
+
const change = changeOutputs.find((output2) => output2.assetId === assetId);
|
40237
40604
|
fromAddress = change?.to || fromAddress;
|
40238
40605
|
}
|
40239
40606
|
const fromType = contractInputs.some((input) => input.contractID === fromAddress) ? 0 /* contract */ : 1 /* account */;
|
@@ -40311,7 +40678,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
40311
40678
|
}
|
40312
40679
|
function getPayProducerOperations(outputs) {
|
40313
40680
|
const coinOutputs = getOutputsCoin(outputs);
|
40314
|
-
const payProducerOperations = coinOutputs.reduce((prev,
|
40681
|
+
const payProducerOperations = coinOutputs.reduce((prev, output2) => {
|
40315
40682
|
const operations = addOperation(prev, {
|
40316
40683
|
name: "Pay network fee to block producer" /* payBlockProducer */,
|
40317
40684
|
from: {
|
@@ -40320,12 +40687,12 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
40320
40687
|
},
|
40321
40688
|
to: {
|
40322
40689
|
type: 1 /* account */,
|
40323
|
-
address:
|
40690
|
+
address: output2.to.toString()
|
40324
40691
|
},
|
40325
40692
|
assetsSent: [
|
40326
40693
|
{
|
40327
|
-
assetId:
|
40328
|
-
amount:
|
40694
|
+
assetId: output2.assetId.toString(),
|
40695
|
+
amount: output2.amount
|
40329
40696
|
}
|
40330
40697
|
]
|
40331
40698
|
});
|
@@ -40986,21 +41353,31 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
40986
41353
|
* @hidden
|
40987
41354
|
*/
|
40988
41355
|
constructor(url, options = {}) {
|
40989
|
-
this.url = url;
|
40990
41356
|
/**
|
40991
41357
|
* @hidden
|
40992
41358
|
*/
|
40993
41359
|
__privateAdd(this, _cacheInputs);
|
40994
41360
|
__publicField(this, "operations");
|
40995
41361
|
__publicField(this, "cache");
|
41362
|
+
/** @hidden */
|
41363
|
+
__publicField(this, "url");
|
41364
|
+
/** @hidden */
|
41365
|
+
__publicField(this, "urlWithoutAuth");
|
40996
41366
|
__publicField(this, "options", {
|
40997
41367
|
timeout: void 0,
|
40998
41368
|
resourceCacheTTL: void 0,
|
40999
41369
|
fetch: void 0,
|
41000
|
-
retryOptions: void 0
|
41370
|
+
retryOptions: void 0,
|
41371
|
+
headers: void 0
|
41001
41372
|
});
|
41373
|
+
const { url: rawUrl, urlWithoutAuth, headers } = _Provider.extractBasicAuth(url);
|
41374
|
+
this.url = rawUrl;
|
41375
|
+
this.urlWithoutAuth = urlWithoutAuth;
|
41002
41376
|
this.options = { ...this.options, ...options };
|
41003
41377
|
this.url = url;
|
41378
|
+
if (headers) {
|
41379
|
+
this.options = { ...this.options, headers: { ...this.options.headers, ...headers } };
|
41380
|
+
}
|
41004
41381
|
this.operations = this.createOperations();
|
41005
41382
|
const { resourceCacheTTL } = this.options;
|
41006
41383
|
if (isDefined(resourceCacheTTL)) {
|
@@ -41022,12 +41399,16 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
41022
41399
|
* @hidden
|
41023
41400
|
*/
|
41024
41401
|
static getFetchFn(options) {
|
41025
|
-
const { retryOptions, timeout } = options;
|
41402
|
+
const { retryOptions, timeout, headers } = options;
|
41026
41403
|
return autoRetryFetch(async (...args) => {
|
41027
41404
|
const url = args[0];
|
41028
41405
|
const request = args[1];
|
41029
41406
|
const signal = timeout ? AbortSignal.timeout(timeout) : void 0;
|
41030
|
-
let fullRequest = {
|
41407
|
+
let fullRequest = {
|
41408
|
+
...request,
|
41409
|
+
signal,
|
41410
|
+
headers: { ...request?.headers, ...headers }
|
41411
|
+
};
|
41031
41412
|
if (options.requestMiddleware) {
|
41032
41413
|
fullRequest = await options.requestMiddleware(fullRequest);
|
41033
41414
|
}
|
@@ -41035,15 +41416,23 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
41035
41416
|
}, retryOptions);
|
41036
41417
|
}
|
41037
41418
|
static extractBasicAuth(url) {
|
41038
|
-
|
41419
|
+
let parsedUrl;
|
41420
|
+
try {
|
41421
|
+
parsedUrl = new URL(url);
|
41422
|
+
} catch (error) {
|
41423
|
+
throw new FuelError(FuelError.CODES.INVALID_URL, "Invalid URL provided.", { url }, error);
|
41424
|
+
}
|
41039
41425
|
const username = parsedUrl.username;
|
41040
41426
|
const password = parsedUrl.password;
|
41041
|
-
const
|
41427
|
+
const urlWithoutAuth = `${parsedUrl.origin}${parsedUrl.pathname}`;
|
41042
41428
|
if (!(username && password)) {
|
41043
|
-
return { url,
|
41429
|
+
return { url, urlWithoutAuth: url, headers: void 0 };
|
41044
41430
|
}
|
41045
|
-
|
41046
|
-
|
41431
|
+
return {
|
41432
|
+
url,
|
41433
|
+
urlWithoutAuth,
|
41434
|
+
headers: { Authorization: `Basic ${btoa(`${username}:${password}`)}` }
|
41435
|
+
};
|
41047
41436
|
}
|
41048
41437
|
/**
|
41049
41438
|
* Creates a new instance of the Provider class. This is the recommended way to initialize a Provider.
|
@@ -41054,17 +41443,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
41054
41443
|
* @returns A promise that resolves to a Provider instance.
|
41055
41444
|
*/
|
41056
41445
|
static async create(url, options = {}) {
|
41057
|
-
const
|
41058
|
-
const provider = new _Provider(urlToUse, {
|
41059
|
-
...options,
|
41060
|
-
requestMiddleware: async (request) => {
|
41061
|
-
if (auth && request) {
|
41062
|
-
request.headers ??= {};
|
41063
|
-
request.headers.Authorization = auth;
|
41064
|
-
}
|
41065
|
-
return options.requestMiddleware?.(request) ?? request;
|
41066
|
-
}
|
41067
|
-
});
|
41446
|
+
const provider = new _Provider(url, options);
|
41068
41447
|
await provider.fetchChainAndNodeInfo();
|
41069
41448
|
return provider;
|
41070
41449
|
}
|
@@ -41074,7 +41453,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
41074
41453
|
* @returns the chain information configuration.
|
41075
41454
|
*/
|
41076
41455
|
getChain() {
|
41077
|
-
const chain = _Provider.chainInfoCache[this.
|
41456
|
+
const chain = _Provider.chainInfoCache[this.urlWithoutAuth];
|
41078
41457
|
if (!chain) {
|
41079
41458
|
throw new FuelError(
|
41080
41459
|
ErrorCode.CHAIN_INFO_CACHE_EMPTY,
|
@@ -41089,7 +41468,7 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
41089
41468
|
* @returns the node information configuration.
|
41090
41469
|
*/
|
41091
41470
|
getNode() {
|
41092
|
-
const node = _Provider.nodeInfoCache[this.
|
41471
|
+
const node = _Provider.nodeInfoCache[this.urlWithoutAuth];
|
41093
41472
|
if (!node) {
|
41094
41473
|
throw new FuelError(
|
41095
41474
|
ErrorCode.NODE_INFO_CACHE_EMPTY,
|
@@ -41123,8 +41502,11 @@ ${PANIC_DOC_URL}#variant.${statusReason}`;
|
|
41123
41502
|
* @param options - Additional options for the provider.
|
41124
41503
|
*/
|
41125
41504
|
async connect(url, options) {
|
41126
|
-
|
41505
|
+
const { url: rawUrl, urlWithoutAuth, headers } = _Provider.extractBasicAuth(url);
|
41506
|
+
this.url = rawUrl;
|
41507
|
+
this.urlWithoutAuth = urlWithoutAuth;
|
41127
41508
|
this.options = options ?? this.options;
|
41509
|
+
this.options = { ...this.options, headers: { ...this.options.headers, ...headers } };
|
41128
41510
|
this.operations = this.createOperations();
|
41129
41511
|
await this.fetchChainAndNodeInfo();
|
41130
41512
|
}
|
@@ -41164,7 +41546,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
41164
41546
|
*/
|
41165
41547
|
createOperations() {
|
41166
41548
|
const fetchFn = _Provider.getFetchFn(this.options);
|
41167
|
-
const gqlClient = new import_graphql_request.GraphQLClient(this.
|
41549
|
+
const gqlClient = new import_graphql_request.GraphQLClient(this.urlWithoutAuth, {
|
41168
41550
|
fetch: (url, requestInit) => fetchFn(url, requestInit, this.options),
|
41169
41551
|
responseMiddleware: (response) => {
|
41170
41552
|
if ("response" in response) {
|
@@ -41182,7 +41564,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
41182
41564
|
const isSubscription = opDefinition?.operation === "subscription";
|
41183
41565
|
if (isSubscription) {
|
41184
41566
|
return FuelGraphqlSubscriber.create({
|
41185
|
-
url: this.
|
41567
|
+
url: this.urlWithoutAuth,
|
41186
41568
|
query,
|
41187
41569
|
fetchFn: (url, requestInit) => fetchFn(url, requestInit, this.options),
|
41188
41570
|
variables: vars
|
@@ -41245,7 +41627,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
41245
41627
|
utxoValidation: nodeInfo.utxoValidation,
|
41246
41628
|
vmBacktrace: nodeInfo.vmBacktrace
|
41247
41629
|
};
|
41248
|
-
_Provider.nodeInfoCache[this.
|
41630
|
+
_Provider.nodeInfoCache[this.urlWithoutAuth] = processedNodeInfo;
|
41249
41631
|
return processedNodeInfo;
|
41250
41632
|
}
|
41251
41633
|
/**
|
@@ -41256,7 +41638,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
41256
41638
|
async fetchChain() {
|
41257
41639
|
const { chain } = await this.operations.getChain();
|
41258
41640
|
const processedChain = processGqlChain(chain);
|
41259
|
-
_Provider.chainInfoCache[this.
|
41641
|
+
_Provider.chainInfoCache[this.urlWithoutAuth] = processedChain;
|
41260
41642
|
return processedChain;
|
41261
41643
|
}
|
41262
41644
|
/**
|
@@ -42411,10 +42793,10 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
42411
42793
|
gasPrice,
|
42412
42794
|
baseAssetId
|
42413
42795
|
});
|
42414
|
-
const
|
42796
|
+
const output2 = {
|
42415
42797
|
...transactionSummary
|
42416
42798
|
};
|
42417
|
-
return
|
42799
|
+
return output2;
|
42418
42800
|
});
|
42419
42801
|
return {
|
42420
42802
|
transactions,
|
@@ -42425,12 +42807,14 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
42425
42807
|
// src/providers/chains.ts
|
42426
42808
|
var CHAIN_IDS = {
|
42427
42809
|
eth: {
|
42810
|
+
mainnet: 1,
|
42428
42811
|
sepolia: 11155111,
|
42429
42812
|
foundry: 31337
|
42430
42813
|
},
|
42431
42814
|
fuel: {
|
42432
42815
|
devnet: 0,
|
42433
|
-
testnet: 0
|
42816
|
+
testnet: 0,
|
42817
|
+
mainnet: 9889
|
42434
42818
|
}
|
42435
42819
|
};
|
42436
42820
|
|
@@ -42530,6 +42914,11 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
42530
42914
|
chainId: CHAIN_IDS.eth.foundry,
|
42531
42915
|
decimals: 18
|
42532
42916
|
},
|
42917
|
+
{
|
42918
|
+
type: "ethereum",
|
42919
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
42920
|
+
decimals: 18
|
42921
|
+
},
|
42533
42922
|
{
|
42534
42923
|
type: "fuel",
|
42535
42924
|
chainId: CHAIN_IDS.fuel.devnet,
|
@@ -42541,6 +42930,571 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
42541
42930
|
chainId: CHAIN_IDS.fuel.testnet,
|
42542
42931
|
decimals: 9,
|
42543
42932
|
assetId: "0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07"
|
42933
|
+
},
|
42934
|
+
{
|
42935
|
+
type: "fuel",
|
42936
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
42937
|
+
decimals: 9,
|
42938
|
+
assetId: "0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07"
|
42939
|
+
}
|
42940
|
+
]
|
42941
|
+
},
|
42942
|
+
{
|
42943
|
+
name: "WETH",
|
42944
|
+
symbol: "WETH",
|
42945
|
+
icon: "weth.svg",
|
42946
|
+
networks: [
|
42947
|
+
{
|
42948
|
+
type: "ethereum",
|
42949
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
42950
|
+
address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
42951
|
+
decimals: 18
|
42952
|
+
},
|
42953
|
+
{
|
42954
|
+
type: "fuel",
|
42955
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
42956
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
42957
|
+
assetId: "0xa38a5a8beeb08d95744bc7f58528073f4052b254def59eba20c99c202b5acaa3",
|
42958
|
+
decimals: 18
|
42959
|
+
}
|
42960
|
+
]
|
42961
|
+
},
|
42962
|
+
{
|
42963
|
+
name: "weETH",
|
42964
|
+
symbol: "weETH",
|
42965
|
+
icon: "weETH.webp",
|
42966
|
+
networks: [
|
42967
|
+
{
|
42968
|
+
type: "ethereum",
|
42969
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
42970
|
+
address: "0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee",
|
42971
|
+
decimals: 18
|
42972
|
+
},
|
42973
|
+
{
|
42974
|
+
type: "fuel",
|
42975
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
42976
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
42977
|
+
assetId: "0x239ed6e12b7ce4089ee245244e3bf906999a6429c2a9a445a1e1faf56914a4ab",
|
42978
|
+
decimals: 18
|
42979
|
+
}
|
42980
|
+
]
|
42981
|
+
},
|
42982
|
+
{
|
42983
|
+
name: "rsETH",
|
42984
|
+
symbol: "rsETH",
|
42985
|
+
icon: "rsETH.webp",
|
42986
|
+
networks: [
|
42987
|
+
{
|
42988
|
+
type: "ethereum",
|
42989
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
42990
|
+
address: "0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7",
|
42991
|
+
decimals: 18
|
42992
|
+
},
|
42993
|
+
{
|
42994
|
+
type: "fuel",
|
42995
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
42996
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
42997
|
+
assetId: "0xbae80f7fb8aa6b90d9b01ef726ec847cc4f59419c4d5f2ea88fec785d1b0e849",
|
42998
|
+
decimals: 18
|
42999
|
+
}
|
43000
|
+
]
|
43001
|
+
},
|
43002
|
+
{
|
43003
|
+
name: "rETH",
|
43004
|
+
symbol: "rETH",
|
43005
|
+
icon: "reth.svg",
|
43006
|
+
networks: [
|
43007
|
+
{
|
43008
|
+
type: "ethereum",
|
43009
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43010
|
+
address: "0xae78736cd615f374d3085123a210448e74fc6393",
|
43011
|
+
decimals: 18
|
43012
|
+
},
|
43013
|
+
{
|
43014
|
+
type: "fuel",
|
43015
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43016
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43017
|
+
assetId: "0xf3f9a0ed0ce8eac5f89d6b83e41b3848212d5b5f56108c54a205bb228ca30c16",
|
43018
|
+
decimals: 18
|
43019
|
+
}
|
43020
|
+
]
|
43021
|
+
},
|
43022
|
+
{
|
43023
|
+
name: "wbETH",
|
43024
|
+
symbol: "wbETH",
|
43025
|
+
icon: "wbeth.png",
|
43026
|
+
networks: [
|
43027
|
+
{
|
43028
|
+
type: "ethereum",
|
43029
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43030
|
+
address: "0xa2E3356610840701BDf5611a53974510Ae27E2e1",
|
43031
|
+
decimals: 18
|
43032
|
+
},
|
43033
|
+
{
|
43034
|
+
type: "fuel",
|
43035
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43036
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43037
|
+
assetId: "0x7843c74bef935e837f2bcf67b5d64ecb46dd53ff86375530b0caf3699e8ffafe",
|
43038
|
+
decimals: 18
|
43039
|
+
}
|
43040
|
+
]
|
43041
|
+
},
|
43042
|
+
{
|
43043
|
+
name: "rstETH",
|
43044
|
+
symbol: "rstETH",
|
43045
|
+
icon: "rstETH.webp",
|
43046
|
+
networks: [
|
43047
|
+
{
|
43048
|
+
type: "ethereum",
|
43049
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43050
|
+
address: "0x7a4EffD87C2f3C55CA251080b1343b605f327E3a",
|
43051
|
+
decimals: 18
|
43052
|
+
},
|
43053
|
+
{
|
43054
|
+
type: "fuel",
|
43055
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43056
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43057
|
+
assetId: "0x962792286fbc9b1d5860b4551362a12249362c21594c77abf4b3fe2bbe8d977a",
|
43058
|
+
decimals: 18
|
43059
|
+
}
|
43060
|
+
]
|
43061
|
+
},
|
43062
|
+
{
|
43063
|
+
name: "amphrETH",
|
43064
|
+
symbol: "amphrETH",
|
43065
|
+
icon: "amphrETH.png",
|
43066
|
+
networks: [
|
43067
|
+
{
|
43068
|
+
type: "ethereum",
|
43069
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43070
|
+
address: "0x5fD13359Ba15A84B76f7F87568309040176167cd",
|
43071
|
+
decimals: 18
|
43072
|
+
},
|
43073
|
+
{
|
43074
|
+
type: "fuel",
|
43075
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43076
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43077
|
+
assetId: "0x05fc623e57bd7bc1258efa8e4f62b05af5471d73df6f2c2dc11ecc81134c4f36",
|
43078
|
+
decimals: 18
|
43079
|
+
}
|
43080
|
+
]
|
43081
|
+
},
|
43082
|
+
{
|
43083
|
+
name: "Manta mBTC",
|
43084
|
+
symbol: "Manta mBTC",
|
43085
|
+
icon: "manta-mbtc.svg",
|
43086
|
+
networks: [
|
43087
|
+
{
|
43088
|
+
type: "ethereum",
|
43089
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43090
|
+
address: "0x4041381e947CFD3D483d67a25C6aa9Dc924250c5",
|
43091
|
+
decimals: 18
|
43092
|
+
},
|
43093
|
+
{
|
43094
|
+
type: "fuel",
|
43095
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43096
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43097
|
+
assetId: "0xaf3111a248ff7a3238cdeea845bb2d43cf3835f1f6b8c9d28360728b55b9ce5b",
|
43098
|
+
decimals: 18
|
43099
|
+
}
|
43100
|
+
]
|
43101
|
+
},
|
43102
|
+
{
|
43103
|
+
name: "Manta mETH",
|
43104
|
+
symbol: "Manta mETH",
|
43105
|
+
icon: "manta-meth.svg",
|
43106
|
+
networks: [
|
43107
|
+
{
|
43108
|
+
type: "ethereum",
|
43109
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43110
|
+
address: "0x8CdF550C04Bc9B9F10938368349C9c8051A772b6",
|
43111
|
+
decimals: 18
|
43112
|
+
},
|
43113
|
+
{
|
43114
|
+
type: "fuel",
|
43115
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43116
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43117
|
+
assetId: "0xafd219f513317b1750783c6581f55530d6cf189a5863fd18bd1b3ffcec1714b4",
|
43118
|
+
decimals: 18
|
43119
|
+
}
|
43120
|
+
]
|
43121
|
+
},
|
43122
|
+
{
|
43123
|
+
name: "Manta mUSD",
|
43124
|
+
symbol: "Manta mUSD",
|
43125
|
+
icon: "manta-musd.svg",
|
43126
|
+
networks: [
|
43127
|
+
{
|
43128
|
+
type: "ethereum",
|
43129
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43130
|
+
address: "0x3f24E1d7a973867fC2A03fE199E5502514E0e11E",
|
43131
|
+
decimals: 18
|
43132
|
+
},
|
43133
|
+
{
|
43134
|
+
type: "fuel",
|
43135
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43136
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43137
|
+
assetId: "0x89cb9401e55d49c3269654dd1cdfb0e80e57823a4a7db98ba8fc5953b120fef4",
|
43138
|
+
decimals: 18
|
43139
|
+
}
|
43140
|
+
]
|
43141
|
+
},
|
43142
|
+
{
|
43143
|
+
name: "pumpBTC",
|
43144
|
+
symbol: "pumpBTC",
|
43145
|
+
icon: "pumpbtc.webp",
|
43146
|
+
networks: [
|
43147
|
+
{
|
43148
|
+
type: "ethereum",
|
43149
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43150
|
+
address: "0xf469fbd2abcd6b9de8e169d128226c0fc90a012e",
|
43151
|
+
decimals: 8
|
43152
|
+
},
|
43153
|
+
{
|
43154
|
+
type: "fuel",
|
43155
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43156
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43157
|
+
assetId: "0x0aa5eb2bb97ca915288b653a2529355d4dc66de2b37533213f0e4aeee3d3421f",
|
43158
|
+
decimals: 8
|
43159
|
+
}
|
43160
|
+
]
|
43161
|
+
},
|
43162
|
+
{
|
43163
|
+
name: "FBTC",
|
43164
|
+
symbol: "FBTC",
|
43165
|
+
icon: "fbtc.svg",
|
43166
|
+
networks: [
|
43167
|
+
{
|
43168
|
+
type: "ethereum",
|
43169
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43170
|
+
address: "0xc96de26018a54d51c097160568752c4e3bd6c364",
|
43171
|
+
decimals: 8
|
43172
|
+
},
|
43173
|
+
{
|
43174
|
+
type: "fuel",
|
43175
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43176
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43177
|
+
assetId: "0xb5ecb0a1e08e2abbabf624ffea089df933376855f468ade35c6375b00c33996a",
|
43178
|
+
decimals: 8
|
43179
|
+
}
|
43180
|
+
]
|
43181
|
+
},
|
43182
|
+
{
|
43183
|
+
name: "SolvBTC",
|
43184
|
+
symbol: "SolvBTC",
|
43185
|
+
icon: "solvBTC.webp",
|
43186
|
+
networks: [
|
43187
|
+
{
|
43188
|
+
type: "ethereum",
|
43189
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43190
|
+
address: "0x7a56e1c57c7475ccf742a1832b028f0456652f97",
|
43191
|
+
decimals: 18
|
43192
|
+
},
|
43193
|
+
{
|
43194
|
+
type: "fuel",
|
43195
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43196
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43197
|
+
assetId: "0x1186afea9affb88809c210e13e2330b5258c2cef04bb8fff5eff372b7bd3f40f",
|
43198
|
+
decimals: 18
|
43199
|
+
}
|
43200
|
+
]
|
43201
|
+
},
|
43202
|
+
{
|
43203
|
+
name: "SolvBTC.BBN",
|
43204
|
+
symbol: "SolvBTC.BBN",
|
43205
|
+
icon: "SolvBTC.BBN.png",
|
43206
|
+
networks: [
|
43207
|
+
{
|
43208
|
+
type: "ethereum",
|
43209
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43210
|
+
address: "0xd9d920aa40f578ab794426f5c90f6c731d159def",
|
43211
|
+
decimals: 18
|
43212
|
+
},
|
43213
|
+
{
|
43214
|
+
type: "fuel",
|
43215
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43216
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43217
|
+
assetId: "0x7a4f087c957d30218223c2baaaa365355c9ca81b6ea49004cfb1590a5399216f",
|
43218
|
+
decimals: 18
|
43219
|
+
}
|
43220
|
+
]
|
43221
|
+
},
|
43222
|
+
{
|
43223
|
+
name: "Mantle mETH",
|
43224
|
+
symbol: "Mantle mETH",
|
43225
|
+
icon: "mantle-meth.svg",
|
43226
|
+
networks: [
|
43227
|
+
{
|
43228
|
+
type: "ethereum",
|
43229
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43230
|
+
address: "0xd5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa",
|
43231
|
+
decimals: 18
|
43232
|
+
},
|
43233
|
+
{
|
43234
|
+
type: "fuel",
|
43235
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43236
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43237
|
+
assetId: "0x642a5db59ec323c2f846d4d4cf3e58d78aff64accf4f8f6455ba0aa3ef000a3b",
|
43238
|
+
decimals: 18
|
43239
|
+
}
|
43240
|
+
]
|
43241
|
+
},
|
43242
|
+
{
|
43243
|
+
name: "sDAI",
|
43244
|
+
symbol: "sDAI",
|
43245
|
+
icon: "sdai.svg",
|
43246
|
+
networks: [
|
43247
|
+
{
|
43248
|
+
type: "ethereum",
|
43249
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43250
|
+
address: "0x83f20f44975d03b1b09e64809b757c47f942beea",
|
43251
|
+
decimals: 18
|
43252
|
+
},
|
43253
|
+
{
|
43254
|
+
type: "fuel",
|
43255
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43256
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43257
|
+
assetId: "0x9e46f919fbf978f3cad7cd34cca982d5613af63ff8aab6c379e4faa179552958",
|
43258
|
+
decimals: 18
|
43259
|
+
}
|
43260
|
+
]
|
43261
|
+
},
|
43262
|
+
{
|
43263
|
+
name: "USDT",
|
43264
|
+
symbol: "USDT",
|
43265
|
+
icon: "usdt.svg",
|
43266
|
+
networks: [
|
43267
|
+
{
|
43268
|
+
type: "ethereum",
|
43269
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43270
|
+
address: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
43271
|
+
decimals: 6
|
43272
|
+
},
|
43273
|
+
{
|
43274
|
+
type: "fuel",
|
43275
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43276
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43277
|
+
assetId: "0xa0265fb5c32f6e8db3197af3c7eb05c48ae373605b8165b6f4a51c5b0ba4812e",
|
43278
|
+
decimals: 6
|
43279
|
+
}
|
43280
|
+
]
|
43281
|
+
},
|
43282
|
+
{
|
43283
|
+
name: "USDC",
|
43284
|
+
symbol: "USDC",
|
43285
|
+
icon: "usdc.svg",
|
43286
|
+
networks: [
|
43287
|
+
{
|
43288
|
+
type: "ethereum",
|
43289
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43290
|
+
address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
43291
|
+
decimals: 6
|
43292
|
+
},
|
43293
|
+
{
|
43294
|
+
type: "fuel",
|
43295
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43296
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43297
|
+
assetId: "0x286c479da40dc953bddc3bb4c453b608bba2e0ac483b077bd475174115395e6b",
|
43298
|
+
decimals: 6
|
43299
|
+
}
|
43300
|
+
]
|
43301
|
+
},
|
43302
|
+
{
|
43303
|
+
name: "USDe",
|
43304
|
+
symbol: "USDe",
|
43305
|
+
icon: "USDe.svg",
|
43306
|
+
networks: [
|
43307
|
+
{
|
43308
|
+
type: "ethereum",
|
43309
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43310
|
+
address: "0x4c9edd5852cd905f086c759e8383e09bff1e68b3",
|
43311
|
+
decimals: 18
|
43312
|
+
},
|
43313
|
+
{
|
43314
|
+
type: "ethereum",
|
43315
|
+
chainId: CHAIN_IDS.eth.sepolia,
|
43316
|
+
address: "0xc6387efad0f184a90b34f397c3d6fd63135ef790",
|
43317
|
+
decimals: 18
|
43318
|
+
},
|
43319
|
+
{
|
43320
|
+
type: "fuel",
|
43321
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43322
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43323
|
+
assetId: "0xb6133b2ef9f6153eb869125d23dcf20d1e735331b5e41b15a6a7a6cec70e8651",
|
43324
|
+
decimals: 18
|
43325
|
+
},
|
43326
|
+
{
|
43327
|
+
type: "fuel",
|
43328
|
+
chainId: CHAIN_IDS.fuel.testnet,
|
43329
|
+
contractId: "0xC6387efAD0F184a90B34f397C3d6Fd63135ef790",
|
43330
|
+
assetId: "0xf5c6d72d0f2c782fa47d8e228c198a08654e9fc66ca60ad85902b1d09046a7ab",
|
43331
|
+
decimals: 18
|
43332
|
+
}
|
43333
|
+
]
|
43334
|
+
},
|
43335
|
+
{
|
43336
|
+
name: "sUSDe",
|
43337
|
+
symbol: "sUSDe",
|
43338
|
+
icon: "sUSDe.webp",
|
43339
|
+
networks: [
|
43340
|
+
{
|
43341
|
+
type: "ethereum",
|
43342
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43343
|
+
address: "0x9d39a5de30e57443bff2a8307a4256c8797a3497",
|
43344
|
+
decimals: 18
|
43345
|
+
},
|
43346
|
+
{
|
43347
|
+
type: "ethereum",
|
43348
|
+
chainId: CHAIN_IDS.eth.sepolia,
|
43349
|
+
address: "0xb8f4f4eafc1d2a3c0a4d519bbf1114c311cc9b1b",
|
43350
|
+
decimals: 18
|
43351
|
+
},
|
43352
|
+
{
|
43353
|
+
type: "fuel",
|
43354
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43355
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43356
|
+
assetId: "0xd05563025104fc36496c15c7021ad6b31034b0e89a356f4f818045d1f48808bc",
|
43357
|
+
decimals: 18
|
43358
|
+
},
|
43359
|
+
{
|
43360
|
+
type: "fuel",
|
43361
|
+
chainId: CHAIN_IDS.fuel.testnet,
|
43362
|
+
contractId: "0xC6387efAD0F184a90B34f397C3d6Fd63135ef790",
|
43363
|
+
assetId: "0xa86e37d385c08beddbb02c8260f9ec535d484c8ea908fc19d4e6dc8d5141fb2e",
|
43364
|
+
decimals: 18
|
43365
|
+
}
|
43366
|
+
]
|
43367
|
+
},
|
43368
|
+
{
|
43369
|
+
name: "rsUSDe",
|
43370
|
+
symbol: "rsUSDe",
|
43371
|
+
icon: "rsUSDe.svg",
|
43372
|
+
networks: [
|
43373
|
+
{
|
43374
|
+
type: "ethereum",
|
43375
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43376
|
+
address: "0x82f5104b23FF2FA54C2345F821dAc9369e9E0B26",
|
43377
|
+
decimals: 18
|
43378
|
+
},
|
43379
|
+
{
|
43380
|
+
type: "fuel",
|
43381
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43382
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43383
|
+
assetId: "0x78d4522ec607f6e8efb66ea49439d1ee48623cf763f9688a8eada025def033d9",
|
43384
|
+
decimals: 18
|
43385
|
+
}
|
43386
|
+
]
|
43387
|
+
},
|
43388
|
+
{
|
43389
|
+
name: "wstETH",
|
43390
|
+
symbol: "wstETH",
|
43391
|
+
icon: "wsteth.svg",
|
43392
|
+
networks: [
|
43393
|
+
{
|
43394
|
+
type: "ethereum",
|
43395
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43396
|
+
address: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
|
43397
|
+
decimals: 18
|
43398
|
+
},
|
43399
|
+
{
|
43400
|
+
type: "ethereum",
|
43401
|
+
chainId: CHAIN_IDS.eth.sepolia,
|
43402
|
+
address: "0xB82381A3fBD3FaFA77B3a7bE693342618240067b",
|
43403
|
+
decimals: 18
|
43404
|
+
},
|
43405
|
+
{
|
43406
|
+
type: "fuel",
|
43407
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43408
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43409
|
+
assetId: "0x1a7815cc9f75db5c24a5b0814bfb706bb9fe485333e98254015de8f48f84c67b",
|
43410
|
+
decimals: 18
|
43411
|
+
},
|
43412
|
+
{
|
43413
|
+
type: "fuel",
|
43414
|
+
chainId: CHAIN_IDS.fuel.testnet,
|
43415
|
+
contractId: "0xC6387efAD0F184a90B34f397C3d6Fd63135ef790",
|
43416
|
+
assetId: "0x4c467e3fd4f32179e1aad3b92ebbdaa6ff6aeda5b8da5f8e64e96405eb52a7f5",
|
43417
|
+
decimals: 18
|
43418
|
+
}
|
43419
|
+
]
|
43420
|
+
},
|
43421
|
+
{
|
43422
|
+
name: "ezETH",
|
43423
|
+
symbol: "ezETH",
|
43424
|
+
icon: "ezeth.webp",
|
43425
|
+
networks: [
|
43426
|
+
{
|
43427
|
+
type: "ethereum",
|
43428
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43429
|
+
address: "0xbf5495Efe5DB9ce00f80364C8B423567e58d2110",
|
43430
|
+
decimals: 18
|
43431
|
+
},
|
43432
|
+
{
|
43433
|
+
type: "fuel",
|
43434
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43435
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43436
|
+
assetId: "0x91b3559edb2619cde8ffb2aa7b3c3be97efd794ea46700db7092abeee62281b0",
|
43437
|
+
decimals: 18
|
43438
|
+
}
|
43439
|
+
]
|
43440
|
+
},
|
43441
|
+
{
|
43442
|
+
name: "pzETH",
|
43443
|
+
symbol: "pzETH",
|
43444
|
+
icon: "pzETH.webp",
|
43445
|
+
networks: [
|
43446
|
+
{
|
43447
|
+
type: "ethereum",
|
43448
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43449
|
+
address: "0x8c9532a60e0e7c6bbd2b2c1303f63ace1c3e9811",
|
43450
|
+
decimals: 18
|
43451
|
+
},
|
43452
|
+
{
|
43453
|
+
type: "fuel",
|
43454
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43455
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43456
|
+
assetId: "0x1493d4ec82124de8f9b625682de69dcccda79e882b89a55a8c737b12de67bd68",
|
43457
|
+
decimals: 18
|
43458
|
+
}
|
43459
|
+
]
|
43460
|
+
},
|
43461
|
+
{
|
43462
|
+
name: "Re7LRT",
|
43463
|
+
symbol: "Re7LRT",
|
43464
|
+
icon: "Re7LRT.png",
|
43465
|
+
networks: [
|
43466
|
+
{
|
43467
|
+
type: "ethereum",
|
43468
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43469
|
+
address: "0x84631c0d0081FDe56DeB72F6DE77abBbF6A9f93a",
|
43470
|
+
decimals: 18
|
43471
|
+
},
|
43472
|
+
{
|
43473
|
+
type: "fuel",
|
43474
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43475
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43476
|
+
assetId: "0xf2fc648c23a5db24610a1cf696acc4f0f6d9a7d6028dd9944964ab23f6e35995",
|
43477
|
+
decimals: 18
|
43478
|
+
}
|
43479
|
+
]
|
43480
|
+
},
|
43481
|
+
{
|
43482
|
+
name: "steakLRT",
|
43483
|
+
symbol: "steakLRT",
|
43484
|
+
icon: "steakLRT.png",
|
43485
|
+
networks: [
|
43486
|
+
{
|
43487
|
+
type: "ethereum",
|
43488
|
+
chainId: CHAIN_IDS.eth.mainnet,
|
43489
|
+
address: "0xBEEF69Ac7870777598A04B2bd4771c71212E6aBc",
|
43490
|
+
decimals: 18
|
43491
|
+
},
|
43492
|
+
{
|
43493
|
+
type: "fuel",
|
43494
|
+
chainId: CHAIN_IDS.fuel.mainnet,
|
43495
|
+
contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
|
43496
|
+
assetId: "0x4fc8ac9f101df07e2c2dec4a53c8c42c439bdbe5e36ea2d863a61ff60afafc30",
|
43497
|
+
decimals: 18
|
42544
43498
|
}
|
42545
43499
|
]
|
42546
43500
|
}
|
@@ -43077,7 +44031,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
43077
44031
|
*/
|
43078
44032
|
generateFakeResources(coins) {
|
43079
44033
|
return coins.map((coin) => ({
|
43080
|
-
id: hexlify(
|
44034
|
+
id: hexlify(randomBytes22(UTXO_ID_LEN)),
|
43081
44035
|
owner: this.address,
|
43082
44036
|
blockCreated: bn(1),
|
43083
44037
|
txCreatedIdx: bn(1),
|
@@ -43134,414 +44088,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
43134
44088
|
}
|
43135
44089
|
};
|
43136
44090
|
|
43137
|
-
// ../../node_modules/.pnpm/@noble+
|
43138
|
-
function number2(n) {
|
43139
|
-
if (!Number.isSafeInteger(n) || n < 0)
|
43140
|
-
throw new Error(`positive integer expected, not ${n}`);
|
43141
|
-
}
|
43142
|
-
function isBytes4(a) {
|
43143
|
-
return a instanceof Uint8Array || a != null && typeof a === "object" && a.constructor.name === "Uint8Array";
|
43144
|
-
}
|
43145
|
-
function bytes2(b, ...lengths) {
|
43146
|
-
if (!isBytes4(b))
|
43147
|
-
throw new Error("Uint8Array expected");
|
43148
|
-
if (lengths.length > 0 && !lengths.includes(b.length))
|
43149
|
-
throw new Error(`Uint8Array expected of length ${lengths}, not of length=${b.length}`);
|
43150
|
-
}
|
43151
|
-
function hash3(h) {
|
43152
|
-
if (typeof h !== "function" || typeof h.create !== "function")
|
43153
|
-
throw new Error("Hash should be wrapped by utils.wrapConstructor");
|
43154
|
-
number2(h.outputLen);
|
43155
|
-
number2(h.blockLen);
|
43156
|
-
}
|
43157
|
-
function exists2(instance, checkFinished = true) {
|
43158
|
-
if (instance.destroyed)
|
43159
|
-
throw new Error("Hash instance has been destroyed");
|
43160
|
-
if (checkFinished && instance.finished)
|
43161
|
-
throw new Error("Hash#digest() has already been called");
|
43162
|
-
}
|
43163
|
-
function output2(out, instance) {
|
43164
|
-
bytes2(out);
|
43165
|
-
const min = instance.outputLen;
|
43166
|
-
if (out.length < min) {
|
43167
|
-
throw new Error(`digestInto() expects output buffer of length at least ${min}`);
|
43168
|
-
}
|
43169
|
-
}
|
43170
|
-
|
43171
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.4.0/node_modules/@noble/hashes/esm/cryptoNode.js
|
43172
|
-
var nc = __toESM(__require("crypto"), 1);
|
43173
|
-
var crypto4 = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : void 0;
|
43174
|
-
|
43175
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.4.0/node_modules/@noble/hashes/esm/utils.js
|
43176
|
-
var createView2 = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
|
43177
|
-
var rotr2 = (word, shift) => word << 32 - shift | word >>> shift;
|
43178
|
-
var isLE2 = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
43179
|
-
function utf8ToBytes3(str) {
|
43180
|
-
if (typeof str !== "string")
|
43181
|
-
throw new Error(`utf8ToBytes expected string, got ${typeof str}`);
|
43182
|
-
return new Uint8Array(new TextEncoder().encode(str));
|
43183
|
-
}
|
43184
|
-
function toBytes3(data) {
|
43185
|
-
if (typeof data === "string")
|
43186
|
-
data = utf8ToBytes3(data);
|
43187
|
-
bytes2(data);
|
43188
|
-
return data;
|
43189
|
-
}
|
43190
|
-
function concatBytes3(...arrays) {
|
43191
|
-
let sum = 0;
|
43192
|
-
for (let i = 0; i < arrays.length; i++) {
|
43193
|
-
const a = arrays[i];
|
43194
|
-
bytes2(a);
|
43195
|
-
sum += a.length;
|
43196
|
-
}
|
43197
|
-
const res = new Uint8Array(sum);
|
43198
|
-
for (let i = 0, pad = 0; i < arrays.length; i++) {
|
43199
|
-
const a = arrays[i];
|
43200
|
-
res.set(a, pad);
|
43201
|
-
pad += a.length;
|
43202
|
-
}
|
43203
|
-
return res;
|
43204
|
-
}
|
43205
|
-
var Hash2 = class {
|
43206
|
-
// Safe version that clones internal state
|
43207
|
-
clone() {
|
43208
|
-
return this._cloneInto();
|
43209
|
-
}
|
43210
|
-
};
|
43211
|
-
var toStr2 = {}.toString;
|
43212
|
-
function wrapConstructor2(hashCons) {
|
43213
|
-
const hashC = (msg) => hashCons().update(toBytes3(msg)).digest();
|
43214
|
-
const tmp = hashCons();
|
43215
|
-
hashC.outputLen = tmp.outputLen;
|
43216
|
-
hashC.blockLen = tmp.blockLen;
|
43217
|
-
hashC.create = () => hashCons();
|
43218
|
-
return hashC;
|
43219
|
-
}
|
43220
|
-
function randomBytes3(bytesLength = 32) {
|
43221
|
-
if (crypto4 && typeof crypto4.getRandomValues === "function") {
|
43222
|
-
return crypto4.getRandomValues(new Uint8Array(bytesLength));
|
43223
|
-
}
|
43224
|
-
throw new Error("crypto.getRandomValues must be defined");
|
43225
|
-
}
|
43226
|
-
|
43227
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.4.0/node_modules/@noble/hashes/esm/_md.js
|
43228
|
-
function setBigUint642(view, byteOffset, value, isLE3) {
|
43229
|
-
if (typeof view.setBigUint64 === "function")
|
43230
|
-
return view.setBigUint64(byteOffset, value, isLE3);
|
43231
|
-
const _32n2 = BigInt(32);
|
43232
|
-
const _u32_max = BigInt(4294967295);
|
43233
|
-
const wh = Number(value >> _32n2 & _u32_max);
|
43234
|
-
const wl = Number(value & _u32_max);
|
43235
|
-
const h = isLE3 ? 4 : 0;
|
43236
|
-
const l = isLE3 ? 0 : 4;
|
43237
|
-
view.setUint32(byteOffset + h, wh, isLE3);
|
43238
|
-
view.setUint32(byteOffset + l, wl, isLE3);
|
43239
|
-
}
|
43240
|
-
var Chi2 = (a, b, c) => a & b ^ ~a & c;
|
43241
|
-
var Maj2 = (a, b, c) => a & b ^ a & c ^ b & c;
|
43242
|
-
var HashMD = class extends Hash2 {
|
43243
|
-
constructor(blockLen, outputLen, padOffset, isLE3) {
|
43244
|
-
super();
|
43245
|
-
this.blockLen = blockLen;
|
43246
|
-
this.outputLen = outputLen;
|
43247
|
-
this.padOffset = padOffset;
|
43248
|
-
this.isLE = isLE3;
|
43249
|
-
this.finished = false;
|
43250
|
-
this.length = 0;
|
43251
|
-
this.pos = 0;
|
43252
|
-
this.destroyed = false;
|
43253
|
-
this.buffer = new Uint8Array(blockLen);
|
43254
|
-
this.view = createView2(this.buffer);
|
43255
|
-
}
|
43256
|
-
update(data) {
|
43257
|
-
exists2(this);
|
43258
|
-
const { view, buffer, blockLen } = this;
|
43259
|
-
data = toBytes3(data);
|
43260
|
-
const len = data.length;
|
43261
|
-
for (let pos = 0; pos < len; ) {
|
43262
|
-
const take = Math.min(blockLen - this.pos, len - pos);
|
43263
|
-
if (take === blockLen) {
|
43264
|
-
const dataView = createView2(data);
|
43265
|
-
for (; blockLen <= len - pos; pos += blockLen)
|
43266
|
-
this.process(dataView, pos);
|
43267
|
-
continue;
|
43268
|
-
}
|
43269
|
-
buffer.set(data.subarray(pos, pos + take), this.pos);
|
43270
|
-
this.pos += take;
|
43271
|
-
pos += take;
|
43272
|
-
if (this.pos === blockLen) {
|
43273
|
-
this.process(view, 0);
|
43274
|
-
this.pos = 0;
|
43275
|
-
}
|
43276
|
-
}
|
43277
|
-
this.length += data.length;
|
43278
|
-
this.roundClean();
|
43279
|
-
return this;
|
43280
|
-
}
|
43281
|
-
digestInto(out) {
|
43282
|
-
exists2(this);
|
43283
|
-
output2(out, this);
|
43284
|
-
this.finished = true;
|
43285
|
-
const { buffer, view, blockLen, isLE: isLE3 } = this;
|
43286
|
-
let { pos } = this;
|
43287
|
-
buffer[pos++] = 128;
|
43288
|
-
this.buffer.subarray(pos).fill(0);
|
43289
|
-
if (this.padOffset > blockLen - pos) {
|
43290
|
-
this.process(view, 0);
|
43291
|
-
pos = 0;
|
43292
|
-
}
|
43293
|
-
for (let i = pos; i < blockLen; i++)
|
43294
|
-
buffer[i] = 0;
|
43295
|
-
setBigUint642(view, blockLen - 8, BigInt(this.length * 8), isLE3);
|
43296
|
-
this.process(view, 0);
|
43297
|
-
const oview = createView2(out);
|
43298
|
-
const len = this.outputLen;
|
43299
|
-
if (len % 4)
|
43300
|
-
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
43301
|
-
const outLen = len / 4;
|
43302
|
-
const state = this.get();
|
43303
|
-
if (outLen > state.length)
|
43304
|
-
throw new Error("_sha2: outputLen bigger than state");
|
43305
|
-
for (let i = 0; i < outLen; i++)
|
43306
|
-
oview.setUint32(4 * i, state[i], isLE3);
|
43307
|
-
}
|
43308
|
-
digest() {
|
43309
|
-
const { buffer, outputLen } = this;
|
43310
|
-
this.digestInto(buffer);
|
43311
|
-
const res = buffer.slice(0, outputLen);
|
43312
|
-
this.destroy();
|
43313
|
-
return res;
|
43314
|
-
}
|
43315
|
-
_cloneInto(to) {
|
43316
|
-
to || (to = new this.constructor());
|
43317
|
-
to.set(...this.get());
|
43318
|
-
const { blockLen, buffer, length, finished, destroyed, pos } = this;
|
43319
|
-
to.length = length;
|
43320
|
-
to.pos = pos;
|
43321
|
-
to.finished = finished;
|
43322
|
-
to.destroyed = destroyed;
|
43323
|
-
if (length % blockLen)
|
43324
|
-
to.buffer.set(buffer);
|
43325
|
-
return to;
|
43326
|
-
}
|
43327
|
-
};
|
43328
|
-
|
43329
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.4.0/node_modules/@noble/hashes/esm/sha256.js
|
43330
|
-
var SHA256_K2 = /* @__PURE__ */ new Uint32Array([
|
43331
|
-
1116352408,
|
43332
|
-
1899447441,
|
43333
|
-
3049323471,
|
43334
|
-
3921009573,
|
43335
|
-
961987163,
|
43336
|
-
1508970993,
|
43337
|
-
2453635748,
|
43338
|
-
2870763221,
|
43339
|
-
3624381080,
|
43340
|
-
310598401,
|
43341
|
-
607225278,
|
43342
|
-
1426881987,
|
43343
|
-
1925078388,
|
43344
|
-
2162078206,
|
43345
|
-
2614888103,
|
43346
|
-
3248222580,
|
43347
|
-
3835390401,
|
43348
|
-
4022224774,
|
43349
|
-
264347078,
|
43350
|
-
604807628,
|
43351
|
-
770255983,
|
43352
|
-
1249150122,
|
43353
|
-
1555081692,
|
43354
|
-
1996064986,
|
43355
|
-
2554220882,
|
43356
|
-
2821834349,
|
43357
|
-
2952996808,
|
43358
|
-
3210313671,
|
43359
|
-
3336571891,
|
43360
|
-
3584528711,
|
43361
|
-
113926993,
|
43362
|
-
338241895,
|
43363
|
-
666307205,
|
43364
|
-
773529912,
|
43365
|
-
1294757372,
|
43366
|
-
1396182291,
|
43367
|
-
1695183700,
|
43368
|
-
1986661051,
|
43369
|
-
2177026350,
|
43370
|
-
2456956037,
|
43371
|
-
2730485921,
|
43372
|
-
2820302411,
|
43373
|
-
3259730800,
|
43374
|
-
3345764771,
|
43375
|
-
3516065817,
|
43376
|
-
3600352804,
|
43377
|
-
4094571909,
|
43378
|
-
275423344,
|
43379
|
-
430227734,
|
43380
|
-
506948616,
|
43381
|
-
659060556,
|
43382
|
-
883997877,
|
43383
|
-
958139571,
|
43384
|
-
1322822218,
|
43385
|
-
1537002063,
|
43386
|
-
1747873779,
|
43387
|
-
1955562222,
|
43388
|
-
2024104815,
|
43389
|
-
2227730452,
|
43390
|
-
2361852424,
|
43391
|
-
2428436474,
|
43392
|
-
2756734187,
|
43393
|
-
3204031479,
|
43394
|
-
3329325298
|
43395
|
-
]);
|
43396
|
-
var SHA256_IV = /* @__PURE__ */ new Uint32Array([
|
43397
|
-
1779033703,
|
43398
|
-
3144134277,
|
43399
|
-
1013904242,
|
43400
|
-
2773480762,
|
43401
|
-
1359893119,
|
43402
|
-
2600822924,
|
43403
|
-
528734635,
|
43404
|
-
1541459225
|
43405
|
-
]);
|
43406
|
-
var SHA256_W2 = /* @__PURE__ */ new Uint32Array(64);
|
43407
|
-
var SHA2562 = class extends HashMD {
|
43408
|
-
constructor() {
|
43409
|
-
super(64, 32, 8, false);
|
43410
|
-
this.A = SHA256_IV[0] | 0;
|
43411
|
-
this.B = SHA256_IV[1] | 0;
|
43412
|
-
this.C = SHA256_IV[2] | 0;
|
43413
|
-
this.D = SHA256_IV[3] | 0;
|
43414
|
-
this.E = SHA256_IV[4] | 0;
|
43415
|
-
this.F = SHA256_IV[5] | 0;
|
43416
|
-
this.G = SHA256_IV[6] | 0;
|
43417
|
-
this.H = SHA256_IV[7] | 0;
|
43418
|
-
}
|
43419
|
-
get() {
|
43420
|
-
const { A, B, C, D, E, F, G, H } = this;
|
43421
|
-
return [A, B, C, D, E, F, G, H];
|
43422
|
-
}
|
43423
|
-
// prettier-ignore
|
43424
|
-
set(A, B, C, D, E, F, G, H) {
|
43425
|
-
this.A = A | 0;
|
43426
|
-
this.B = B | 0;
|
43427
|
-
this.C = C | 0;
|
43428
|
-
this.D = D | 0;
|
43429
|
-
this.E = E | 0;
|
43430
|
-
this.F = F | 0;
|
43431
|
-
this.G = G | 0;
|
43432
|
-
this.H = H | 0;
|
43433
|
-
}
|
43434
|
-
process(view, offset) {
|
43435
|
-
for (let i = 0; i < 16; i++, offset += 4)
|
43436
|
-
SHA256_W2[i] = view.getUint32(offset, false);
|
43437
|
-
for (let i = 16; i < 64; i++) {
|
43438
|
-
const W15 = SHA256_W2[i - 15];
|
43439
|
-
const W2 = SHA256_W2[i - 2];
|
43440
|
-
const s0 = rotr2(W15, 7) ^ rotr2(W15, 18) ^ W15 >>> 3;
|
43441
|
-
const s1 = rotr2(W2, 17) ^ rotr2(W2, 19) ^ W2 >>> 10;
|
43442
|
-
SHA256_W2[i] = s1 + SHA256_W2[i - 7] + s0 + SHA256_W2[i - 16] | 0;
|
43443
|
-
}
|
43444
|
-
let { A, B, C, D, E, F, G, H } = this;
|
43445
|
-
for (let i = 0; i < 64; i++) {
|
43446
|
-
const sigma1 = rotr2(E, 6) ^ rotr2(E, 11) ^ rotr2(E, 25);
|
43447
|
-
const T1 = H + sigma1 + Chi2(E, F, G) + SHA256_K2[i] + SHA256_W2[i] | 0;
|
43448
|
-
const sigma0 = rotr2(A, 2) ^ rotr2(A, 13) ^ rotr2(A, 22);
|
43449
|
-
const T2 = sigma0 + Maj2(A, B, C) | 0;
|
43450
|
-
H = G;
|
43451
|
-
G = F;
|
43452
|
-
F = E;
|
43453
|
-
E = D + T1 | 0;
|
43454
|
-
D = C;
|
43455
|
-
C = B;
|
43456
|
-
B = A;
|
43457
|
-
A = T1 + T2 | 0;
|
43458
|
-
}
|
43459
|
-
A = A + this.A | 0;
|
43460
|
-
B = B + this.B | 0;
|
43461
|
-
C = C + this.C | 0;
|
43462
|
-
D = D + this.D | 0;
|
43463
|
-
E = E + this.E | 0;
|
43464
|
-
F = F + this.F | 0;
|
43465
|
-
G = G + this.G | 0;
|
43466
|
-
H = H + this.H | 0;
|
43467
|
-
this.set(A, B, C, D, E, F, G, H);
|
43468
|
-
}
|
43469
|
-
roundClean() {
|
43470
|
-
SHA256_W2.fill(0);
|
43471
|
-
}
|
43472
|
-
destroy() {
|
43473
|
-
this.set(0, 0, 0, 0, 0, 0, 0, 0);
|
43474
|
-
this.buffer.fill(0);
|
43475
|
-
}
|
43476
|
-
};
|
43477
|
-
var sha2563 = /* @__PURE__ */ wrapConstructor2(() => new SHA2562());
|
43478
|
-
|
43479
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.4.0/node_modules/@noble/hashes/esm/hmac.js
|
43480
|
-
var HMAC2 = class extends Hash2 {
|
43481
|
-
constructor(hash4, _key) {
|
43482
|
-
super();
|
43483
|
-
this.finished = false;
|
43484
|
-
this.destroyed = false;
|
43485
|
-
hash3(hash4);
|
43486
|
-
const key = toBytes3(_key);
|
43487
|
-
this.iHash = hash4.create();
|
43488
|
-
if (typeof this.iHash.update !== "function")
|
43489
|
-
throw new Error("Expected instance of class which extends utils.Hash");
|
43490
|
-
this.blockLen = this.iHash.blockLen;
|
43491
|
-
this.outputLen = this.iHash.outputLen;
|
43492
|
-
const blockLen = this.blockLen;
|
43493
|
-
const pad = new Uint8Array(blockLen);
|
43494
|
-
pad.set(key.length > blockLen ? hash4.create().update(key).digest() : key);
|
43495
|
-
for (let i = 0; i < pad.length; i++)
|
43496
|
-
pad[i] ^= 54;
|
43497
|
-
this.iHash.update(pad);
|
43498
|
-
this.oHash = hash4.create();
|
43499
|
-
for (let i = 0; i < pad.length; i++)
|
43500
|
-
pad[i] ^= 54 ^ 92;
|
43501
|
-
this.oHash.update(pad);
|
43502
|
-
pad.fill(0);
|
43503
|
-
}
|
43504
|
-
update(buf) {
|
43505
|
-
exists2(this);
|
43506
|
-
this.iHash.update(buf);
|
43507
|
-
return this;
|
43508
|
-
}
|
43509
|
-
digestInto(out) {
|
43510
|
-
exists2(this);
|
43511
|
-
bytes2(out, this.outputLen);
|
43512
|
-
this.finished = true;
|
43513
|
-
this.iHash.digestInto(out);
|
43514
|
-
this.oHash.update(out);
|
43515
|
-
this.oHash.digestInto(out);
|
43516
|
-
this.destroy();
|
43517
|
-
}
|
43518
|
-
digest() {
|
43519
|
-
const out = new Uint8Array(this.oHash.outputLen);
|
43520
|
-
this.digestInto(out);
|
43521
|
-
return out;
|
43522
|
-
}
|
43523
|
-
_cloneInto(to) {
|
43524
|
-
to || (to = Object.create(Object.getPrototypeOf(this), {}));
|
43525
|
-
const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;
|
43526
|
-
to = to;
|
43527
|
-
to.finished = finished;
|
43528
|
-
to.destroyed = destroyed;
|
43529
|
-
to.blockLen = blockLen;
|
43530
|
-
to.outputLen = outputLen;
|
43531
|
-
to.oHash = oHash._cloneInto(to.oHash);
|
43532
|
-
to.iHash = iHash._cloneInto(to.iHash);
|
43533
|
-
return to;
|
43534
|
-
}
|
43535
|
-
destroy() {
|
43536
|
-
this.destroyed = true;
|
43537
|
-
this.oHash.destroy();
|
43538
|
-
this.iHash.destroy();
|
43539
|
-
}
|
43540
|
-
};
|
43541
|
-
var hmac2 = (hash4, key, message) => new HMAC2(hash4, key).update(message).digest();
|
43542
|
-
hmac2.create = (hash4, key) => new HMAC2(hash4, key);
|
43543
|
-
|
43544
|
-
// ../../node_modules/.pnpm/@noble+curves@1.4.2/node_modules/@noble/curves/esm/abstract/modular.js
|
44091
|
+
// ../../node_modules/.pnpm/@noble+curves@1.6.0/node_modules/@noble/curves/esm/abstract/modular.js
|
43545
44092
|
var _0n3 = BigInt(0);
|
43546
44093
|
var _1n3 = BigInt(1);
|
43547
44094
|
var _2n3 = BigInt(2);
|
@@ -43577,11 +44124,11 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
43577
44124
|
}
|
43578
44125
|
return res;
|
43579
44126
|
}
|
43580
|
-
function invert(
|
43581
|
-
if (
|
43582
|
-
throw new Error(`invert: expected positive integers, got n=${
|
44127
|
+
function invert(number2, modulo) {
|
44128
|
+
if (number2 === _0n3 || modulo <= _0n3) {
|
44129
|
+
throw new Error(`invert: expected positive integers, got n=${number2} mod=${modulo}`);
|
43583
44130
|
}
|
43584
|
-
let a = mod(
|
44131
|
+
let a = mod(number2, modulo);
|
43585
44132
|
let b = modulo;
|
43586
44133
|
let x = _0n3, y = _1n3, u = _1n3, v = _0n3;
|
43587
44134
|
while (a !== _0n3) {
|
@@ -43736,7 +44283,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
43736
44283
|
const nByteLength = Math.ceil(_nBitLength / 8);
|
43737
44284
|
return { nBitLength: _nBitLength, nByteLength };
|
43738
44285
|
}
|
43739
|
-
function Field(ORDER, bitLen2,
|
44286
|
+
function Field(ORDER, bitLen2, isLE2 = false, redef = {}) {
|
43740
44287
|
if (ORDER <= _0n3)
|
43741
44288
|
throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);
|
43742
44289
|
const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen2);
|
@@ -43777,11 +44324,11 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
43777
44324
|
// TODO: do we really need constant cmov?
|
43778
44325
|
// We don't have const-time bigints anyway, so probably will be not very useful
|
43779
44326
|
cmov: (a, b, c) => c ? b : a,
|
43780
|
-
toBytes: (num) =>
|
43781
|
-
fromBytes: (
|
43782
|
-
if (
|
43783
|
-
throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${
|
43784
|
-
return
|
44327
|
+
toBytes: (num) => isLE2 ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES),
|
44328
|
+
fromBytes: (bytes2) => {
|
44329
|
+
if (bytes2.length !== BYTES)
|
44330
|
+
throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes2.length}`);
|
44331
|
+
return isLE2 ? bytesToNumberLE(bytes2) : bytesToNumberBE(bytes2);
|
43785
44332
|
}
|
43786
44333
|
});
|
43787
44334
|
return Object.freeze(f2);
|
@@ -43796,26 +44343,33 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
43796
44343
|
const length = getFieldBytesLength(fieldOrder);
|
43797
44344
|
return length + Math.ceil(length / 2);
|
43798
44345
|
}
|
43799
|
-
function mapHashToField(key, fieldOrder,
|
44346
|
+
function mapHashToField(key, fieldOrder, isLE2 = false) {
|
43800
44347
|
const len = key.length;
|
43801
44348
|
const fieldLen = getFieldBytesLength(fieldOrder);
|
43802
44349
|
const minLen = getMinHashLength(fieldOrder);
|
43803
44350
|
if (len < 16 || len < minLen || len > 1024)
|
43804
44351
|
throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);
|
43805
|
-
const num =
|
44352
|
+
const num = isLE2 ? bytesToNumberBE(key) : bytesToNumberLE(key);
|
43806
44353
|
const reduced = mod(num, fieldOrder - _1n3) + _1n3;
|
43807
|
-
return
|
44354
|
+
return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
|
43808
44355
|
}
|
43809
44356
|
|
43810
|
-
// ../../node_modules/.pnpm/@noble+curves@1.
|
44357
|
+
// ../../node_modules/.pnpm/@noble+curves@1.6.0/node_modules/@noble/curves/esm/abstract/curve.js
|
43811
44358
|
var _0n4 = BigInt(0);
|
43812
44359
|
var _1n4 = BigInt(1);
|
44360
|
+
var pointPrecomputes = /* @__PURE__ */ new WeakMap();
|
44361
|
+
var pointWindowSizes = /* @__PURE__ */ new WeakMap();
|
43813
44362
|
function wNAF(c, bits) {
|
43814
44363
|
const constTimeNegate = (condition, item) => {
|
43815
44364
|
const neg = item.negate();
|
43816
44365
|
return condition ? neg : item;
|
43817
44366
|
};
|
44367
|
+
const validateW = (W) => {
|
44368
|
+
if (!Number.isSafeInteger(W) || W <= 0 || W > bits)
|
44369
|
+
throw new Error(`Wrong window size=${W}, should be [1..${bits}]`);
|
44370
|
+
};
|
43818
44371
|
const opts = (W) => {
|
44372
|
+
validateW(W);
|
43819
44373
|
const windows = Math.ceil(bits / W) + 1;
|
43820
44374
|
const windowSize = 2 ** (W - 1);
|
43821
44375
|
return { windows, windowSize };
|
@@ -43894,19 +44448,62 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
43894
44448
|
}
|
43895
44449
|
return { p, f: f2 };
|
43896
44450
|
},
|
43897
|
-
wNAFCached(P,
|
43898
|
-
const W = P
|
43899
|
-
let comp =
|
44451
|
+
wNAFCached(P, n, transform) {
|
44452
|
+
const W = pointWindowSizes.get(P) || 1;
|
44453
|
+
let comp = pointPrecomputes.get(P);
|
43900
44454
|
if (!comp) {
|
43901
44455
|
comp = this.precomputeWindow(P, W);
|
43902
|
-
if (W !== 1)
|
43903
|
-
|
43904
|
-
}
|
44456
|
+
if (W !== 1)
|
44457
|
+
pointPrecomputes.set(P, transform(comp));
|
43905
44458
|
}
|
43906
44459
|
return this.wNAF(W, comp, n);
|
44460
|
+
},
|
44461
|
+
// We calculate precomputes for elliptic curve point multiplication
|
44462
|
+
// using windowed method. This specifies window size and
|
44463
|
+
// stores precomputed values. Usually only base point would be precomputed.
|
44464
|
+
setWindowSize(P, W) {
|
44465
|
+
validateW(W);
|
44466
|
+
pointWindowSizes.set(P, W);
|
44467
|
+
pointPrecomputes.delete(P);
|
43907
44468
|
}
|
43908
44469
|
};
|
43909
44470
|
}
|
44471
|
+
function pippenger(c, field, points, scalars) {
|
44472
|
+
if (!Array.isArray(points) || !Array.isArray(scalars) || scalars.length !== points.length)
|
44473
|
+
throw new Error("arrays of points and scalars must have equal length");
|
44474
|
+
scalars.forEach((s, i) => {
|
44475
|
+
if (!field.isValid(s))
|
44476
|
+
throw new Error(`wrong scalar at index ${i}`);
|
44477
|
+
});
|
44478
|
+
points.forEach((p, i) => {
|
44479
|
+
if (!(p instanceof c))
|
44480
|
+
throw new Error(`wrong point at index ${i}`);
|
44481
|
+
});
|
44482
|
+
const wbits = bitLen(BigInt(points.length));
|
44483
|
+
const windowSize = wbits > 12 ? wbits - 3 : wbits > 4 ? wbits - 2 : wbits ? 2 : 1;
|
44484
|
+
const MASK = (1 << windowSize) - 1;
|
44485
|
+
const buckets = new Array(MASK + 1).fill(c.ZERO);
|
44486
|
+
const lastBits = Math.floor((field.BITS - 1) / windowSize) * windowSize;
|
44487
|
+
let sum = c.ZERO;
|
44488
|
+
for (let i = lastBits; i >= 0; i -= windowSize) {
|
44489
|
+
buckets.fill(c.ZERO);
|
44490
|
+
for (let j = 0; j < scalars.length; j++) {
|
44491
|
+
const scalar = scalars[j];
|
44492
|
+
const wbits2 = Number(scalar >> BigInt(i) & BigInt(MASK));
|
44493
|
+
buckets[wbits2] = buckets[wbits2].add(points[j]);
|
44494
|
+
}
|
44495
|
+
let resI = c.ZERO;
|
44496
|
+
for (let j = buckets.length - 1, sumI = c.ZERO; j > 0; j--) {
|
44497
|
+
sumI = sumI.add(buckets[j]);
|
44498
|
+
resI = resI.add(sumI);
|
44499
|
+
}
|
44500
|
+
sum = sum.add(resI);
|
44501
|
+
if (i !== 0)
|
44502
|
+
for (let j = 0; j < windowSize; j++)
|
44503
|
+
sum = sum.double();
|
44504
|
+
}
|
44505
|
+
return sum;
|
44506
|
+
}
|
43910
44507
|
function validateBasic(curve) {
|
43911
44508
|
validateField(curve.Fp);
|
43912
44509
|
validateObject(curve, {
|
@@ -43925,7 +44522,13 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
43925
44522
|
});
|
43926
44523
|
}
|
43927
44524
|
|
43928
|
-
// ../../node_modules/.pnpm/@noble+curves@1.
|
44525
|
+
// ../../node_modules/.pnpm/@noble+curves@1.6.0/node_modules/@noble/curves/esm/abstract/weierstrass.js
|
44526
|
+
function validateSigVerOpts(opts) {
|
44527
|
+
if (opts.lowS !== void 0)
|
44528
|
+
abool("lowS", opts.lowS);
|
44529
|
+
if (opts.prehash !== void 0)
|
44530
|
+
abool("prehash", opts.prehash);
|
44531
|
+
}
|
43929
44532
|
function validatePointOpts(curve) {
|
43930
44533
|
const opts = validateBasic(curve);
|
43931
44534
|
validateObject(opts, {
|
@@ -43959,48 +44562,99 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
43959
44562
|
super(m);
|
43960
44563
|
}
|
43961
44564
|
},
|
43962
|
-
|
43963
|
-
|
43964
|
-
|
43965
|
-
|
43966
|
-
|
43967
|
-
|
43968
|
-
|
43969
|
-
|
43970
|
-
|
43971
|
-
|
43972
|
-
|
43973
|
-
|
43974
|
-
|
44565
|
+
// Basic building block is TLV (Tag-Length-Value)
|
44566
|
+
_tlv: {
|
44567
|
+
encode: (tag, data) => {
|
44568
|
+
const { Err: E } = DER;
|
44569
|
+
if (tag < 0 || tag > 256)
|
44570
|
+
throw new E("tlv.encode: wrong tag");
|
44571
|
+
if (data.length & 1)
|
44572
|
+
throw new E("tlv.encode: unpadded data");
|
44573
|
+
const dataLen = data.length / 2;
|
44574
|
+
const len = numberToHexUnpadded(dataLen);
|
44575
|
+
if (len.length / 2 & 128)
|
44576
|
+
throw new E("tlv.encode: long form length too big");
|
44577
|
+
const lenLen = dataLen > 127 ? numberToHexUnpadded(len.length / 2 | 128) : "";
|
44578
|
+
return `${numberToHexUnpadded(tag)}${lenLen}${len}${data}`;
|
44579
|
+
},
|
44580
|
+
// v - value, l - left bytes (unparsed)
|
44581
|
+
decode(tag, data) {
|
44582
|
+
const { Err: E } = DER;
|
44583
|
+
let pos = 0;
|
44584
|
+
if (tag < 0 || tag > 256)
|
44585
|
+
throw new E("tlv.encode: wrong tag");
|
44586
|
+
if (data.length < 2 || data[pos++] !== tag)
|
44587
|
+
throw new E("tlv.decode: wrong tlv");
|
44588
|
+
const first = data[pos++];
|
44589
|
+
const isLong = !!(first & 128);
|
44590
|
+
let length = 0;
|
44591
|
+
if (!isLong)
|
44592
|
+
length = first;
|
44593
|
+
else {
|
44594
|
+
const lenLen = first & 127;
|
44595
|
+
if (!lenLen)
|
44596
|
+
throw new E("tlv.decode(long): indefinite length not supported");
|
44597
|
+
if (lenLen > 4)
|
44598
|
+
throw new E("tlv.decode(long): byte length is too big");
|
44599
|
+
const lengthBytes = data.subarray(pos, pos + lenLen);
|
44600
|
+
if (lengthBytes.length !== lenLen)
|
44601
|
+
throw new E("tlv.decode: length bytes not complete");
|
44602
|
+
if (lengthBytes[0] === 0)
|
44603
|
+
throw new E("tlv.decode(long): zero leftmost byte");
|
44604
|
+
for (const b of lengthBytes)
|
44605
|
+
length = length << 8 | b;
|
44606
|
+
pos += lenLen;
|
44607
|
+
if (length < 128)
|
44608
|
+
throw new E("tlv.decode(long): not minimal encoding");
|
44609
|
+
}
|
44610
|
+
const v = data.subarray(pos, pos + length);
|
44611
|
+
if (v.length !== length)
|
44612
|
+
throw new E("tlv.decode: wrong value length");
|
44613
|
+
return { v, l: data.subarray(pos + length) };
|
44614
|
+
}
|
44615
|
+
},
|
44616
|
+
// https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,
|
44617
|
+
// since we always use positive integers here. It must always be empty:
|
44618
|
+
// - add zero byte if exists
|
44619
|
+
// - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)
|
44620
|
+
_int: {
|
44621
|
+
encode(num) {
|
44622
|
+
const { Err: E } = DER;
|
44623
|
+
if (num < _0n5)
|
44624
|
+
throw new E("integer: negative integers are not allowed");
|
44625
|
+
let hex = numberToHexUnpadded(num);
|
44626
|
+
if (Number.parseInt(hex[0], 16) & 8)
|
44627
|
+
hex = "00" + hex;
|
44628
|
+
if (hex.length & 1)
|
44629
|
+
throw new E("unexpected assertion");
|
44630
|
+
return hex;
|
44631
|
+
},
|
44632
|
+
decode(data) {
|
44633
|
+
const { Err: E } = DER;
|
44634
|
+
if (data[0] & 128)
|
44635
|
+
throw new E("Invalid signature integer: negative");
|
44636
|
+
if (data[0] === 0 && !(data[1] & 128))
|
44637
|
+
throw new E("Invalid signature integer: unnecessary leading zero");
|
44638
|
+
return b2n(data);
|
44639
|
+
}
|
43975
44640
|
},
|
43976
44641
|
toSig(hex) {
|
43977
|
-
const { Err: E } = DER;
|
44642
|
+
const { Err: E, _int: int, _tlv: tlv } = DER;
|
43978
44643
|
const data = typeof hex === "string" ? h2b(hex) : hex;
|
43979
44644
|
abytes(data);
|
43980
|
-
|
43981
|
-
if (
|
43982
|
-
throw new E("Invalid signature
|
43983
|
-
|
43984
|
-
|
43985
|
-
|
43986
|
-
const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);
|
43987
|
-
if (rBytesLeft.length)
|
44645
|
+
const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);
|
44646
|
+
if (seqLeftBytes.length)
|
44647
|
+
throw new E("Invalid signature: left bytes after parsing");
|
44648
|
+
const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);
|
44649
|
+
const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);
|
44650
|
+
if (sLeftBytes.length)
|
43988
44651
|
throw new E("Invalid signature: left bytes after parsing");
|
43989
|
-
return { r, s };
|
44652
|
+
return { r: int.decode(rBytes), s: int.decode(sBytes) };
|
43990
44653
|
},
|
43991
44654
|
hexFromSig(sig) {
|
43992
|
-
const
|
43993
|
-
const
|
43994
|
-
|
43995
|
-
return hex.length & 1 ? `0${hex}` : hex;
|
43996
|
-
};
|
43997
|
-
const s = slice(h(sig.s));
|
43998
|
-
const r = slice(h(sig.r));
|
43999
|
-
const shl = s.length / 2;
|
44000
|
-
const rhl = r.length / 2;
|
44001
|
-
const sl = h(shl);
|
44002
|
-
const rl = h(rhl);
|
44003
|
-
return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;
|
44655
|
+
const { _tlv: tlv, _int: int } = DER;
|
44656
|
+
const seq = `${tlv.encode(2, int.encode(sig.r))}${tlv.encode(2, int.encode(sig.s))}`;
|
44657
|
+
return tlv.encode(48, seq);
|
44004
44658
|
}
|
44005
44659
|
};
|
44006
44660
|
var _0n5 = BigInt(0);
|
@@ -44011,12 +44665,13 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44011
44665
|
function weierstrassPoints(opts) {
|
44012
44666
|
const CURVE = validatePointOpts(opts);
|
44013
44667
|
const { Fp: Fp2 } = CURVE;
|
44014
|
-
const
|
44668
|
+
const Fn = Field(CURVE.n, CURVE.nBitLength);
|
44669
|
+
const toBytes3 = CURVE.toBytes || ((_c, point, _isCompressed) => {
|
44015
44670
|
const a = point.toAffine();
|
44016
|
-
return
|
44671
|
+
return concatBytes3(Uint8Array.from([4]), Fp2.toBytes(a.x), Fp2.toBytes(a.y));
|
44017
44672
|
});
|
44018
|
-
const fromBytes = CURVE.fromBytes || ((
|
44019
|
-
const tail =
|
44673
|
+
const fromBytes = CURVE.fromBytes || ((bytes2) => {
|
44674
|
+
const tail = bytes2.subarray(1);
|
44020
44675
|
const x = Fp2.fromBytes(tail.subarray(0, Fp2.BYTES));
|
44021
44676
|
const y = Fp2.fromBytes(tail.subarray(Fp2.BYTES, 2 * Fp2.BYTES));
|
44022
44677
|
return { x, y };
|
@@ -44030,16 +44685,12 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44030
44685
|
if (!Fp2.eql(Fp2.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))
|
44031
44686
|
throw new Error("bad generator point: equation left != right");
|
44032
44687
|
function isWithinCurveOrder(num) {
|
44033
|
-
return
|
44034
|
-
}
|
44035
|
-
function assertGE(num) {
|
44036
|
-
if (!isWithinCurveOrder(num))
|
44037
|
-
throw new Error("Expected valid bigint: 0 < bigint < curve.n");
|
44688
|
+
return inRange(num, _1n5, CURVE.n);
|
44038
44689
|
}
|
44039
44690
|
function normPrivateKeyToScalar(key) {
|
44040
|
-
const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;
|
44691
|
+
const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: N } = CURVE;
|
44041
44692
|
if (lengths && typeof key !== "bigint") {
|
44042
|
-
if (
|
44693
|
+
if (isBytes2(key))
|
44043
44694
|
key = bytesToHex(key);
|
44044
44695
|
if (typeof key !== "string" || !lengths.includes(key.length))
|
44045
44696
|
throw new Error("Invalid key");
|
@@ -44052,15 +44703,47 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44052
44703
|
throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);
|
44053
44704
|
}
|
44054
44705
|
if (wrapPrivateKey)
|
44055
|
-
num = mod(num,
|
44056
|
-
|
44706
|
+
num = mod(num, N);
|
44707
|
+
aInRange("private key", num, _1n5, N);
|
44057
44708
|
return num;
|
44058
44709
|
}
|
44059
|
-
const pointPrecomputes = /* @__PURE__ */ new Map();
|
44060
44710
|
function assertPrjPoint(other) {
|
44061
44711
|
if (!(other instanceof Point2))
|
44062
44712
|
throw new Error("ProjectivePoint expected");
|
44063
44713
|
}
|
44714
|
+
const toAffineMemo = memoized((p, iz) => {
|
44715
|
+
const { px: x, py: y, pz: z } = p;
|
44716
|
+
if (Fp2.eql(z, Fp2.ONE))
|
44717
|
+
return { x, y };
|
44718
|
+
const is0 = p.is0();
|
44719
|
+
if (iz == null)
|
44720
|
+
iz = is0 ? Fp2.ONE : Fp2.inv(z);
|
44721
|
+
const ax = Fp2.mul(x, iz);
|
44722
|
+
const ay = Fp2.mul(y, iz);
|
44723
|
+
const zz = Fp2.mul(z, iz);
|
44724
|
+
if (is0)
|
44725
|
+
return { x: Fp2.ZERO, y: Fp2.ZERO };
|
44726
|
+
if (!Fp2.eql(zz, Fp2.ONE))
|
44727
|
+
throw new Error("invZ was invalid");
|
44728
|
+
return { x: ax, y: ay };
|
44729
|
+
});
|
44730
|
+
const assertValidMemo = memoized((p) => {
|
44731
|
+
if (p.is0()) {
|
44732
|
+
if (CURVE.allowInfinityPoint && !Fp2.is0(p.py))
|
44733
|
+
return;
|
44734
|
+
throw new Error("bad point: ZERO");
|
44735
|
+
}
|
44736
|
+
const { x, y } = p.toAffine();
|
44737
|
+
if (!Fp2.isValid(x) || !Fp2.isValid(y))
|
44738
|
+
throw new Error("bad point: x or y not FE");
|
44739
|
+
const left = Fp2.sqr(y);
|
44740
|
+
const right = weierstrassEquation(x);
|
44741
|
+
if (!Fp2.eql(left, right))
|
44742
|
+
throw new Error("bad point: equation left != right");
|
44743
|
+
if (!p.isTorsionFree())
|
44744
|
+
throw new Error("bad point: not in prime-order subgroup");
|
44745
|
+
return true;
|
44746
|
+
});
|
44064
44747
|
class Point2 {
|
44065
44748
|
constructor(px, py, pz) {
|
44066
44749
|
this.px = px;
|
@@ -44072,6 +44755,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44072
44755
|
throw new Error("y required");
|
44073
44756
|
if (pz == null || !Fp2.isValid(pz))
|
44074
44757
|
throw new Error("z required");
|
44758
|
+
Object.freeze(this);
|
44075
44759
|
}
|
44076
44760
|
// Does not validate if the point is on-curve.
|
44077
44761
|
// Use fromHex instead, or call assertValidity() later.
|
@@ -44115,27 +44799,17 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44115
44799
|
static fromPrivateKey(privateKey) {
|
44116
44800
|
return Point2.BASE.multiply(normPrivateKeyToScalar(privateKey));
|
44117
44801
|
}
|
44802
|
+
// Multiscalar Multiplication
|
44803
|
+
static msm(points, scalars) {
|
44804
|
+
return pippenger(Point2, Fn, points, scalars);
|
44805
|
+
}
|
44118
44806
|
// "Private method", don't use it directly
|
44119
44807
|
_setWindowSize(windowSize) {
|
44120
|
-
this
|
44121
|
-
pointPrecomputes.delete(this);
|
44808
|
+
wnaf.setWindowSize(this, windowSize);
|
44122
44809
|
}
|
44123
44810
|
// A point on curve is valid if it conforms to equation.
|
44124
44811
|
assertValidity() {
|
44125
|
-
|
44126
|
-
if (CURVE.allowInfinityPoint && !Fp2.is0(this.py))
|
44127
|
-
return;
|
44128
|
-
throw new Error("bad point: ZERO");
|
44129
|
-
}
|
44130
|
-
const { x, y } = this.toAffine();
|
44131
|
-
if (!Fp2.isValid(x) || !Fp2.isValid(y))
|
44132
|
-
throw new Error("bad point: x or y not FE");
|
44133
|
-
const left = Fp2.sqr(y);
|
44134
|
-
const right = weierstrassEquation(x);
|
44135
|
-
if (!Fp2.eql(left, right))
|
44136
|
-
throw new Error("bad point: equation left != right");
|
44137
|
-
if (!this.isTorsionFree())
|
44138
|
-
throw new Error("bad point: not in prime-order subgroup");
|
44812
|
+
assertValidMemo(this);
|
44139
44813
|
}
|
44140
44814
|
hasEvenY() {
|
44141
44815
|
const { y } = this.toAffine();
|
@@ -44262,27 +44936,24 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44262
44936
|
return this.equals(Point2.ZERO);
|
44263
44937
|
}
|
44264
44938
|
wNAF(n) {
|
44265
|
-
return wnaf.wNAFCached(this,
|
44266
|
-
const toInv = Fp2.invertBatch(comp.map((p) => p.pz));
|
44267
|
-
return comp.map((p, i) => p.toAffine(toInv[i])).map(Point2.fromAffine);
|
44268
|
-
});
|
44939
|
+
return wnaf.wNAFCached(this, n, Point2.normalizeZ);
|
44269
44940
|
}
|
44270
44941
|
/**
|
44271
44942
|
* Non-constant-time multiplication. Uses double-and-add algorithm.
|
44272
44943
|
* It's faster, but should only be used when you don't care about
|
44273
44944
|
* an exposed private key e.g. sig verification, which works over *public* keys.
|
44274
44945
|
*/
|
44275
|
-
multiplyUnsafe(
|
44946
|
+
multiplyUnsafe(sc) {
|
44947
|
+
aInRange("scalar", sc, _0n5, CURVE.n);
|
44276
44948
|
const I = Point2.ZERO;
|
44277
|
-
if (
|
44949
|
+
if (sc === _0n5)
|
44278
44950
|
return I;
|
44279
|
-
|
44280
|
-
if (n === _1n5)
|
44951
|
+
if (sc === _1n5)
|
44281
44952
|
return this;
|
44282
44953
|
const { endo } = CURVE;
|
44283
44954
|
if (!endo)
|
44284
|
-
return wnaf.unsafeLadder(this,
|
44285
|
-
let { k1neg, k1, k2neg, k2 } = endo.splitScalar(
|
44955
|
+
return wnaf.unsafeLadder(this, sc);
|
44956
|
+
let { k1neg, k1, k2neg, k2 } = endo.splitScalar(sc);
|
44286
44957
|
let k1p = I;
|
44287
44958
|
let k2p = I;
|
44288
44959
|
let d = this;
|
@@ -44312,12 +44983,11 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44312
44983
|
* @returns New point
|
44313
44984
|
*/
|
44314
44985
|
multiply(scalar) {
|
44315
|
-
|
44316
|
-
|
44986
|
+
const { endo, n: N } = CURVE;
|
44987
|
+
aInRange("scalar", scalar, _1n5, N);
|
44317
44988
|
let point, fake;
|
44318
|
-
const { endo } = CURVE;
|
44319
44989
|
if (endo) {
|
44320
|
-
const { k1neg, k1, k2neg, k2 } = endo.splitScalar(
|
44990
|
+
const { k1neg, k1, k2neg, k2 } = endo.splitScalar(scalar);
|
44321
44991
|
let { p: k1p, f: f1p } = this.wNAF(k1);
|
44322
44992
|
let { p: k2p, f: f2p } = this.wNAF(k2);
|
44323
44993
|
k1p = wnaf.constTimeNegate(k1neg, k1p);
|
@@ -44326,7 +44996,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44326
44996
|
point = k1p.add(k2p);
|
44327
44997
|
fake = f1p.add(f2p);
|
44328
44998
|
} else {
|
44329
|
-
const { p, f: f2 } = this.wNAF(
|
44999
|
+
const { p, f: f2 } = this.wNAF(scalar);
|
44330
45000
|
point = p;
|
44331
45001
|
fake = f2;
|
44332
45002
|
}
|
@@ -44348,18 +45018,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44348
45018
|
// Can accept precomputed Z^-1 - for example, from invertBatch.
|
44349
45019
|
// (x, y, z) ∋ (x=x/z, y=y/z)
|
44350
45020
|
toAffine(iz) {
|
44351
|
-
|
44352
|
-
const is0 = this.is0();
|
44353
|
-
if (iz == null)
|
44354
|
-
iz = is0 ? Fp2.ONE : Fp2.inv(z);
|
44355
|
-
const ax = Fp2.mul(x, iz);
|
44356
|
-
const ay = Fp2.mul(y, iz);
|
44357
|
-
const zz = Fp2.mul(z, iz);
|
44358
|
-
if (is0)
|
44359
|
-
return { x: Fp2.ZERO, y: Fp2.ZERO };
|
44360
|
-
if (!Fp2.eql(zz, Fp2.ONE))
|
44361
|
-
throw new Error("invZ was invalid");
|
44362
|
-
return { x: ax, y: ay };
|
45021
|
+
return toAffineMemo(this, iz);
|
44363
45022
|
}
|
44364
45023
|
isTorsionFree() {
|
44365
45024
|
const { h: cofactor, isTorsionFree } = CURVE;
|
@@ -44378,10 +45037,12 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44378
45037
|
return this.multiplyUnsafe(CURVE.h);
|
44379
45038
|
}
|
44380
45039
|
toRawBytes(isCompressed = true) {
|
45040
|
+
abool("isCompressed", isCompressed);
|
44381
45041
|
this.assertValidity();
|
44382
|
-
return
|
45042
|
+
return toBytes3(Point2, this, isCompressed);
|
44383
45043
|
}
|
44384
45044
|
toHex(isCompressed = true) {
|
45045
|
+
abool("isCompressed", isCompressed);
|
44385
45046
|
return bytesToHex(this.toRawBytes(isCompressed));
|
44386
45047
|
}
|
44387
45048
|
}
|
@@ -44415,9 +45076,6 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44415
45076
|
const { Fp: Fp2, n: CURVE_ORDER } = CURVE;
|
44416
45077
|
const compressedLen = Fp2.BYTES + 1;
|
44417
45078
|
const uncompressedLen = 2 * Fp2.BYTES + 1;
|
44418
|
-
function isValidFieldElement(num) {
|
44419
|
-
return _0n5 < num && num < Fp2.ORDER;
|
44420
|
-
}
|
44421
45079
|
function modN(a) {
|
44422
45080
|
return mod(a, CURVE_ORDER);
|
44423
45081
|
}
|
@@ -44429,20 +45087,21 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44429
45087
|
toBytes(_c, point, isCompressed) {
|
44430
45088
|
const a = point.toAffine();
|
44431
45089
|
const x = Fp2.toBytes(a.x);
|
44432
|
-
const cat =
|
45090
|
+
const cat = concatBytes3;
|
45091
|
+
abool("isCompressed", isCompressed);
|
44433
45092
|
if (isCompressed) {
|
44434
45093
|
return cat(Uint8Array.from([point.hasEvenY() ? 2 : 3]), x);
|
44435
45094
|
} else {
|
44436
45095
|
return cat(Uint8Array.from([4]), x, Fp2.toBytes(a.y));
|
44437
45096
|
}
|
44438
45097
|
},
|
44439
|
-
fromBytes(
|
44440
|
-
const len =
|
44441
|
-
const head =
|
44442
|
-
const tail =
|
45098
|
+
fromBytes(bytes2) {
|
45099
|
+
const len = bytes2.length;
|
45100
|
+
const head = bytes2[0];
|
45101
|
+
const tail = bytes2.subarray(1);
|
44443
45102
|
if (len === compressedLen && (head === 2 || head === 3)) {
|
44444
45103
|
const x = bytesToNumberBE(tail);
|
44445
|
-
if (!
|
45104
|
+
if (!inRange(x, _1n5, Fp2.ORDER))
|
44446
45105
|
throw new Error("Point is not on curve");
|
44447
45106
|
const y2 = weierstrassEquation(x);
|
44448
45107
|
let y;
|
@@ -44467,9 +45126,9 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44467
45126
|
}
|
44468
45127
|
});
|
44469
45128
|
const numToNByteStr = (num) => bytesToHex(numberToBytesBE(num, CURVE.nByteLength));
|
44470
|
-
function isBiggerThanHalfOrder(
|
45129
|
+
function isBiggerThanHalfOrder(number2) {
|
44471
45130
|
const HALF = CURVE_ORDER >> _1n5;
|
44472
|
-
return
|
45131
|
+
return number2 > HALF;
|
44473
45132
|
}
|
44474
45133
|
function normalizeS(s) {
|
44475
45134
|
return isBiggerThanHalfOrder(s) ? modN(-s) : s;
|
@@ -44495,10 +45154,8 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44495
45154
|
return new Signature(r, s);
|
44496
45155
|
}
|
44497
45156
|
assertValidity() {
|
44498
|
-
|
44499
|
-
|
44500
|
-
if (!isWithinCurveOrder(this.s))
|
44501
|
-
throw new Error("s must be 0 < s < CURVE.n");
|
45157
|
+
aInRange("r", this.r, _1n5, CURVE_ORDER);
|
45158
|
+
aInRange("s", this.s, _1n5, CURVE_ORDER);
|
44502
45159
|
}
|
44503
45160
|
addRecoveryBit(recovery) {
|
44504
45161
|
return new Signature(this.r, this.s, recovery);
|
@@ -44580,7 +45237,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44580
45237
|
return Point2.fromPrivateKey(privateKey).toRawBytes(isCompressed);
|
44581
45238
|
}
|
44582
45239
|
function isProbPub(item) {
|
44583
|
-
const arr =
|
45240
|
+
const arr = isBytes2(item);
|
44584
45241
|
const str = typeof item === "string";
|
44585
45242
|
const len = (arr || str) && item.length;
|
44586
45243
|
if (arr)
|
@@ -44599,40 +45256,38 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44599
45256
|
const b = Point2.fromHex(publicB);
|
44600
45257
|
return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);
|
44601
45258
|
}
|
44602
|
-
const bits2int = CURVE.bits2int || function(
|
44603
|
-
const num = bytesToNumberBE(
|
44604
|
-
const delta =
|
45259
|
+
const bits2int = CURVE.bits2int || function(bytes2) {
|
45260
|
+
const num = bytesToNumberBE(bytes2);
|
45261
|
+
const delta = bytes2.length * 8 - CURVE.nBitLength;
|
44605
45262
|
return delta > 0 ? num >> BigInt(delta) : num;
|
44606
45263
|
};
|
44607
|
-
const bits2int_modN = CURVE.bits2int_modN || function(
|
44608
|
-
return modN(bits2int(
|
45264
|
+
const bits2int_modN = CURVE.bits2int_modN || function(bytes2) {
|
45265
|
+
return modN(bits2int(bytes2));
|
44609
45266
|
};
|
44610
45267
|
const ORDER_MASK = bitMask(CURVE.nBitLength);
|
44611
45268
|
function int2octets(num) {
|
44612
|
-
|
44613
|
-
throw new Error("bigint expected");
|
44614
|
-
if (!(_0n5 <= num && num < ORDER_MASK))
|
44615
|
-
throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);
|
45269
|
+
aInRange(`num < 2^${CURVE.nBitLength}`, num, _0n5, ORDER_MASK);
|
44616
45270
|
return numberToBytesBE(num, CURVE.nByteLength);
|
44617
45271
|
}
|
44618
45272
|
function prepSig(msgHash, privateKey, opts = defaultSigOpts) {
|
44619
45273
|
if (["recovered", "canonical"].some((k) => k in opts))
|
44620
45274
|
throw new Error("sign() legacy options not supported");
|
44621
|
-
const { hash:
|
45275
|
+
const { hash: hash3, randomBytes: randomBytes3 } = CURVE;
|
44622
45276
|
let { lowS, prehash, extraEntropy: ent } = opts;
|
44623
45277
|
if (lowS == null)
|
44624
45278
|
lowS = true;
|
44625
45279
|
msgHash = ensureBytes("msgHash", msgHash);
|
45280
|
+
validateSigVerOpts(opts);
|
44626
45281
|
if (prehash)
|
44627
|
-
msgHash = ensureBytes("prehashed msgHash",
|
45282
|
+
msgHash = ensureBytes("prehashed msgHash", hash3(msgHash));
|
44628
45283
|
const h1int = bits2int_modN(msgHash);
|
44629
45284
|
const d = normPrivateKeyToScalar(privateKey);
|
44630
45285
|
const seedArgs = [int2octets(d), int2octets(h1int)];
|
44631
45286
|
if (ent != null && ent !== false) {
|
44632
|
-
const e = ent === true ?
|
45287
|
+
const e = ent === true ? randomBytes3(Fp2.BYTES) : ent;
|
44633
45288
|
seedArgs.push(ensureBytes("extraEntropy", e));
|
44634
45289
|
}
|
44635
|
-
const seed =
|
45290
|
+
const seed = concatBytes3(...seedArgs);
|
44636
45291
|
const m = h1int;
|
44637
45292
|
function k2sig(kBytes) {
|
44638
45293
|
const k = bits2int(kBytes);
|
@@ -44671,11 +45326,12 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44671
45326
|
publicKey = ensureBytes("publicKey", publicKey);
|
44672
45327
|
if ("strict" in opts)
|
44673
45328
|
throw new Error("options.strict was renamed to lowS");
|
45329
|
+
validateSigVerOpts(opts);
|
44674
45330
|
const { lowS, prehash } = opts;
|
44675
45331
|
let _sig = void 0;
|
44676
45332
|
let P;
|
44677
45333
|
try {
|
44678
|
-
if (typeof sg === "string" ||
|
45334
|
+
if (typeof sg === "string" || isBytes2(sg)) {
|
44679
45335
|
try {
|
44680
45336
|
_sig = Signature.fromDER(sg);
|
44681
45337
|
} catch (derError) {
|
@@ -44722,20 +45378,20 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44722
45378
|
};
|
44723
45379
|
}
|
44724
45380
|
|
44725
|
-
// ../../node_modules/.pnpm/@noble+curves@1.
|
44726
|
-
function getHash(
|
45381
|
+
// ../../node_modules/.pnpm/@noble+curves@1.6.0/node_modules/@noble/curves/esm/_shortw_utils.js
|
45382
|
+
function getHash(hash3) {
|
44727
45383
|
return {
|
44728
|
-
hash:
|
44729
|
-
hmac: (key, ...msgs) =>
|
44730
|
-
randomBytes
|
45384
|
+
hash: hash3,
|
45385
|
+
hmac: (key, ...msgs) => hmac(hash3, key, concatBytes2(...msgs)),
|
45386
|
+
randomBytes
|
44731
45387
|
};
|
44732
45388
|
}
|
44733
45389
|
function createCurve(curveDef, defHash) {
|
44734
|
-
const create = (
|
45390
|
+
const create = (hash3) => weierstrass({ ...curveDef, ...getHash(hash3) });
|
44735
45391
|
return Object.freeze({ ...create(defHash), create });
|
44736
45392
|
}
|
44737
45393
|
|
44738
|
-
// ../../node_modules/.pnpm/@noble+curves@1.
|
45394
|
+
// ../../node_modules/.pnpm/@noble+curves@1.6.0/node_modules/@noble/curves/esm/secp256k1.js
|
44739
45395
|
var secp256k1P = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f");
|
44740
45396
|
var secp256k1N = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");
|
44741
45397
|
var _1n6 = BigInt(1);
|
@@ -44811,7 +45467,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44811
45467
|
return { k1neg, k1, k2neg, k2 };
|
44812
45468
|
}
|
44813
45469
|
}
|
44814
|
-
},
|
45470
|
+
}, sha256);
|
44815
45471
|
var _0n6 = BigInt(0);
|
44816
45472
|
var Point = secp256k1.ProjectivePoint;
|
44817
45473
|
|
@@ -44904,7 +45560,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44904
45560
|
* @returns random 32-byte hashed
|
44905
45561
|
*/
|
44906
45562
|
static generatePrivateKey(entropy) {
|
44907
|
-
return entropy ? hash2(concat([
|
45563
|
+
return entropy ? hash2(concat([randomBytes22(32), arrayify(entropy)])) : randomBytes22(32);
|
44908
45564
|
}
|
44909
45565
|
/**
|
44910
45566
|
* Extended publicKey from a compact publicKey
|
@@ -44933,7 +45589,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44933
45589
|
async function encryptKeystoreWallet(privateKey, address, password) {
|
44934
45590
|
const privateKeyBuffer = bufferFromString2(removeHexPrefix(privateKey), "hex");
|
44935
45591
|
const ownerAddress = Address.fromAddressOrString(address);
|
44936
|
-
const salt =
|
45592
|
+
const salt = randomBytes22(DEFAULT_KEY_SIZE);
|
44937
45593
|
const key = scrypt22({
|
44938
45594
|
password: bufferFromString2(password),
|
44939
45595
|
salt,
|
@@ -44942,7 +45598,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
44942
45598
|
r: DEFAULT_KDF_PARAMS_R,
|
44943
45599
|
p: DEFAULT_KDF_PARAMS_P
|
44944
45600
|
});
|
44945
|
-
const iv =
|
45601
|
+
const iv = randomBytes22(DEFAULT_IV_SIZE);
|
44946
45602
|
const ciphertext = await encryptJsonWalletData2(privateKeyBuffer, key, iv);
|
44947
45603
|
const data = Uint8Array.from([...key.subarray(16, 32), ...ciphertext]);
|
44948
45604
|
const macHashUint8Array = keccak2562(data);
|
@@ -47443,7 +48099,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
47443
48099
|
* @returns A randomly generated mnemonic
|
47444
48100
|
*/
|
47445
48101
|
static generate(size = 32, extraEntropy = "") {
|
47446
|
-
const entropy = extraEntropy ? sha2562(concat([
|
48102
|
+
const entropy = extraEntropy ? sha2562(concat([randomBytes22(size), arrayify(extraEntropy)])) : randomBytes22(size);
|
47447
48103
|
return Mnemonic.entropyToMnemonic(entropy);
|
47448
48104
|
}
|
47449
48105
|
};
|
@@ -47544,9 +48200,9 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
47544
48200
|
data.set(arrayify(this.publicKey));
|
47545
48201
|
}
|
47546
48202
|
data.set(toBytes(index, 4), 33);
|
47547
|
-
const
|
47548
|
-
const IL =
|
47549
|
-
const IR =
|
48203
|
+
const bytes2 = arrayify(computeHmac2("sha512", chainCode, data));
|
48204
|
+
const IL = bytes2.slice(0, 32);
|
48205
|
+
const IR = bytes2.slice(32);
|
47550
48206
|
if (privateKey) {
|
47551
48207
|
const N = "0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141";
|
47552
48208
|
const ki = bn(IL).add(privateKey).mod(N).toBytes(32);
|
@@ -47616,26 +48272,26 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
47616
48272
|
}
|
47617
48273
|
static fromExtendedKey(extendedKey) {
|
47618
48274
|
const decoded = hexlify(toBytes(decodeBase58(extendedKey)));
|
47619
|
-
const
|
47620
|
-
const validChecksum = base58check(
|
47621
|
-
if (
|
48275
|
+
const bytes2 = arrayify(decoded);
|
48276
|
+
const validChecksum = base58check(bytes2.slice(0, 78)) === extendedKey;
|
48277
|
+
if (bytes2.length !== 82 || !isValidExtendedKey(bytes2)) {
|
47622
48278
|
throw new FuelError(ErrorCode.HD_WALLET_ERROR, "Provided key is not a valid extended key.");
|
47623
48279
|
}
|
47624
48280
|
if (!validChecksum) {
|
47625
48281
|
throw new FuelError(ErrorCode.HD_WALLET_ERROR, "Provided key has an invalid checksum.");
|
47626
48282
|
}
|
47627
|
-
const depth =
|
47628
|
-
const parentFingerprint = hexlify(
|
47629
|
-
const index = parseInt(hexlify(
|
47630
|
-
const chainCode = hexlify(
|
47631
|
-
const key =
|
48283
|
+
const depth = bytes2[4];
|
48284
|
+
const parentFingerprint = hexlify(bytes2.slice(5, 9));
|
48285
|
+
const index = parseInt(hexlify(bytes2.slice(9, 13)).substring(2), 16);
|
48286
|
+
const chainCode = hexlify(bytes2.slice(13, 45));
|
48287
|
+
const key = bytes2.slice(45, 78);
|
47632
48288
|
if (depth === 0 && parentFingerprint !== "0x00000000" || depth === 0 && index !== 0) {
|
47633
48289
|
throw new FuelError(
|
47634
48290
|
ErrorCode.HD_WALLET_ERROR,
|
47635
48291
|
"Inconsistency detected: Depth is zero but fingerprint/index is non-zero."
|
47636
48292
|
);
|
47637
48293
|
}
|
47638
|
-
if (isPublicExtendedKey(
|
48294
|
+
if (isPublicExtendedKey(bytes2)) {
|
47639
48295
|
if (key[0] !== 3) {
|
47640
48296
|
throw new FuelError(ErrorCode.HD_WALLET_ERROR, "Invalid public extended key.");
|
47641
48297
|
}
|
@@ -48279,8 +48935,8 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
48279
48935
|
// src/predicate/utils/getPredicateRoot.ts
|
48280
48936
|
var getPredicateRoot = (bytecode) => {
|
48281
48937
|
const chunkSize = 16 * 1024;
|
48282
|
-
const
|
48283
|
-
const chunks = chunkAndPadBytes(
|
48938
|
+
const bytes2 = arrayify(bytecode);
|
48939
|
+
const chunks = chunkAndPadBytes(bytes2, chunkSize);
|
48284
48940
|
const codeRoot = calcRoot(chunks.map((c) => hexlify(c)));
|
48285
48941
|
const predicateRoot = hash2(concat(["0x4655454C", codeRoot]));
|
48286
48942
|
return predicateRoot;
|
@@ -48376,8 +49032,8 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
48376
49032
|
* @param configurableConstants - Optional configurable constants for the predicate.
|
48377
49033
|
* @returns An object containing the new predicate bytes and interface.
|
48378
49034
|
*/
|
48379
|
-
static processPredicateData(
|
48380
|
-
let predicateBytes = arrayify(
|
49035
|
+
static processPredicateData(bytes2, jsonAbi, configurableConstants) {
|
49036
|
+
let predicateBytes = arrayify(bytes2);
|
48381
49037
|
let abiInterface;
|
48382
49038
|
if (jsonAbi) {
|
48383
49039
|
abiInterface = new Interface(jsonAbi);
|
@@ -48440,8 +49096,8 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
48440
49096
|
* @param abiInterface - The ABI interface of the predicate.
|
48441
49097
|
* @returns The mutated bytes with the configurable constants set.
|
48442
49098
|
*/
|
48443
|
-
static setConfigurableConstants(
|
48444
|
-
const mutatedBytes =
|
49099
|
+
static setConfigurableConstants(bytes2, configurableConstants, abiInterface) {
|
49100
|
+
const mutatedBytes = bytes2;
|
48445
49101
|
try {
|
48446
49102
|
if (!abiInterface) {
|
48447
49103
|
throw new FuelError(
|
@@ -49206,9 +49862,6 @@ mime-types/index.js:
|
|
49206
49862
|
@noble/curves/esm/abstract/utils.js:
|
49207
49863
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
49208
49864
|
|
49209
|
-
@noble/hashes/esm/utils.js:
|
49210
|
-
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
49211
|
-
|
49212
49865
|
@noble/curves/esm/abstract/modular.js:
|
49213
49866
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
49214
49867
|
|