@fuel-ts/account 0.0.0-rc-1889-20240322122653 → 0.0.0-rc-1356-20240322130951
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @fuel-ts/account might be problematic. Click here for more details.
- package/dist/account.d.ts +177 -0
- package/dist/account.d.ts.map +1 -0
- package/dist/configs.d.ts +2 -3
- package/dist/configs.d.ts.map +1 -0
- package/dist/connectors/fuel-connector.d.ts +188 -0
- package/dist/connectors/fuel-connector.d.ts.map +1 -0
- package/dist/connectors/fuel.d.ts +133 -0
- package/dist/connectors/fuel.d.ts.map +1 -0
- package/dist/connectors/index.d.ts +5 -0
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/types/connector-metadata.d.ts +12 -0
- package/dist/connectors/types/connector-metadata.d.ts.map +1 -0
- package/dist/connectors/types/connector-types.d.ts +34 -0
- package/dist/connectors/types/connector-types.d.ts.map +1 -0
- package/dist/connectors/types/data-type.d.ts +34 -0
- package/dist/connectors/types/data-type.d.ts.map +1 -0
- package/dist/connectors/types/events.d.ts +111 -0
- package/dist/connectors/types/events.d.ts.map +1 -0
- package/dist/connectors/types/index.d.ts +7 -0
- package/dist/connectors/types/index.d.ts.map +1 -0
- package/dist/connectors/types/local-storage.d.ts +11 -0
- package/dist/connectors/types/local-storage.d.ts.map +1 -0
- package/dist/connectors/types/target-object.d.ts +14 -0
- package/dist/connectors/types/target-object.d.ts.map +1 -0
- package/dist/connectors/utils/cache.d.ts +14 -0
- package/dist/connectors/utils/cache.d.ts.map +1 -0
- package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts +7 -0
- package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts.map +1 -0
- package/dist/connectors/utils/index.d.ts +4 -0
- package/dist/connectors/utils/index.d.ts.map +1 -0
- package/dist/connectors/utils/promises.d.ts +8 -0
- package/dist/connectors/utils/promises.d.ts.map +1 -0
- package/dist/hdwallet/hdwallet.d.ts +58 -0
- package/dist/hdwallet/hdwallet.d.ts.map +1 -0
- package/dist/hdwallet/index.d.ts +2 -0
- package/dist/hdwallet/index.d.ts.map +1 -0
- package/dist/index.d.ts +13 -904
- package/dist/index.d.ts.map +1 -0
- package/dist/index.global.js +461 -394
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +350 -314
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +251 -212
- package/dist/index.mjs.map +1 -1
- package/dist/mnemonic/index.d.ts +3 -0
- package/dist/mnemonic/index.d.ts.map +1 -0
- package/dist/mnemonic/mnemonic.d.ts +85 -0
- package/dist/mnemonic/mnemonic.d.ts.map +1 -0
- package/dist/mnemonic/utils.d.ts +8 -0
- package/dist/mnemonic/utils.d.ts.map +1 -0
- package/dist/predicate/index.d.ts +3 -0
- package/dist/predicate/index.d.ts.map +1 -0
- package/dist/predicate/predicate.d.ts +94 -0
- package/dist/predicate/predicate.d.ts.map +1 -0
- package/dist/predicate/utils/getPredicateRoot.d.ts +12 -0
- package/dist/predicate/utils/getPredicateRoot.d.ts.map +1 -0
- package/dist/predicate/utils/index.d.ts +2 -0
- package/dist/predicate/utils/index.d.ts.map +1 -0
- package/dist/providers/__generated__/operations.d.ts +3477 -0
- package/dist/providers/__generated__/operations.d.ts.map +1 -0
- package/dist/providers/assets/index.d.ts +5 -0
- package/dist/providers/assets/index.d.ts.map +1 -0
- package/dist/providers/assets/types.d.ts +36 -0
- package/dist/providers/assets/types.d.ts.map +1 -0
- package/dist/providers/assets/utils/index.d.ts +4 -0
- package/dist/providers/assets/utils/index.d.ts.map +1 -0
- package/dist/providers/assets/utils/network.d.ts +33 -0
- package/dist/providers/assets/utils/network.d.ts.map +1 -0
- package/dist/providers/assets/utils/resolveIconPaths.d.ts +14 -0
- package/dist/providers/assets/utils/resolveIconPaths.d.ts.map +1 -0
- package/dist/providers/assets/utils/url.d.ts +2 -0
- package/dist/providers/assets/utils/url.d.ts.map +1 -0
- package/dist/providers/chains.d.ts +11 -0
- package/dist/providers/chains.d.ts.map +1 -0
- package/dist/providers/coin-quantity.d.ts +21 -0
- package/dist/providers/coin-quantity.d.ts.map +1 -0
- package/dist/providers/coin.d.ts +15 -0
- package/dist/providers/coin.d.ts.map +1 -0
- package/dist/providers/fuel-graphql-subscriber.d.ts +23 -0
- package/dist/providers/fuel-graphql-subscriber.d.ts.map +1 -0
- package/dist/providers/index.d.ts +13 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/memory-cache.d.ts +11 -0
- package/dist/providers/memory-cache.d.ts.map +1 -0
- package/dist/providers/message.d.ts +60 -0
- package/dist/providers/message.d.ts.map +1 -0
- package/dist/providers/provider.d.ts +522 -0
- package/dist/providers/provider.d.ts.map +1 -0
- package/dist/providers/resource.d.ts +37 -0
- package/dist/providers/resource.d.ts.map +1 -0
- package/dist/providers/transaction-request/create-transaction-request.d.ts +73 -0
- package/dist/providers/transaction-request/create-transaction-request.d.ts.map +1 -0
- package/dist/providers/transaction-request/errors.d.ts +25 -0
- package/dist/providers/transaction-request/errors.d.ts.map +1 -0
- package/dist/providers/transaction-request/hash-transaction.d.ts +9 -0
- package/dist/providers/transaction-request/hash-transaction.d.ts.map +1 -0
- package/dist/providers/transaction-request/index.d.ts +10 -0
- package/dist/providers/transaction-request/index.d.ts.map +1 -0
- package/dist/providers/transaction-request/input.d.ts +59 -0
- package/dist/providers/transaction-request/input.d.ts.map +1 -0
- package/dist/providers/transaction-request/output.d.ts +39 -0
- package/dist/providers/transaction-request/output.d.ts.map +1 -0
- package/dist/providers/transaction-request/script-transaction-request.d.ts +106 -0
- package/dist/providers/transaction-request/script-transaction-request.d.ts.map +1 -0
- package/dist/providers/transaction-request/scripts.d.ts +6 -0
- package/dist/providers/transaction-request/scripts.d.ts.map +1 -0
- package/dist/providers/transaction-request/storage-slot.d.ts +10 -0
- package/dist/providers/transaction-request/storage-slot.d.ts.map +1 -0
- package/dist/providers/transaction-request/transaction-request.d.ts +259 -0
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -0
- package/dist/providers/transaction-request/types.d.ts +10 -0
- package/dist/providers/transaction-request/types.d.ts.map +1 -0
- package/dist/providers/transaction-request/utils.d.ts +4 -0
- package/dist/providers/transaction-request/utils.d.ts.map +1 -0
- package/dist/providers/transaction-request/witness.d.ts +5 -0
- package/dist/providers/transaction-request/witness.d.ts.map +1 -0
- package/dist/providers/transaction-response/getDecodedLogs.d.ts +5 -0
- package/dist/providers/transaction-response/getDecodedLogs.d.ts.map +1 -0
- package/dist/providers/transaction-response/index.d.ts +3 -0
- package/dist/providers/transaction-response/index.d.ts.map +1 -0
- package/dist/providers/transaction-response/transaction-response.d.ts +106 -0
- package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -0
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts +20 -0
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts.map +1 -0
- package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts +21 -0
- package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts.map +1 -0
- package/dist/providers/transaction-summary/call.d.ts +18 -0
- package/dist/providers/transaction-summary/call.d.ts.map +1 -0
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts +31 -0
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -0
- package/dist/providers/transaction-summary/index.d.ts +10 -0
- package/dist/providers/transaction-summary/index.d.ts.map +1 -0
- package/dist/providers/transaction-summary/input.d.ts +21 -0
- package/dist/providers/transaction-summary/input.d.ts.map +1 -0
- package/dist/providers/transaction-summary/operations.d.ts +40 -0
- package/dist/providers/transaction-summary/operations.d.ts.map +1 -0
- package/dist/providers/transaction-summary/output.d.ts +15 -0
- package/dist/providers/transaction-summary/output.d.ts.map +1 -0
- package/dist/providers/transaction-summary/receipt.d.ts +7 -0
- package/dist/providers/transaction-summary/receipt.d.ts.map +1 -0
- package/dist/providers/transaction-summary/status.d.ts +9 -0
- package/dist/providers/transaction-summary/status.d.ts.map +1 -0
- package/dist/providers/transaction-summary/types.d.ts +146 -0
- package/dist/providers/transaction-summary/types.d.ts.map +1 -0
- package/dist/providers/utils/auto-retry-fetch.d.ts +36 -0
- package/dist/providers/utils/auto-retry-fetch.d.ts.map +1 -0
- package/dist/providers/utils/block-explorer.d.ts +14 -0
- package/dist/providers/utils/block-explorer.d.ts.map +1 -0
- package/dist/providers/utils/gas.d.ts +38 -0
- package/dist/providers/utils/gas.d.ts.map +1 -0
- package/dist/providers/utils/index.d.ts +5 -0
- package/dist/providers/utils/index.d.ts.map +1 -0
- package/dist/providers/utils/json.d.ts +7 -0
- package/dist/providers/utils/json.d.ts.map +1 -0
- package/dist/providers/utils/merge-quantities.d.ts +3 -0
- package/dist/providers/utils/merge-quantities.d.ts.map +1 -0
- package/dist/providers/utils/receipts.d.ts +10 -0
- package/dist/providers/utils/receipts.d.ts.map +1 -0
- package/dist/signer/index.d.ts +2 -0
- package/dist/signer/index.d.ts.map +1 -0
- package/dist/signer/signer.d.ts +64 -0
- package/dist/signer/signer.d.ts.map +1 -0
- package/dist/test-utils/asset-id.d.ts +9 -0
- package/dist/test-utils/asset-id.d.ts.map +1 -0
- package/dist/test-utils/generateTestWallet.d.ts +4 -0
- package/dist/test-utils/generateTestWallet.d.ts.map +1 -0
- package/dist/test-utils/index.d.ts +8 -0
- package/dist/test-utils/index.d.ts.map +1 -0
- package/dist/{test-utils.d.ts → test-utils/launchNode.d.ts} +19 -24
- package/dist/test-utils/launchNode.d.ts.map +1 -0
- package/dist/test-utils/seedTestWallet.d.ts +4 -0
- package/dist/test-utils/seedTestWallet.d.ts.map +1 -0
- package/dist/test-utils/setup-test-provider-and-wallets.d.ts +33 -0
- package/dist/test-utils/setup-test-provider-and-wallets.d.ts.map +1 -0
- package/dist/test-utils/test-message.d.ts +28 -0
- package/dist/test-utils/test-message.d.ts.map +1 -0
- package/dist/test-utils/wallet-config.d.ts +49 -0
- package/dist/test-utils/wallet-config.d.ts.map +1 -0
- package/dist/test-utils.global.js +655 -310
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +452 -217
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +357 -124
- package/dist/test-utils.mjs.map +1 -1
- package/dist/utils/formatTransferToContractScriptData.d.ts +14 -0
- package/dist/utils/formatTransferToContractScriptData.d.ts.map +1 -0
- package/dist/wallet/base-wallet-unlocked.d.ts +73 -0
- package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -0
- package/dist/wallet/index.d.ts +4 -0
- package/dist/wallet/index.d.ts.map +1 -0
- package/dist/wallet/keystore-wallet.d.ts +38 -0
- package/dist/wallet/keystore-wallet.d.ts.map +1 -0
- package/dist/wallet/wallet.d.ts +68 -0
- package/dist/wallet/wallet.d.ts.map +1 -0
- package/dist/wallet/wallets.d.ts +76 -0
- package/dist/wallet/wallets.d.ts.map +1 -0
- package/dist/wallet-manager/index.d.ts +6 -0
- package/dist/wallet-manager/index.d.ts.map +1 -0
- package/dist/wallet-manager/storages/memory-storage.d.ts +9 -0
- package/dist/wallet-manager/storages/memory-storage.d.ts.map +1 -0
- package/dist/wallet-manager/types.d.ts +42 -0
- package/dist/wallet-manager/types.d.ts.map +1 -0
- package/dist/wallet-manager/vaults/mnemonic-vault.d.ts +29 -0
- package/dist/wallet-manager/vaults/mnemonic-vault.d.ts.map +1 -0
- package/dist/wallet-manager/vaults/privatekey-vault.d.ts +29 -0
- package/dist/wallet-manager/vaults/privatekey-vault.d.ts.map +1 -0
- package/dist/wallet-manager/wallet-manager.d.ts +104 -0
- package/dist/wallet-manager/wallet-manager.d.ts.map +1 -0
- package/dist/wordlists/index.d.ts +5 -0
- package/dist/wordlists/index.d.ts.map +1 -0
- package/dist/wordlists/words/english.d.ts +2 -0
- package/dist/wordlists/words/english.d.ts.map +1 -0
- package/package.json +26 -21
- package/dist/account-E9nGNf5X.d.mts +0 -3837
- package/dist/account-E9nGNf5X.d.ts +0 -3837
- package/dist/configs.d.mts +0 -3
- package/dist/index.d.mts +0 -904
- package/dist/test-utils.d.mts +0 -66
@@ -6,12 +6,13 @@
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
9
10
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
10
11
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
11
12
|
}) : x)(function(x) {
|
12
13
|
if (typeof require !== "undefined")
|
13
14
|
return require.apply(this, arguments);
|
14
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
15
|
+
throw new Error('Dynamic require of "' + x + '" is not supported');
|
15
16
|
});
|
16
17
|
var __esm = (fn, res) => function __init() {
|
17
18
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
@@ -40,6 +41,23 @@
|
|
40
41
|
mod2
|
41
42
|
));
|
42
43
|
var __toCommonJS = (mod2) => __copyProps(__defProp({}, "__esModule", { value: true }), mod2);
|
44
|
+
var __publicField = (obj, key, value) => {
|
45
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
46
|
+
return value;
|
47
|
+
};
|
48
|
+
var __accessCheck = (obj, member, msg) => {
|
49
|
+
if (!member.has(obj))
|
50
|
+
throw TypeError("Cannot " + msg);
|
51
|
+
};
|
52
|
+
var __privateAdd = (obj, member, value) => {
|
53
|
+
if (member.has(obj))
|
54
|
+
throw TypeError("Cannot add the same private member more than once");
|
55
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
56
|
+
};
|
57
|
+
var __privateMethod = (obj, member, method) => {
|
58
|
+
__accessCheck(obj, member, "access private method");
|
59
|
+
return method;
|
60
|
+
};
|
43
61
|
|
44
62
|
// ../../node_modules/.pnpm/bech32@2.0.0/node_modules/bech32/dist/index.js
|
45
63
|
var require_dist = __commonJS({
|
@@ -210,7 +228,6 @@
|
|
210
228
|
// ../../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js
|
211
229
|
var require_bn = __commonJS({
|
212
230
|
"../../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js"(exports, module) {
|
213
|
-
"use strict";
|
214
231
|
(function(module2, exports2) {
|
215
232
|
"use strict";
|
216
233
|
function assert3(val, msg) {
|
@@ -5528,7 +5545,6 @@
|
|
5528
5545
|
var import_stream, import_http, import_url, import_whatwg_url, import_https, import_zlib, Readable, BUFFER, TYPE, Blob2, convert, INTERNALS, PassThrough, invalidTokenRegex, invalidHeaderCharRegex, MAP, Headers2, INTERNAL, HeadersIteratorPrototype, INTERNALS$1, STATUS_CODES, Response2, INTERNALS$2, URL, parse_url, format_url, streamDestructionSupported, Request, URL$1, PassThrough$1, isDomainOrSubdomain, isSameProtocol, lib_default;
|
5529
5546
|
var init_lib = __esm({
|
5530
5547
|
"../../node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/lib/index.mjs"() {
|
5531
|
-
"use strict";
|
5532
5548
|
import_stream = __toESM(__require("stream"), 1);
|
5533
5549
|
import_http = __toESM(__require("http"), 1);
|
5534
5550
|
import_url = __toESM(__require("url"), 1);
|
@@ -5538,7 +5554,7 @@
|
|
5538
5554
|
Readable = import_stream.default.Readable;
|
5539
5555
|
BUFFER = Symbol("buffer");
|
5540
5556
|
TYPE = Symbol("type");
|
5541
|
-
Blob2 = class
|
5557
|
+
Blob2 = class {
|
5542
5558
|
constructor() {
|
5543
5559
|
this[TYPE] = "";
|
5544
5560
|
const blobParts = arguments[0];
|
@@ -5557,7 +5573,7 @@
|
|
5557
5573
|
buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
|
5558
5574
|
} else if (element instanceof ArrayBuffer) {
|
5559
5575
|
buffer = Buffer.from(element);
|
5560
|
-
} else if (element instanceof
|
5576
|
+
} else if (element instanceof Blob2) {
|
5561
5577
|
buffer = element[BUFFER];
|
5562
5578
|
} else {
|
5563
5579
|
buffer = Buffer.from(typeof element === "string" ? element : String(element));
|
@@ -5619,7 +5635,7 @@
|
|
5619
5635
|
const span = Math.max(relativeEnd - relativeStart, 0);
|
5620
5636
|
const buffer = this[BUFFER];
|
5621
5637
|
const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
|
5622
|
-
const blob = new
|
5638
|
+
const blob = new Blob2([], { type: arguments[2] });
|
5623
5639
|
blob[BUFFER] = slicedBuffer;
|
5624
5640
|
return blob;
|
5625
5641
|
}
|
@@ -5746,7 +5762,7 @@
|
|
5746
5762
|
invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
|
5747
5763
|
invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
|
5748
5764
|
MAP = Symbol("map");
|
5749
|
-
Headers2 = class
|
5765
|
+
Headers2 = class {
|
5750
5766
|
/**
|
5751
5767
|
* Headers class
|
5752
5768
|
*
|
@@ -5756,7 +5772,7 @@
|
|
5756
5772
|
constructor() {
|
5757
5773
|
let init = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : void 0;
|
5758
5774
|
this[MAP] = /* @__PURE__ */ Object.create(null);
|
5759
|
-
if (init instanceof
|
5775
|
+
if (init instanceof Headers2) {
|
5760
5776
|
const rawHeaders = init.raw();
|
5761
5777
|
const headerNames = Object.keys(rawHeaders);
|
5762
5778
|
for (const headerName of headerNames) {
|
@@ -5974,7 +5990,7 @@
|
|
5974
5990
|
});
|
5975
5991
|
INTERNALS$1 = Symbol("Response internals");
|
5976
5992
|
STATUS_CODES = import_http.default.STATUS_CODES;
|
5977
|
-
Response2 = class
|
5993
|
+
Response2 = class {
|
5978
5994
|
constructor() {
|
5979
5995
|
let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
5980
5996
|
let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
@@ -6022,7 +6038,7 @@
|
|
6022
6038
|
* @return Response
|
6023
6039
|
*/
|
6024
6040
|
clone() {
|
6025
|
-
return new
|
6041
|
+
return new Response2(clone(this), {
|
6026
6042
|
url: this.url,
|
6027
6043
|
status: this.status,
|
6028
6044
|
statusText: this.statusText,
|
@@ -6053,7 +6069,7 @@
|
|
6053
6069
|
parse_url = import_url.default.parse;
|
6054
6070
|
format_url = import_url.default.format;
|
6055
6071
|
streamDestructionSupported = "destroy" in import_stream.default.Readable.prototype;
|
6056
|
-
Request = class
|
6072
|
+
Request = class {
|
6057
6073
|
constructor(input) {
|
6058
6074
|
let init = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
6059
6075
|
let parsedURL;
|
@@ -6123,7 +6139,7 @@
|
|
6123
6139
|
* @return Request
|
6124
6140
|
*/
|
6125
6141
|
clone() {
|
6126
|
-
return new
|
6142
|
+
return new Request(this);
|
6127
6143
|
}
|
6128
6144
|
};
|
6129
6145
|
Body.mixIn(Request.prototype);
|
@@ -6167,7 +6183,6 @@
|
|
6167
6183
|
// ../../node_modules/.pnpm/cross-fetch@4.0.0/node_modules/cross-fetch/dist/node-ponyfill.js
|
6168
6184
|
var require_node_ponyfill = __commonJS({
|
6169
6185
|
"../../node_modules/.pnpm/cross-fetch@4.0.0/node_modules/cross-fetch/dist/node-ponyfill.js"(exports, module) {
|
6170
|
-
"use strict";
|
6171
6186
|
var nodeFetch = (init_lib(), __toCommonJS(lib_exports));
|
6172
6187
|
var realFetch = nodeFetch.default || nodeFetch;
|
6173
6188
|
var fetch3 = function(url, options) {
|
@@ -6333,7 +6348,7 @@
|
|
6333
6348
|
}
|
6334
6349
|
return firstArg;
|
6335
6350
|
}
|
6336
|
-
var GraphQLError2 = class
|
6351
|
+
var GraphQLError2 = class extends Error {
|
6337
6352
|
/**
|
6338
6353
|
* An array of `{ line, column }` locations within the source GraphQL document
|
6339
6354
|
* which correspond to this error.
|
@@ -6422,7 +6437,7 @@
|
|
6422
6437
|
configurable: true
|
6423
6438
|
});
|
6424
6439
|
} else if (Error.captureStackTrace) {
|
6425
|
-
Error.captureStackTrace(this,
|
6440
|
+
Error.captureStackTrace(this, GraphQLError2);
|
6426
6441
|
} else {
|
6427
6442
|
Object.defineProperty(this, "stack", {
|
6428
6443
|
value: Error().stack,
|
@@ -9819,7 +9834,6 @@ spurious results.`);
|
|
9819
9834
|
// ../../node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js
|
9820
9835
|
var require_delayed_stream = __commonJS({
|
9821
9836
|
"../../node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js"(exports, module) {
|
9822
|
-
"use strict";
|
9823
9837
|
var Stream2 = __require("stream").Stream;
|
9824
9838
|
var util = __require("util");
|
9825
9839
|
module.exports = DelayedStream;
|
@@ -9911,7 +9925,6 @@ spurious results.`);
|
|
9911
9925
|
// ../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js
|
9912
9926
|
var require_combined_stream = __commonJS({
|
9913
9927
|
"../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js"(exports, module) {
|
9914
|
-
"use strict";
|
9915
9928
|
var util = __require("util");
|
9916
9929
|
var Stream2 = __require("stream").Stream;
|
9917
9930
|
var DelayedStream = require_delayed_stream();
|
@@ -18608,7 +18621,6 @@ spurious results.`);
|
|
18608
18621
|
// ../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js
|
18609
18622
|
var require_mime_db = __commonJS({
|
18610
18623
|
"../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js"(exports, module) {
|
18611
|
-
"use strict";
|
18612
18624
|
module.exports = require_db();
|
18613
18625
|
}
|
18614
18626
|
});
|
@@ -18707,7 +18719,6 @@ spurious results.`);
|
|
18707
18719
|
// ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/defer.js
|
18708
18720
|
var require_defer = __commonJS({
|
18709
18721
|
"../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/defer.js"(exports, module) {
|
18710
|
-
"use strict";
|
18711
18722
|
module.exports = defer;
|
18712
18723
|
function defer(fn) {
|
18713
18724
|
var nextTick = typeof setImmediate == "function" ? setImmediate : typeof process == "object" && typeof process.nextTick == "function" ? process.nextTick : null;
|
@@ -18723,7 +18734,6 @@ spurious results.`);
|
|
18723
18734
|
// ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/async.js
|
18724
18735
|
var require_async = __commonJS({
|
18725
18736
|
"../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/async.js"(exports, module) {
|
18726
|
-
"use strict";
|
18727
18737
|
var defer = require_defer();
|
18728
18738
|
module.exports = async;
|
18729
18739
|
function async(callback) {
|
@@ -18747,7 +18757,6 @@ spurious results.`);
|
|
18747
18757
|
// ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/abort.js
|
18748
18758
|
var require_abort = __commonJS({
|
18749
18759
|
"../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/abort.js"(exports, module) {
|
18750
|
-
"use strict";
|
18751
18760
|
module.exports = abort;
|
18752
18761
|
function abort(state) {
|
18753
18762
|
Object.keys(state.jobs).forEach(clean.bind(state));
|
@@ -18764,7 +18773,6 @@ spurious results.`);
|
|
18764
18773
|
// ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/iterate.js
|
18765
18774
|
var require_iterate = __commonJS({
|
18766
18775
|
"../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/iterate.js"(exports, module) {
|
18767
|
-
"use strict";
|
18768
18776
|
var async = require_async();
|
18769
18777
|
var abort = require_abort();
|
18770
18778
|
module.exports = iterate;
|
@@ -18798,7 +18806,6 @@ spurious results.`);
|
|
18798
18806
|
// ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/state.js
|
18799
18807
|
var require_state = __commonJS({
|
18800
18808
|
"../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/state.js"(exports, module) {
|
18801
|
-
"use strict";
|
18802
18809
|
module.exports = state;
|
18803
18810
|
function state(list, sortMethod) {
|
18804
18811
|
var isNamedList = !Array.isArray(list), initState = {
|
@@ -18821,7 +18828,6 @@ spurious results.`);
|
|
18821
18828
|
// ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/terminator.js
|
18822
18829
|
var require_terminator = __commonJS({
|
18823
18830
|
"../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/terminator.js"(exports, module) {
|
18824
|
-
"use strict";
|
18825
18831
|
var abort = require_abort();
|
18826
18832
|
var async = require_async();
|
18827
18833
|
module.exports = terminator;
|
@@ -18839,7 +18845,6 @@ spurious results.`);
|
|
18839
18845
|
// ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/parallel.js
|
18840
18846
|
var require_parallel = __commonJS({
|
18841
18847
|
"../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/parallel.js"(exports, module) {
|
18842
|
-
"use strict";
|
18843
18848
|
var iterate = require_iterate();
|
18844
18849
|
var initState = require_state();
|
18845
18850
|
var terminator = require_terminator();
|
@@ -18867,7 +18872,6 @@ spurious results.`);
|
|
18867
18872
|
// ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serialOrdered.js
|
18868
18873
|
var require_serialOrdered = __commonJS({
|
18869
18874
|
"../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serialOrdered.js"(exports, module) {
|
18870
|
-
"use strict";
|
18871
18875
|
var iterate = require_iterate();
|
18872
18876
|
var initState = require_state();
|
18873
18877
|
var terminator = require_terminator();
|
@@ -18902,7 +18906,6 @@ spurious results.`);
|
|
18902
18906
|
// ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serial.js
|
18903
18907
|
var require_serial = __commonJS({
|
18904
18908
|
"../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serial.js"(exports, module) {
|
18905
|
-
"use strict";
|
18906
18909
|
var serialOrdered = require_serialOrdered();
|
18907
18910
|
module.exports = serial;
|
18908
18911
|
function serial(list, iterator, callback) {
|
@@ -18914,7 +18917,6 @@ spurious results.`);
|
|
18914
18917
|
// ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/index.js
|
18915
18918
|
var require_asynckit = __commonJS({
|
18916
18919
|
"../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/index.js"(exports, module) {
|
18917
|
-
"use strict";
|
18918
18920
|
module.exports = {
|
18919
18921
|
parallel: require_parallel(),
|
18920
18922
|
serial: require_serial(),
|
@@ -18926,7 +18928,6 @@ spurious results.`);
|
|
18926
18928
|
// ../../node_modules/.pnpm/form-data@3.0.1/node_modules/form-data/lib/populate.js
|
18927
18929
|
var require_populate = __commonJS({
|
18928
18930
|
"../../node_modules/.pnpm/form-data@3.0.1/node_modules/form-data/lib/populate.js"(exports, module) {
|
18929
|
-
"use strict";
|
18930
18931
|
module.exports = function(dst, src) {
|
18931
18932
|
Object.keys(src).forEach(function(prop) {
|
18932
18933
|
dst[prop] = dst[prop] || src[prop];
|
@@ -18939,7 +18940,6 @@ spurious results.`);
|
|
18939
18940
|
// ../../node_modules/.pnpm/form-data@3.0.1/node_modules/form-data/lib/form_data.js
|
18940
18941
|
var require_form_data = __commonJS({
|
18941
18942
|
"../../node_modules/.pnpm/form-data@3.0.1/node_modules/form-data/lib/form_data.js"(exports, module) {
|
18942
|
-
"use strict";
|
18943
18943
|
var CombinedStream = require_combined_stream();
|
18944
18944
|
var util = __require("util");
|
18945
18945
|
var path2 = __require("path");
|
@@ -19381,7 +19381,7 @@ spurious results.`);
|
|
19381
19381
|
var require_types = __commonJS({
|
19382
19382
|
"../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/types.js"(exports) {
|
19383
19383
|
"use strict";
|
19384
|
-
var __extends = exports && exports.__extends ||
|
19384
|
+
var __extends = exports && exports.__extends || function() {
|
19385
19385
|
var extendStatics = function(d, b) {
|
19386
19386
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
19387
19387
|
d2.__proto__ = b2;
|
@@ -22371,10 +22371,10 @@ spurious results.`);
|
|
22371
22371
|
return RegId.__wrap(ret3);
|
22372
22372
|
}
|
22373
22373
|
};
|
22374
|
-
var CompareArgs = class
|
22374
|
+
var CompareArgs = class {
|
22375
22375
|
static __wrap(ptr) {
|
22376
22376
|
ptr = ptr >>> 0;
|
22377
|
-
const obj = Object.create(
|
22377
|
+
const obj = Object.create(CompareArgs.prototype);
|
22378
22378
|
obj.__wbg_ptr = ptr;
|
22379
22379
|
return obj;
|
22380
22380
|
}
|
@@ -22435,7 +22435,7 @@ spurious results.`);
|
|
22435
22435
|
_assertClass(bits, Imm06);
|
22436
22436
|
var ptr0 = bits.__destroy_into_raw();
|
22437
22437
|
const ret3 = wasm$1.compareargs_from_imm(ptr0);
|
22438
|
-
return ret3 === 0 ? void 0 :
|
22438
|
+
return ret3 === 0 ? void 0 : CompareArgs.__wrap(ret3);
|
22439
22439
|
}
|
22440
22440
|
};
|
22441
22441
|
var DIV = class {
|
@@ -22973,10 +22973,10 @@ spurious results.`);
|
|
22973
22973
|
return RegId.__wrap(ret3);
|
22974
22974
|
}
|
22975
22975
|
};
|
22976
|
-
var GM = class
|
22976
|
+
var GM = class {
|
22977
22977
|
static __wrap(ptr) {
|
22978
22978
|
ptr = ptr >>> 0;
|
22979
|
-
const obj = Object.create(
|
22979
|
+
const obj = Object.create(GM.prototype);
|
22980
22980
|
obj.__wbg_ptr = ptr;
|
22981
22981
|
return obj;
|
22982
22982
|
}
|
@@ -23029,7 +23029,7 @@ spurious results.`);
|
|
23029
23029
|
_assertClass(ra, RegId);
|
23030
23030
|
var ptr0 = ra.__destroy_into_raw();
|
23031
23031
|
const ret3 = wasm$1.gm_from_args(ptr0, args);
|
23032
|
-
return
|
23032
|
+
return GM.__wrap(ret3);
|
23033
23033
|
}
|
23034
23034
|
};
|
23035
23035
|
var GT = class {
|
@@ -23084,10 +23084,10 @@ spurious results.`);
|
|
23084
23084
|
return RegId.__wrap(ret3);
|
23085
23085
|
}
|
23086
23086
|
};
|
23087
|
-
var GTF = class
|
23087
|
+
var GTF = class {
|
23088
23088
|
static __wrap(ptr) {
|
23089
23089
|
ptr = ptr >>> 0;
|
23090
|
-
const obj = Object.create(
|
23090
|
+
const obj = Object.create(GTF.prototype);
|
23091
23091
|
obj.__wbg_ptr = ptr;
|
23092
23092
|
return obj;
|
23093
23093
|
}
|
@@ -23154,13 +23154,13 @@ spurious results.`);
|
|
23154
23154
|
_assertClass(rb, RegId);
|
23155
23155
|
var ptr1 = rb.__destroy_into_raw();
|
23156
23156
|
const ret3 = wasm$1.gtf_from_args(ptr0, ptr1, args);
|
23157
|
-
return
|
23157
|
+
return GTF.__wrap(ret3);
|
23158
23158
|
}
|
23159
23159
|
};
|
23160
|
-
var Imm06 = class
|
23160
|
+
var Imm06 = class {
|
23161
23161
|
static __wrap(ptr) {
|
23162
23162
|
ptr = ptr >>> 0;
|
23163
|
-
const obj = Object.create(
|
23163
|
+
const obj = Object.create(Imm06.prototype);
|
23164
23164
|
obj.__wbg_ptr = ptr;
|
23165
23165
|
return obj;
|
23166
23166
|
}
|
@@ -23174,10 +23174,10 @@ spurious results.`);
|
|
23174
23174
|
wasm$1.__wbg_imm06_free(ptr);
|
23175
23175
|
}
|
23176
23176
|
};
|
23177
|
-
var Imm12 = class
|
23177
|
+
var Imm12 = class {
|
23178
23178
|
static __wrap(ptr) {
|
23179
23179
|
ptr = ptr >>> 0;
|
23180
|
-
const obj = Object.create(
|
23180
|
+
const obj = Object.create(Imm12.prototype);
|
23181
23181
|
obj.__wbg_ptr = ptr;
|
23182
23182
|
return obj;
|
23183
23183
|
}
|
@@ -23191,10 +23191,10 @@ spurious results.`);
|
|
23191
23191
|
wasm$1.__wbg_imm12_free(ptr);
|
23192
23192
|
}
|
23193
23193
|
};
|
23194
|
-
var Imm18 = class
|
23194
|
+
var Imm18 = class {
|
23195
23195
|
static __wrap(ptr) {
|
23196
23196
|
ptr = ptr >>> 0;
|
23197
|
-
const obj = Object.create(
|
23197
|
+
const obj = Object.create(Imm18.prototype);
|
23198
23198
|
obj.__wbg_ptr = ptr;
|
23199
23199
|
return obj;
|
23200
23200
|
}
|
@@ -23208,10 +23208,10 @@ spurious results.`);
|
|
23208
23208
|
wasm$1.__wbg_imm18_free(ptr);
|
23209
23209
|
}
|
23210
23210
|
};
|
23211
|
-
var Imm24 = class
|
23211
|
+
var Imm24 = class {
|
23212
23212
|
static __wrap(ptr) {
|
23213
23213
|
ptr = ptr >>> 0;
|
23214
|
-
const obj = Object.create(
|
23214
|
+
const obj = Object.create(Imm24.prototype);
|
23215
23215
|
obj.__wbg_ptr = ptr;
|
23216
23216
|
return obj;
|
23217
23217
|
}
|
@@ -23225,10 +23225,10 @@ spurious results.`);
|
|
23225
23225
|
wasm$1.__wbg_imm24_free(ptr);
|
23226
23226
|
}
|
23227
23227
|
};
|
23228
|
-
var Instruction = class
|
23228
|
+
var Instruction = class {
|
23229
23229
|
static __wrap(ptr) {
|
23230
23230
|
ptr = ptr >>> 0;
|
23231
|
-
const obj = Object.create(
|
23231
|
+
const obj = Object.create(Instruction.prototype);
|
23232
23232
|
obj.__wbg_ptr = ptr;
|
23233
23233
|
return obj;
|
23234
23234
|
}
|
@@ -25421,10 +25421,10 @@ spurious results.`);
|
|
25421
25421
|
return RegId.__wrap(ret3);
|
25422
25422
|
}
|
25423
25423
|
};
|
25424
|
-
var RegId = class
|
25424
|
+
var RegId = class {
|
25425
25425
|
static __wrap(ptr) {
|
25426
25426
|
ptr = ptr >>> 0;
|
25427
|
-
const obj = Object.create(
|
25427
|
+
const obj = Object.create(RegId.prototype);
|
25428
25428
|
obj.__wbg_ptr = ptr;
|
25429
25429
|
return obj;
|
25430
25430
|
}
|
@@ -25446,7 +25446,7 @@ spurious results.`);
|
|
25446
25446
|
*/
|
25447
25447
|
static new_checked(u) {
|
25448
25448
|
const ret3 = wasm$1.regid_new_checked(u);
|
25449
|
-
return ret3 === 0 ? void 0 :
|
25449
|
+
return ret3 === 0 ? void 0 : RegId.__wrap(ret3);
|
25450
25450
|
}
|
25451
25451
|
/**
|
25452
25452
|
* Received balance for this context.
|
@@ -25454,7 +25454,7 @@ spurious results.`);
|
|
25454
25454
|
*/
|
25455
25455
|
static bal() {
|
25456
25456
|
const ret3 = wasm$1.regid_bal();
|
25457
|
-
return
|
25457
|
+
return RegId.__wrap(ret3);
|
25458
25458
|
}
|
25459
25459
|
/**
|
25460
25460
|
* Remaining gas in the context.
|
@@ -25462,7 +25462,7 @@ spurious results.`);
|
|
25462
25462
|
*/
|
25463
25463
|
static cgas() {
|
25464
25464
|
const ret3 = wasm$1.regid_cgas();
|
25465
|
-
return
|
25465
|
+
return RegId.__wrap(ret3);
|
25466
25466
|
}
|
25467
25467
|
/**
|
25468
25468
|
* Error codes for particular operations.
|
@@ -25470,7 +25470,7 @@ spurious results.`);
|
|
25470
25470
|
*/
|
25471
25471
|
static err() {
|
25472
25472
|
const ret3 = wasm$1.regid_err();
|
25473
|
-
return
|
25473
|
+
return RegId.__wrap(ret3);
|
25474
25474
|
}
|
25475
25475
|
/**
|
25476
25476
|
* Flags register.
|
@@ -25478,7 +25478,7 @@ spurious results.`);
|
|
25478
25478
|
*/
|
25479
25479
|
static flag() {
|
25480
25480
|
const ret3 = wasm$1.regid_flag();
|
25481
|
-
return
|
25481
|
+
return RegId.__wrap(ret3);
|
25482
25482
|
}
|
25483
25483
|
/**
|
25484
25484
|
* Frame pointer. Memory address of beginning of current call frame.
|
@@ -25486,7 +25486,7 @@ spurious results.`);
|
|
25486
25486
|
*/
|
25487
25487
|
static fp() {
|
25488
25488
|
const ret3 = wasm$1.regid_fp();
|
25489
|
-
return
|
25489
|
+
return RegId.__wrap(ret3);
|
25490
25490
|
}
|
25491
25491
|
/**
|
25492
25492
|
* Remaining gas globally.
|
@@ -25494,7 +25494,7 @@ spurious results.`);
|
|
25494
25494
|
*/
|
25495
25495
|
static ggas() {
|
25496
25496
|
const ret3 = wasm$1.regid_ggas();
|
25497
|
-
return
|
25497
|
+
return RegId.__wrap(ret3);
|
25498
25498
|
}
|
25499
25499
|
/**
|
25500
25500
|
* Heap pointer. Memory address below the current bottom of the heap (points to free
|
@@ -25503,7 +25503,7 @@ spurious results.`);
|
|
25503
25503
|
*/
|
25504
25504
|
static hp() {
|
25505
25505
|
const ret3 = wasm$1.regid_hp();
|
25506
|
-
return
|
25506
|
+
return RegId.__wrap(ret3);
|
25507
25507
|
}
|
25508
25508
|
/**
|
25509
25509
|
* Instructions start. Pointer to the start of the currently-executing code.
|
@@ -25511,7 +25511,7 @@ spurious results.`);
|
|
25511
25511
|
*/
|
25512
25512
|
static is() {
|
25513
25513
|
const ret3 = wasm$1.regid_is();
|
25514
|
-
return
|
25514
|
+
return RegId.__wrap(ret3);
|
25515
25515
|
}
|
25516
25516
|
/**
|
25517
25517
|
* Contains overflow/underflow of addition, subtraction, and multiplication.
|
@@ -25519,7 +25519,7 @@ spurious results.`);
|
|
25519
25519
|
*/
|
25520
25520
|
static of() {
|
25521
25521
|
const ret3 = wasm$1.regid_of();
|
25522
|
-
return
|
25522
|
+
return RegId.__wrap(ret3);
|
25523
25523
|
}
|
25524
25524
|
/**
|
25525
25525
|
* Contains one (1), for convenience.
|
@@ -25527,7 +25527,7 @@ spurious results.`);
|
|
25527
25527
|
*/
|
25528
25528
|
static one() {
|
25529
25529
|
const ret3 = wasm$1.regid_one();
|
25530
|
-
return
|
25530
|
+
return RegId.__wrap(ret3);
|
25531
25531
|
}
|
25532
25532
|
/**
|
25533
25533
|
* The program counter. Memory address of the current instruction.
|
@@ -25535,7 +25535,7 @@ spurious results.`);
|
|
25535
25535
|
*/
|
25536
25536
|
static pc() {
|
25537
25537
|
const ret3 = wasm$1.regid_pc();
|
25538
|
-
return
|
25538
|
+
return RegId.__wrap(ret3);
|
25539
25539
|
}
|
25540
25540
|
/**
|
25541
25541
|
* Return value or pointer.
|
@@ -25543,7 +25543,7 @@ spurious results.`);
|
|
25543
25543
|
*/
|
25544
25544
|
static ret() {
|
25545
25545
|
const ret3 = wasm$1.regid_ret();
|
25546
|
-
return
|
25546
|
+
return RegId.__wrap(ret3);
|
25547
25547
|
}
|
25548
25548
|
/**
|
25549
25549
|
* Return value length in bytes.
|
@@ -25551,7 +25551,7 @@ spurious results.`);
|
|
25551
25551
|
*/
|
25552
25552
|
static retl() {
|
25553
25553
|
const ret3 = wasm$1.regid_retl();
|
25554
|
-
return
|
25554
|
+
return RegId.__wrap(ret3);
|
25555
25555
|
}
|
25556
25556
|
/**
|
25557
25557
|
* Stack pointer. Memory address on top of current writable stack area (points to
|
@@ -25560,7 +25560,7 @@ spurious results.`);
|
|
25560
25560
|
*/
|
25561
25561
|
static sp() {
|
25562
25562
|
const ret3 = wasm$1.regid_sp();
|
25563
|
-
return
|
25563
|
+
return RegId.__wrap(ret3);
|
25564
25564
|
}
|
25565
25565
|
/**
|
25566
25566
|
* Stack start pointer. Memory address of bottom of current writable stack area.
|
@@ -25568,7 +25568,7 @@ spurious results.`);
|
|
25568
25568
|
*/
|
25569
25569
|
static spp() {
|
25570
25570
|
const ret3 = wasm$1.regid_spp();
|
25571
|
-
return
|
25571
|
+
return RegId.__wrap(ret3);
|
25572
25572
|
}
|
25573
25573
|
/**
|
25574
25574
|
* Smallest writable register.
|
@@ -25576,7 +25576,7 @@ spurious results.`);
|
|
25576
25576
|
*/
|
25577
25577
|
static writable() {
|
25578
25578
|
const ret3 = wasm$1.regid_writable();
|
25579
|
-
return
|
25579
|
+
return RegId.__wrap(ret3);
|
25580
25580
|
}
|
25581
25581
|
/**
|
25582
25582
|
* Contains zero (0), for convenience.
|
@@ -25584,7 +25584,7 @@ spurious results.`);
|
|
25584
25584
|
*/
|
25585
25585
|
static zero() {
|
25586
25586
|
const ret3 = wasm$1.regid_zero();
|
25587
|
-
return
|
25587
|
+
return RegId.__wrap(ret3);
|
25588
25588
|
}
|
25589
25589
|
/**
|
25590
25590
|
* Construct a register ID from the given value.
|
@@ -26639,10 +26639,10 @@ spurious results.`);
|
|
26639
26639
|
return RegId.__wrap(ret3);
|
26640
26640
|
}
|
26641
26641
|
};
|
26642
|
-
var WDCM = class
|
26642
|
+
var WDCM = class {
|
26643
26643
|
static __wrap(ptr) {
|
26644
26644
|
ptr = ptr >>> 0;
|
26645
|
-
const obj = Object.create(
|
26645
|
+
const obj = Object.create(WDCM.prototype);
|
26646
26646
|
obj.__wbg_ptr = ptr;
|
26647
26647
|
return obj;
|
26648
26648
|
}
|
@@ -26725,13 +26725,13 @@ spurious results.`);
|
|
26725
26725
|
_assertClass(args, CompareArgs);
|
26726
26726
|
var ptr3 = args.__destroy_into_raw();
|
26727
26727
|
const ret3 = wasm$1.wdcm_from_args(ptr0, ptr1, ptr2, ptr3);
|
26728
|
-
return
|
26728
|
+
return WDCM.__wrap(ret3);
|
26729
26729
|
}
|
26730
26730
|
};
|
26731
|
-
var WDDV = class
|
26731
|
+
var WDDV = class {
|
26732
26732
|
static __wrap(ptr) {
|
26733
26733
|
ptr = ptr >>> 0;
|
26734
|
-
const obj = Object.create(
|
26734
|
+
const obj = Object.create(WDDV.prototype);
|
26735
26735
|
obj.__wbg_ptr = ptr;
|
26736
26736
|
return obj;
|
26737
26737
|
}
|
@@ -26814,7 +26814,7 @@ spurious results.`);
|
|
26814
26814
|
_assertClass(args, DivArgs);
|
26815
26815
|
var ptr3 = args.__destroy_into_raw();
|
26816
26816
|
const ret3 = wasm$1.wddv_from_args(ptr0, ptr1, ptr2, ptr3);
|
26817
|
-
return
|
26817
|
+
return WDDV.__wrap(ret3);
|
26818
26818
|
}
|
26819
26819
|
};
|
26820
26820
|
var WDMD = class {
|
@@ -26880,10 +26880,10 @@ spurious results.`);
|
|
26880
26880
|
return RegId.__wrap(ret3);
|
26881
26881
|
}
|
26882
26882
|
};
|
26883
|
-
var WDML = class
|
26883
|
+
var WDML = class {
|
26884
26884
|
static __wrap(ptr) {
|
26885
26885
|
ptr = ptr >>> 0;
|
26886
|
-
const obj = Object.create(
|
26886
|
+
const obj = Object.create(WDML.prototype);
|
26887
26887
|
obj.__wbg_ptr = ptr;
|
26888
26888
|
return obj;
|
26889
26889
|
}
|
@@ -26966,7 +26966,7 @@ spurious results.`);
|
|
26966
26966
|
_assertClass(args, MulArgs);
|
26967
26967
|
var ptr3 = args.__destroy_into_raw();
|
26968
26968
|
const ret3 = wasm$1.wdml_from_args(ptr0, ptr1, ptr2, ptr3);
|
26969
|
-
return
|
26969
|
+
return WDML.__wrap(ret3);
|
26970
26970
|
}
|
26971
26971
|
};
|
26972
26972
|
var WDMM = class {
|
@@ -27032,10 +27032,10 @@ spurious results.`);
|
|
27032
27032
|
return RegId.__wrap(ret3);
|
27033
27033
|
}
|
27034
27034
|
};
|
27035
|
-
var WDOP = class
|
27035
|
+
var WDOP = class {
|
27036
27036
|
static __wrap(ptr) {
|
27037
27037
|
ptr = ptr >>> 0;
|
27038
|
-
const obj = Object.create(
|
27038
|
+
const obj = Object.create(WDOP.prototype);
|
27039
27039
|
obj.__wbg_ptr = ptr;
|
27040
27040
|
return obj;
|
27041
27041
|
}
|
@@ -27118,7 +27118,7 @@ spurious results.`);
|
|
27118
27118
|
_assertClass(args, MathArgs);
|
27119
27119
|
var ptr3 = args.__destroy_into_raw();
|
27120
27120
|
const ret3 = wasm$1.wdop_from_args(ptr0, ptr1, ptr2, ptr3);
|
27121
|
-
return
|
27121
|
+
return WDOP.__wrap(ret3);
|
27122
27122
|
}
|
27123
27123
|
};
|
27124
27124
|
var WQAM = class {
|
@@ -27184,10 +27184,10 @@ spurious results.`);
|
|
27184
27184
|
return RegId.__wrap(ret3);
|
27185
27185
|
}
|
27186
27186
|
};
|
27187
|
-
var WQCM = class
|
27187
|
+
var WQCM = class {
|
27188
27188
|
static __wrap(ptr) {
|
27189
27189
|
ptr = ptr >>> 0;
|
27190
|
-
const obj = Object.create(
|
27190
|
+
const obj = Object.create(WQCM.prototype);
|
27191
27191
|
obj.__wbg_ptr = ptr;
|
27192
27192
|
return obj;
|
27193
27193
|
}
|
@@ -27270,13 +27270,13 @@ spurious results.`);
|
|
27270
27270
|
_assertClass(args, CompareArgs);
|
27271
27271
|
var ptr3 = args.__destroy_into_raw();
|
27272
27272
|
const ret3 = wasm$1.wdcm_from_args(ptr0, ptr1, ptr2, ptr3);
|
27273
|
-
return
|
27273
|
+
return WQCM.__wrap(ret3);
|
27274
27274
|
}
|
27275
27275
|
};
|
27276
|
-
var WQDV = class
|
27276
|
+
var WQDV = class {
|
27277
27277
|
static __wrap(ptr) {
|
27278
27278
|
ptr = ptr >>> 0;
|
27279
|
-
const obj = Object.create(
|
27279
|
+
const obj = Object.create(WQDV.prototype);
|
27280
27280
|
obj.__wbg_ptr = ptr;
|
27281
27281
|
return obj;
|
27282
27282
|
}
|
@@ -27359,7 +27359,7 @@ spurious results.`);
|
|
27359
27359
|
_assertClass(args, DivArgs);
|
27360
27360
|
var ptr3 = args.__destroy_into_raw();
|
27361
27361
|
const ret3 = wasm$1.wddv_from_args(ptr0, ptr1, ptr2, ptr3);
|
27362
|
-
return
|
27362
|
+
return WQDV.__wrap(ret3);
|
27363
27363
|
}
|
27364
27364
|
};
|
27365
27365
|
var WQMD = class {
|
@@ -27425,10 +27425,10 @@ spurious results.`);
|
|
27425
27425
|
return RegId.__wrap(ret3);
|
27426
27426
|
}
|
27427
27427
|
};
|
27428
|
-
var WQML = class
|
27428
|
+
var WQML = class {
|
27429
27429
|
static __wrap(ptr) {
|
27430
27430
|
ptr = ptr >>> 0;
|
27431
|
-
const obj = Object.create(
|
27431
|
+
const obj = Object.create(WQML.prototype);
|
27432
27432
|
obj.__wbg_ptr = ptr;
|
27433
27433
|
return obj;
|
27434
27434
|
}
|
@@ -27511,7 +27511,7 @@ spurious results.`);
|
|
27511
27511
|
_assertClass(args, MulArgs);
|
27512
27512
|
var ptr3 = args.__destroy_into_raw();
|
27513
27513
|
const ret3 = wasm$1.wdml_from_args(ptr0, ptr1, ptr2, ptr3);
|
27514
|
-
return
|
27514
|
+
return WQML.__wrap(ret3);
|
27515
27515
|
}
|
27516
27516
|
};
|
27517
27517
|
var WQMM = class {
|
@@ -27577,10 +27577,10 @@ spurious results.`);
|
|
27577
27577
|
return RegId.__wrap(ret3);
|
27578
27578
|
}
|
27579
27579
|
};
|
27580
|
-
var WQOP = class
|
27580
|
+
var WQOP = class {
|
27581
27581
|
static __wrap(ptr) {
|
27582
27582
|
ptr = ptr >>> 0;
|
27583
|
-
const obj = Object.create(
|
27583
|
+
const obj = Object.create(WQOP.prototype);
|
27584
27584
|
obj.__wbg_ptr = ptr;
|
27585
27585
|
return obj;
|
27586
27586
|
}
|
@@ -27663,7 +27663,7 @@ spurious results.`);
|
|
27663
27663
|
_assertClass(args, MathArgs);
|
27664
27664
|
var ptr3 = args.__destroy_into_raw();
|
27665
27665
|
const ret3 = wasm$1.wdop_from_args(ptr0, ptr1, ptr2, ptr3);
|
27666
|
-
return
|
27666
|
+
return WQOP.__wrap(ret3);
|
27667
27667
|
}
|
27668
27668
|
};
|
27669
27669
|
var XOR = class {
|
@@ -28114,7 +28114,6 @@ spurious results.`);
|
|
28114
28114
|
// ../../node_modules/.pnpm/async@2.6.4/node_modules/async/dist/async.js
|
28115
28115
|
var require_async2 = __commonJS({
|
28116
28116
|
"../../node_modules/.pnpm/async@2.6.4/node_modules/async/dist/async.js"(exports, module) {
|
28117
|
-
"use strict";
|
28118
28117
|
(function(global2, factory) {
|
28119
28118
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global2.async = global2.async || {});
|
28120
28119
|
})(exports, function(exports2) {
|
@@ -28310,7 +28309,7 @@ spurious results.`);
|
|
28310
28309
|
var objectProto$3 = Object.prototype;
|
28311
28310
|
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
|
28312
28311
|
var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
|
28313
|
-
var isArguments = baseIsArguments(
|
28312
|
+
var isArguments = baseIsArguments(function() {
|
28314
28313
|
return arguments;
|
28315
28314
|
}()) ? baseIsArguments : function(value) {
|
28316
28315
|
return isObjectLike2(value) && hasOwnProperty$2.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
@@ -30057,7 +30056,6 @@ spurious results.`);
|
|
30057
30056
|
// ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
|
30058
30057
|
var require_ms = __commonJS({
|
30059
30058
|
"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module) {
|
30060
|
-
"use strict";
|
30061
30059
|
var s = 1e3;
|
30062
30060
|
var m = s * 60;
|
30063
30061
|
var h = m * 60;
|
@@ -30643,7 +30641,6 @@ spurious results.`);
|
|
30643
30641
|
// ../../node_modules/.pnpm/mkdirp@0.5.6/node_modules/mkdirp/index.js
|
30644
30642
|
var require_mkdirp = __commonJS({
|
30645
30643
|
"../../node_modules/.pnpm/mkdirp@0.5.6/node_modules/mkdirp/index.js"(exports, module) {
|
30646
|
-
"use strict";
|
30647
30644
|
var path2 = __require("path");
|
30648
30645
|
var fs = __require("fs");
|
30649
30646
|
var _0777 = parseInt("0777", 8);
|
@@ -31797,7 +31794,7 @@ spurious results.`);
|
|
31797
31794
|
}
|
31798
31795
|
B.fill(0);
|
31799
31796
|
}
|
31800
|
-
var Keccak = class
|
31797
|
+
var Keccak = class extends Hash {
|
31801
31798
|
// NOTE: we accept arguments in bytes instead of bits here.
|
31802
31799
|
constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
|
31803
31800
|
super();
|
@@ -31888,7 +31885,7 @@ spurious results.`);
|
|
31888
31885
|
}
|
31889
31886
|
_cloneInto(to) {
|
31890
31887
|
const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
|
31891
|
-
to || (to = new
|
31888
|
+
to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
|
31892
31889
|
to.state32.set(this.state32);
|
31893
31890
|
to.pos = this.pos;
|
31894
31891
|
to.posOut = this.posOut;
|
@@ -31967,6 +31964,12 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
31967
31964
|
var versions = getBuiltinVersions();
|
31968
31965
|
|
31969
31966
|
// ../errors/dist/index.mjs
|
31967
|
+
var __defProp2 = Object.defineProperty;
|
31968
|
+
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
31969
|
+
var __publicField2 = (obj, key, value) => {
|
31970
|
+
__defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
31971
|
+
return value;
|
31972
|
+
};
|
31970
31973
|
var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
|
31971
31974
|
ErrorCode2["NO_ABIS_FOUND"] = "no-abis-found";
|
31972
31975
|
ErrorCode2["ABI_TYPES_AND_VALUES_MISMATCH"] = "abi-types-and-values-mismatch";
|
@@ -32045,8 +32048,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
32045
32048
|
ErrorCode2["STREAM_PARSING_ERROR"] = "stream-parsing-error";
|
32046
32049
|
return ErrorCode2;
|
32047
32050
|
})(ErrorCode || {});
|
32048
|
-
var
|
32049
|
-
static CODES = ErrorCode;
|
32051
|
+
var _FuelError = class extends Error {
|
32050
32052
|
VERSIONS = versions;
|
32051
32053
|
static parse(e) {
|
32052
32054
|
const error = e;
|
@@ -32077,8 +32079,16 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
32077
32079
|
return { code, name, message, VERSIONS };
|
32078
32080
|
}
|
32079
32081
|
};
|
32082
|
+
var FuelError = _FuelError;
|
32083
|
+
__publicField2(FuelError, "CODES", ErrorCode);
|
32080
32084
|
|
32081
32085
|
// ../utils/dist/index.mjs
|
32086
|
+
var __defProp3 = Object.defineProperty;
|
32087
|
+
var __defNormalProp3 = (obj, key, value) => key in obj ? __defProp3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
32088
|
+
var __publicField3 = (obj, key, value) => {
|
32089
|
+
__defNormalProp3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
32090
|
+
return value;
|
32091
|
+
};
|
32082
32092
|
var arrayify = (value) => {
|
32083
32093
|
if (value instanceof Uint8Array) {
|
32084
32094
|
return new Uint8Array(value);
|
@@ -32130,8 +32140,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
32130
32140
|
var tai64ToUnixSeconds = (tai64) => Number(BigInt(tai64) - TAI64_UNIX_OFFSET);
|
32131
32141
|
var unixSecondsToTai64 = (unixSeconds) => String(BigInt(unixSeconds) + TAI64_UNIX_OFFSET);
|
32132
32142
|
var tai64ToUnixMilliseconds = (tai64) => secondsToMs(tai64ToUnixSeconds(tai64));
|
32133
|
-
var
|
32134
|
-
static TAI64_NULL = "";
|
32143
|
+
var _DateTime = class extends Date {
|
32135
32144
|
/**
|
32136
32145
|
* Generates a new DateTime instance from a Tai64 timestamp.
|
32137
32146
|
*
|
@@ -32182,6 +32191,8 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
32182
32191
|
return msToSeconds(this.getTime());
|
32183
32192
|
}
|
32184
32193
|
};
|
32194
|
+
var DateTime = _DateTime;
|
32195
|
+
__publicField3(DateTime, "TAI64_NULL", "");
|
32185
32196
|
var chainConfig_default = {
|
32186
32197
|
chain_name: "local_testnet",
|
32187
32198
|
block_gas_limit: 5e9,
|
@@ -32699,6 +32710,13 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
32699
32710
|
};
|
32700
32711
|
var defaultChainConfig = chainConfig_default;
|
32701
32712
|
var defaultConsensusKey = "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298";
|
32713
|
+
function sleep(time) {
|
32714
|
+
return new Promise((resolve) => {
|
32715
|
+
setTimeout(() => {
|
32716
|
+
resolve(true);
|
32717
|
+
}, time);
|
32718
|
+
});
|
32719
|
+
}
|
32702
32720
|
|
32703
32721
|
// ../crypto/dist/index.mjs
|
32704
32722
|
var import_crypto8 = __toESM(__require("crypto"), 1);
|
@@ -33412,7 +33430,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
33412
33430
|
}
|
33413
33431
|
B.fill(0);
|
33414
33432
|
}
|
33415
|
-
var Keccak2 = class
|
33433
|
+
var Keccak2 = class extends Hash2 {
|
33416
33434
|
// NOTE: we accept arguments in bytes instead of bits here.
|
33417
33435
|
constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
|
33418
33436
|
super();
|
@@ -33503,7 +33521,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
33503
33521
|
}
|
33504
33522
|
_cloneInto(to) {
|
33505
33523
|
const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
|
33506
|
-
to || (to = new
|
33524
|
+
to || (to = new Keccak2(blockLen, suffix, outputLen, enableXOF, rounds));
|
33507
33525
|
to.state32.set(this.state32);
|
33508
33526
|
to.pos = this.pos;
|
33509
33527
|
to.posOut = this.posOut;
|
@@ -33891,7 +33909,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
33891
33909
|
|
33892
33910
|
// ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/providers/plugins-network.js
|
33893
33911
|
var EnsAddress = "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
33894
|
-
var NetworkPlugin = class
|
33912
|
+
var NetworkPlugin = class {
|
33895
33913
|
/**
|
33896
33914
|
* The name of the plugin.
|
33897
33915
|
*
|
@@ -33909,10 +33927,10 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
33909
33927
|
* Creates a copy of this plugin.
|
33910
33928
|
*/
|
33911
33929
|
clone() {
|
33912
|
-
return new
|
33930
|
+
return new NetworkPlugin(this.name);
|
33913
33931
|
}
|
33914
33932
|
};
|
33915
|
-
var GasCostPlugin = class
|
33933
|
+
var GasCostPlugin = class extends NetworkPlugin {
|
33916
33934
|
/**
|
33917
33935
|
* The block number to treat these values as valid from.
|
33918
33936
|
*
|
@@ -33972,10 +33990,10 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
33972
33990
|
defineProperties(this, props);
|
33973
33991
|
}
|
33974
33992
|
clone() {
|
33975
|
-
return new
|
33993
|
+
return new GasCostPlugin(this.effectiveBlock, this);
|
33976
33994
|
}
|
33977
33995
|
};
|
33978
|
-
var EnsPlugin = class
|
33996
|
+
var EnsPlugin = class extends NetworkPlugin {
|
33979
33997
|
/**
|
33980
33998
|
* The ENS Registrty Contract address.
|
33981
33999
|
*/
|
@@ -33997,7 +34015,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
33997
34015
|
});
|
33998
34016
|
}
|
33999
34017
|
clone() {
|
34000
|
-
return new
|
34018
|
+
return new EnsPlugin(this.address, this.targetNetwork);
|
34001
34019
|
}
|
34002
34020
|
};
|
34003
34021
|
var FetchUrlFeeDataNetworkPlugin = class extends NetworkPlugin {
|
@@ -34032,7 +34050,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34032
34050
|
|
34033
34051
|
// ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/providers/network.js
|
34034
34052
|
var Networks = /* @__PURE__ */ new Map();
|
34035
|
-
var Network = class
|
34053
|
+
var Network = class {
|
34036
34054
|
#name;
|
34037
34055
|
#chainId;
|
34038
34056
|
#plugins;
|
@@ -34147,7 +34165,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34147
34165
|
* Create a copy of this Network.
|
34148
34166
|
*/
|
34149
34167
|
clone() {
|
34150
|
-
const clone4 = new
|
34168
|
+
const clone4 = new Network(this.name, this.chainId);
|
34151
34169
|
this.plugins.forEach((plugin) => {
|
34152
34170
|
clone4.attachPlugin(plugin.clone());
|
34153
34171
|
});
|
@@ -34188,7 +34206,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34188
34206
|
static from(network) {
|
34189
34207
|
injectCommonNetworks();
|
34190
34208
|
if (network == null) {
|
34191
|
-
return
|
34209
|
+
return Network.from("mainnet");
|
34192
34210
|
}
|
34193
34211
|
if (typeof network === "number") {
|
34194
34212
|
network = BigInt(network);
|
@@ -34199,7 +34217,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34199
34217
|
return networkFunc();
|
34200
34218
|
}
|
34201
34219
|
if (typeof network === "bigint") {
|
34202
|
-
return new
|
34220
|
+
return new Network("unknown", network);
|
34203
34221
|
}
|
34204
34222
|
assertArgument(false, "unknown network", "network", network);
|
34205
34223
|
}
|
@@ -34209,7 +34227,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34209
34227
|
}
|
34210
34228
|
if (typeof network === "object") {
|
34211
34229
|
assertArgument(typeof network.name === "string" && typeof network.chainId === "number", "invalid network object name or chainId", "network", network);
|
34212
|
-
const custom = new
|
34230
|
+
const custom = new Network(network.name, network.chainId);
|
34213
34231
|
if (network.ensAddress || network.ensNetwork != null) {
|
34214
34232
|
custom.attachPlugin(new EnsPlugin(network.ensAddress, network.ensNetwork));
|
34215
34233
|
}
|
@@ -34545,7 +34563,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34545
34563
|
}
|
34546
34564
|
return address.replace("0x", "0x000000000000000000000000");
|
34547
34565
|
};
|
34548
|
-
var Address = class
|
34566
|
+
var Address = class extends AbstractAddress {
|
34549
34567
|
// #region address-2
|
34550
34568
|
bech32Address;
|
34551
34569
|
// #endregion address-2
|
@@ -34659,7 +34677,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34659
34677
|
throw new FuelError(FuelError.CODES.INVALID_PUBLIC_KEY, `Invalid Public Key: ${publicKey}.`);
|
34660
34678
|
}
|
34661
34679
|
const b256Address = hexlify(sha256(arrayify(publicKey)));
|
34662
|
-
return new
|
34680
|
+
return new Address(toBech32(b256Address));
|
34663
34681
|
}
|
34664
34682
|
/**
|
34665
34683
|
* Takes a B256 Address and creates an `Address`
|
@@ -34674,7 +34692,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34674
34692
|
`Invalid B256 Address: ${b256Address}.`
|
34675
34693
|
);
|
34676
34694
|
}
|
34677
|
-
return new
|
34695
|
+
return new Address(toBech32(b256Address));
|
34678
34696
|
}
|
34679
34697
|
/**
|
34680
34698
|
* Creates an `Address` with a randomized `bech32Address` property
|
@@ -34691,7 +34709,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34691
34709
|
* @returns A new `Address` instance
|
34692
34710
|
*/
|
34693
34711
|
static fromString(address) {
|
34694
|
-
return isBech32(address) ? new
|
34712
|
+
return isBech32(address) ? new Address(address) : this.fromB256(address);
|
34695
34713
|
}
|
34696
34714
|
/**
|
34697
34715
|
* Takes an ambiguous string or address and creates an `Address`
|
@@ -34710,19 +34728,19 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34710
34728
|
*/
|
34711
34729
|
static fromDynamicInput(address) {
|
34712
34730
|
if (typeof address !== "string" && "toB256" in address) {
|
34713
|
-
return
|
34731
|
+
return Address.fromB256(address.toB256());
|
34714
34732
|
}
|
34715
34733
|
if (isPublicKey(address)) {
|
34716
|
-
return
|
34734
|
+
return Address.fromPublicKey(address);
|
34717
34735
|
}
|
34718
34736
|
if (isBech32(address)) {
|
34719
|
-
return new
|
34737
|
+
return new Address(address);
|
34720
34738
|
}
|
34721
34739
|
if (isB256(address)) {
|
34722
|
-
return
|
34740
|
+
return Address.fromB256(address);
|
34723
34741
|
}
|
34724
34742
|
if (isEvmAddress(address)) {
|
34725
|
-
return
|
34743
|
+
return Address.fromEvmAddress(address);
|
34726
34744
|
}
|
34727
34745
|
throw new FuelError(
|
34728
34746
|
FuelError.CODES.PARSE_FAILED,
|
@@ -34742,7 +34760,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34742
34760
|
);
|
34743
34761
|
}
|
34744
34762
|
const paddedAddress = padFirst12BytesOfEvmAddress(evmAddress);
|
34745
|
-
return new
|
34763
|
+
return new Address(toBech32(paddedAddress));
|
34746
34764
|
}
|
34747
34765
|
};
|
34748
34766
|
|
@@ -34770,12 +34788,12 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34770
34788
|
const decimalPortion = decimals ? `.${decimals}` : "";
|
34771
34789
|
return `${units}${decimalPortion}`;
|
34772
34790
|
}
|
34773
|
-
var BN = class
|
34791
|
+
var BN = class extends import_bn.default {
|
34774
34792
|
MAX_U64 = "0xFFFFFFFFFFFFFFFF";
|
34775
34793
|
constructor(value, base, endian) {
|
34776
34794
|
let bnValue = value;
|
34777
34795
|
let bnBase = base;
|
34778
|
-
if (
|
34796
|
+
if (BN.isBN(value)) {
|
34779
34797
|
bnValue = value.toArray();
|
34780
34798
|
} else if (typeof value === "string" && value.slice(0, 2) === "0x") {
|
34781
34799
|
bnValue = value.substring(2);
|
@@ -34888,26 +34906,26 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34888
34906
|
// END ANCHOR: OVERRIDES to accept better inputs
|
34889
34907
|
// ANCHOR: OVERRIDES to output our BN type
|
34890
34908
|
sqr() {
|
34891
|
-
return new
|
34909
|
+
return new BN(super.sqr().toArray());
|
34892
34910
|
}
|
34893
34911
|
neg() {
|
34894
|
-
return new
|
34912
|
+
return new BN(super.neg().toArray());
|
34895
34913
|
}
|
34896
34914
|
abs() {
|
34897
|
-
return new
|
34915
|
+
return new BN(super.abs().toArray());
|
34898
34916
|
}
|
34899
34917
|
toTwos(width) {
|
34900
|
-
return new
|
34918
|
+
return new BN(super.toTwos(width).toArray());
|
34901
34919
|
}
|
34902
34920
|
fromTwos(width) {
|
34903
|
-
return new
|
34921
|
+
return new BN(super.fromTwos(width).toArray());
|
34904
34922
|
}
|
34905
34923
|
// END ANCHOR: OVERRIDES to output our BN type
|
34906
34924
|
// ANCHOR: OVERRIDES to avoid losing references
|
34907
34925
|
caller(v, methodName) {
|
34908
|
-
const output3 = super[methodName](new
|
34909
|
-
if (
|
34910
|
-
return new
|
34926
|
+
const output3 = super[methodName](new BN(v));
|
34927
|
+
if (BN.isBN(output3)) {
|
34928
|
+
return new BN(output3.toArray());
|
34911
34929
|
}
|
34912
34930
|
if (typeof output3 === "boolean") {
|
34913
34931
|
return output3;
|
@@ -34915,32 +34933,32 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34915
34933
|
return output3;
|
34916
34934
|
}
|
34917
34935
|
clone() {
|
34918
|
-
return new
|
34936
|
+
return new BN(this.toArray());
|
34919
34937
|
}
|
34920
34938
|
mulTo(num, out) {
|
34921
34939
|
const output3 = new import_bn.default(this.toArray()).mulTo(num, out);
|
34922
|
-
return new
|
34940
|
+
return new BN(output3.toArray());
|
34923
34941
|
}
|
34924
34942
|
egcd(p) {
|
34925
34943
|
const { a, b, gcd } = new import_bn.default(this.toArray()).egcd(p);
|
34926
34944
|
return {
|
34927
|
-
a: new
|
34928
|
-
b: new
|
34929
|
-
gcd: new
|
34945
|
+
a: new BN(a.toArray()),
|
34946
|
+
b: new BN(b.toArray()),
|
34947
|
+
gcd: new BN(gcd.toArray())
|
34930
34948
|
};
|
34931
34949
|
}
|
34932
34950
|
divmod(num, mode, positive) {
|
34933
|
-
const { div, mod: mod2 } = new import_bn.default(this.toArray()).divmod(new
|
34951
|
+
const { div, mod: mod2 } = new import_bn.default(this.toArray()).divmod(new BN(num), mode, positive);
|
34934
34952
|
return {
|
34935
|
-
div: new
|
34936
|
-
mod: new
|
34953
|
+
div: new BN(div?.toArray()),
|
34954
|
+
mod: new BN(mod2?.toArray())
|
34937
34955
|
};
|
34938
34956
|
}
|
34939
34957
|
maxU64() {
|
34940
|
-
return this.gte(this.MAX_U64) ? new
|
34958
|
+
return this.gte(this.MAX_U64) ? new BN(this.MAX_U64) : this;
|
34941
34959
|
}
|
34942
34960
|
normalizeZeroToOne() {
|
34943
|
-
return this.isZero() ? new
|
34961
|
+
return this.isZero() ? new BN(1) : this;
|
34944
34962
|
}
|
34945
34963
|
// END ANCHOR: OVERRIDES to avoid losing references
|
34946
34964
|
};
|
@@ -35007,6 +35025,25 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35007
35025
|
};
|
35008
35026
|
|
35009
35027
|
// ../abi-coder/dist/index.mjs
|
35028
|
+
var __defProp4 = Object.defineProperty;
|
35029
|
+
var __defNormalProp4 = (obj, key, value) => key in obj ? __defProp4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
35030
|
+
var __publicField4 = (obj, key, value) => {
|
35031
|
+
__defNormalProp4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
35032
|
+
return value;
|
35033
|
+
};
|
35034
|
+
var __accessCheck2 = (obj, member, msg) => {
|
35035
|
+
if (!member.has(obj))
|
35036
|
+
throw TypeError("Cannot " + msg);
|
35037
|
+
};
|
35038
|
+
var __privateAdd2 = (obj, member, value) => {
|
35039
|
+
if (member.has(obj))
|
35040
|
+
throw TypeError("Cannot add the same private member more than once");
|
35041
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
35042
|
+
};
|
35043
|
+
var __privateMethod2 = (obj, member, method) => {
|
35044
|
+
__accessCheck2(obj, member, "access private method");
|
35045
|
+
return method;
|
35046
|
+
};
|
35010
35047
|
var Coder = class {
|
35011
35048
|
name;
|
35012
35049
|
type;
|
@@ -35345,10 +35382,12 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35345
35382
|
return [true, offset + this.paddingLength];
|
35346
35383
|
}
|
35347
35384
|
};
|
35385
|
+
var _getPaddedData;
|
35386
|
+
var getPaddedData_fn;
|
35348
35387
|
var ByteCoder = class extends Coder {
|
35349
|
-
static memorySize = 1;
|
35350
35388
|
constructor() {
|
35351
35389
|
super("struct", "struct Bytes", BASE_VECTOR_OFFSET);
|
35390
|
+
__privateAdd2(this, _getPaddedData);
|
35352
35391
|
}
|
35353
35392
|
encode(value) {
|
35354
35393
|
if (!Array.isArray(value)) {
|
@@ -35356,7 +35395,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35356
35395
|
}
|
35357
35396
|
const parts = [];
|
35358
35397
|
const pointer = new BigNumberCoder("u64").encode(BASE_VECTOR_OFFSET);
|
35359
|
-
const data = this
|
35398
|
+
const data = __privateMethod2(this, _getPaddedData, getPaddedData_fn).call(this, value);
|
35360
35399
|
pointer.dynamicData = {
|
35361
35400
|
0: concatWithDynamicData([data])
|
35362
35401
|
};
|
@@ -35365,14 +35404,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35365
35404
|
parts.push(new BigNumberCoder("u64").encode(value.length));
|
35366
35405
|
return concatWithDynamicData(parts);
|
35367
35406
|
}
|
35368
|
-
#getPaddedData(value) {
|
35369
|
-
const data = [Uint8Array.from(value)];
|
35370
|
-
const paddingLength = (WORD_SIZE - value.length % WORD_SIZE) % WORD_SIZE;
|
35371
|
-
if (paddingLength) {
|
35372
|
-
data.push(new Uint8Array(paddingLength));
|
35373
|
-
}
|
35374
|
-
return concat(data);
|
35375
|
-
}
|
35376
35407
|
decode(data, offset) {
|
35377
35408
|
if (data.length < BASE_VECTOR_OFFSET) {
|
35378
35409
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid byte data size.`);
|
@@ -35386,6 +35417,16 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35386
35417
|
return [byteData, offset + BASE_VECTOR_OFFSET];
|
35387
35418
|
}
|
35388
35419
|
};
|
35420
|
+
_getPaddedData = /* @__PURE__ */ new WeakSet();
|
35421
|
+
getPaddedData_fn = function(value) {
|
35422
|
+
const data = [Uint8Array.from(value)];
|
35423
|
+
const paddingLength = (WORD_SIZE - value.length % WORD_SIZE) % WORD_SIZE;
|
35424
|
+
if (paddingLength) {
|
35425
|
+
data.push(new Uint8Array(paddingLength));
|
35426
|
+
}
|
35427
|
+
return concat(data);
|
35428
|
+
};
|
35429
|
+
__publicField4(ByteCoder, "memorySize", 1);
|
35389
35430
|
var isFullyNativeEnum = (enumCoders) => Object.values(enumCoders).every(
|
35390
35431
|
// @ts-expect-error complicated types
|
35391
35432
|
({ type: type3, coders }) => type3 === "()" && JSON.stringify(coders) === JSON.stringify([])
|
@@ -35584,15 +35625,17 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35584
35625
|
return [decodedValue, offset + dataBytes.length];
|
35585
35626
|
}
|
35586
35627
|
};
|
35628
|
+
var _getPaddedData2;
|
35629
|
+
var getPaddedData_fn2;
|
35587
35630
|
var StdStringCoder = class extends Coder {
|
35588
|
-
static memorySize = 1;
|
35589
35631
|
constructor() {
|
35590
35632
|
super("struct", "struct String", 1);
|
35633
|
+
__privateAdd2(this, _getPaddedData2);
|
35591
35634
|
}
|
35592
35635
|
encode(value) {
|
35593
35636
|
const parts = [];
|
35594
35637
|
const pointer = new BigNumberCoder("u64").encode(BASE_VECTOR_OFFSET);
|
35595
|
-
const data = this
|
35638
|
+
const data = __privateMethod2(this, _getPaddedData2, getPaddedData_fn2).call(this, value);
|
35596
35639
|
pointer.dynamicData = {
|
35597
35640
|
0: concatWithDynamicData([data])
|
35598
35641
|
};
|
@@ -35601,14 +35644,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35601
35644
|
parts.push(new BigNumberCoder("u64").encode(value.length));
|
35602
35645
|
return concatWithDynamicData(parts);
|
35603
35646
|
}
|
35604
|
-
#getPaddedData(value) {
|
35605
|
-
const data = [toUtf8Bytes(value)];
|
35606
|
-
const paddingLength = (WORD_SIZE - value.length % WORD_SIZE) % WORD_SIZE;
|
35607
|
-
if (paddingLength) {
|
35608
|
-
data.push(new Uint8Array(paddingLength));
|
35609
|
-
}
|
35610
|
-
return concat(data);
|
35611
|
-
}
|
35612
35647
|
decode(data, offset) {
|
35613
35648
|
if (data.length < this.encodedLength) {
|
35614
35649
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid std string data size.`);
|
@@ -35623,6 +35658,16 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35623
35658
|
return [value, offset + BASE_VECTOR_OFFSET];
|
35624
35659
|
}
|
35625
35660
|
};
|
35661
|
+
_getPaddedData2 = /* @__PURE__ */ new WeakSet();
|
35662
|
+
getPaddedData_fn2 = function(value) {
|
35663
|
+
const data = [toUtf8Bytes(value)];
|
35664
|
+
const paddingLength = (WORD_SIZE - value.length % WORD_SIZE) % WORD_SIZE;
|
35665
|
+
if (paddingLength) {
|
35666
|
+
data.push(new Uint8Array(paddingLength));
|
35667
|
+
}
|
35668
|
+
return concat(data);
|
35669
|
+
};
|
35670
|
+
__publicField4(StdStringCoder, "memorySize", 1);
|
35626
35671
|
var StringCoder = class extends Coder {
|
35627
35672
|
length;
|
35628
35673
|
#paddingLength;
|
@@ -35778,7 +35823,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35778
35823
|
];
|
35779
35824
|
}
|
35780
35825
|
};
|
35781
|
-
var ResolvedAbiType = class
|
35826
|
+
var ResolvedAbiType = class {
|
35782
35827
|
abi;
|
35783
35828
|
name;
|
35784
35829
|
type;
|
@@ -35802,11 +35847,11 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35802
35847
|
this.name = argument.name;
|
35803
35848
|
this.type = type3.type;
|
35804
35849
|
this.originalTypeArguments = argument.typeArguments;
|
35805
|
-
this.components =
|
35850
|
+
this.components = ResolvedAbiType.getResolvedGenericComponents(
|
35806
35851
|
abi,
|
35807
35852
|
argument,
|
35808
35853
|
type3.components,
|
35809
|
-
type3.typeParameters ??
|
35854
|
+
type3.typeParameters ?? ResolvedAbiType.getImplicitGenericTypeParameters(abi, type3.components)
|
35810
35855
|
);
|
35811
35856
|
}
|
35812
35857
|
static getResolvedGenericComponents(abi, arg, components, typeParameters) {
|
@@ -35814,7 +35859,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35814
35859
|
return null;
|
35815
35860
|
}
|
35816
35861
|
if (typeParameters === null || typeParameters.length === 0) {
|
35817
|
-
return components.map((c) => new
|
35862
|
+
return components.map((c) => new ResolvedAbiType(abi, c));
|
35818
35863
|
}
|
35819
35864
|
const typeParametersAndArgsMap = typeParameters.reduce(
|
35820
35865
|
(obj, typeParameter, typeParameterIndex) => {
|
@@ -35831,7 +35876,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35831
35876
|
components,
|
35832
35877
|
typeParametersAndArgsMap
|
35833
35878
|
);
|
35834
|
-
return resolvedComponents.map((c) => new
|
35879
|
+
return resolvedComponents.map((c) => new ResolvedAbiType(abi, c));
|
35835
35880
|
}
|
35836
35881
|
static resolveGenericArgTypes(abi, args, typeParametersAndArgsMap) {
|
35837
35882
|
return args.map((arg) => {
|
@@ -35918,7 +35963,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35918
35963
|
if (arrayMatch) {
|
35919
35964
|
return `[${this.components[0].getSignature()};${arrayMatch.length}]`;
|
35920
35965
|
}
|
35921
|
-
const typeArgumentsSignature = this.originalTypeArguments !== null ? `<${this.originalTypeArguments.map((a) => new
|
35966
|
+
const typeArgumentsSignature = this.originalTypeArguments !== null ? `<${this.originalTypeArguments.map((a) => new ResolvedAbiType(this.abi, a).getSignature()).join(",")}>` : "";
|
35922
35967
|
const componentsSignature = `(${this.components.map((c) => c.getSignature()).join(",")})`;
|
35923
35968
|
return `${typeArgumentsSignature}${componentsSignature}`;
|
35924
35969
|
}
|
@@ -36046,7 +36091,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36046
36091
|
}
|
36047
36092
|
};
|
36048
36093
|
var ByteCoder2 = class extends Coder {
|
36049
|
-
static memorySize = 1;
|
36050
36094
|
constructor() {
|
36051
36095
|
super("struct", "struct Bytes", WORD_SIZE);
|
36052
36096
|
}
|
@@ -36072,6 +36116,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36072
36116
|
return [dataBytes, offsetAndLength + length];
|
36073
36117
|
}
|
36074
36118
|
};
|
36119
|
+
__publicField4(ByteCoder2, "memorySize", 1);
|
36075
36120
|
var isFullyNativeEnum2 = (enumCoders) => Object.values(enumCoders).every(
|
36076
36121
|
// @ts-expect-error complicated types
|
36077
36122
|
({ type: type3, coders }) => type3 === "()" && JSON.stringify(coders) === JSON.stringify([])
|
@@ -36215,7 +36260,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36215
36260
|
}
|
36216
36261
|
};
|
36217
36262
|
var StdStringCoder2 = class extends Coder {
|
36218
|
-
static memorySize = 1;
|
36219
36263
|
constructor() {
|
36220
36264
|
super("struct", "struct String", WORD_SIZE);
|
36221
36265
|
}
|
@@ -36238,6 +36282,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36238
36282
|
return [toUtf8String(dataBytes), offsetAndLength + length];
|
36239
36283
|
}
|
36240
36284
|
};
|
36285
|
+
__publicField4(StdStringCoder2, "memorySize", 1);
|
36241
36286
|
var StringCoder2 = class extends Coder {
|
36242
36287
|
constructor(length) {
|
36243
36288
|
super("string", `str[${length}]`, length);
|
@@ -36477,7 +36522,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36477
36522
|
return this.getCoder(abi, argument, options).decode(data, offset);
|
36478
36523
|
}
|
36479
36524
|
};
|
36480
|
-
var FunctionFragment = class
|
36525
|
+
var FunctionFragment = class {
|
36481
36526
|
signature;
|
36482
36527
|
selector;
|
36483
36528
|
name;
|
@@ -36490,8 +36535,8 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36490
36535
|
this.jsonAbi = jsonAbi;
|
36491
36536
|
this.jsonFn = findOrThrow(this.jsonAbi.functions, (f2) => f2.name === name);
|
36492
36537
|
this.name = name;
|
36493
|
-
this.signature =
|
36494
|
-
this.selector =
|
36538
|
+
this.signature = FunctionFragment.getSignature(this.jsonAbi, this.jsonFn);
|
36539
|
+
this.selector = FunctionFragment.getFunctionSelector(this.signature);
|
36495
36540
|
this.isInputDataPointer = this.#isInputDataPointer();
|
36496
36541
|
this.outputMetadata = {
|
36497
36542
|
isHeapType: this.#isOutputDataHeap(),
|
@@ -36534,7 +36579,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36534
36579
|
}
|
36535
36580
|
}
|
36536
36581
|
encodeArguments(values, offset = 0) {
|
36537
|
-
|
36582
|
+
FunctionFragment.verifyArgsAndInputsAlign(values, this.jsonFn.inputs, this.jsonAbi);
|
36538
36583
|
const shallowCopyValues = values.slice();
|
36539
36584
|
const nonEmptyInputs = this.jsonFn.inputs.filter(
|
36540
36585
|
(x) => findOrThrow(this.jsonAbi.types, (t) => t.typeId === x.type).type !== "()"
|
@@ -36885,7 +36930,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36885
36930
|
];
|
36886
36931
|
}
|
36887
36932
|
};
|
36888
|
-
var InputMessageCoder = class
|
36933
|
+
var InputMessageCoder = class extends Coder {
|
36889
36934
|
constructor() {
|
36890
36935
|
super("InputMessage", "struct InputMessage", 0);
|
36891
36936
|
}
|
@@ -36905,7 +36950,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36905
36950
|
}
|
36906
36951
|
encode(value) {
|
36907
36952
|
const parts = [];
|
36908
|
-
const data =
|
36953
|
+
const data = InputMessageCoder.encodeData(value.data);
|
36909
36954
|
parts.push(new ByteArrayCoder(32).encode(value.sender));
|
36910
36955
|
parts.push(new ByteArrayCoder(32).encode(value.recipient));
|
36911
36956
|
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
@@ -37349,7 +37394,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37349
37394
|
ReceiptType2[ReceiptType2["Burn"] = 12] = "Burn";
|
37350
37395
|
return ReceiptType2;
|
37351
37396
|
})(ReceiptType || {});
|
37352
|
-
var ReceiptMessageOutCoder = class
|
37397
|
+
var ReceiptMessageOutCoder = class extends Coder {
|
37353
37398
|
constructor() {
|
37354
37399
|
super("ReceiptMessageOut", "struct ReceiptMessageOut", 0);
|
37355
37400
|
}
|
@@ -37400,7 +37445,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37400
37445
|
digest,
|
37401
37446
|
data: messageData
|
37402
37447
|
};
|
37403
|
-
receiptMessageOut.messageId =
|
37448
|
+
receiptMessageOut.messageId = ReceiptMessageOutCoder.getMessageId(receiptMessageOut);
|
37404
37449
|
return [receiptMessageOut, o];
|
37405
37450
|
}
|
37406
37451
|
};
|
@@ -37409,7 +37454,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37409
37454
|
const subIdBytes = arrayify(subId);
|
37410
37455
|
return sha2563(concat([contractIdBytes, subIdBytes]));
|
37411
37456
|
};
|
37412
|
-
var ReceiptMintCoder = class
|
37457
|
+
var ReceiptMintCoder = class extends Coder {
|
37413
37458
|
constructor() {
|
37414
37459
|
super("ReceiptMint", "struct ReceiptMint", 0);
|
37415
37460
|
}
|
@@ -37438,7 +37483,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37438
37483
|
const pc = decoded;
|
37439
37484
|
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37440
37485
|
const is = decoded;
|
37441
|
-
const assetId =
|
37486
|
+
const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
|
37442
37487
|
const receiptMint = {
|
37443
37488
|
type: 11,
|
37444
37489
|
subId,
|
@@ -38042,11 +38087,72 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38042
38087
|
};
|
38043
38088
|
}
|
38044
38089
|
|
38090
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry2.js
|
38091
|
+
function _curry2(fn) {
|
38092
|
+
return function f2(a, b) {
|
38093
|
+
switch (arguments.length) {
|
38094
|
+
case 0:
|
38095
|
+
return f2;
|
38096
|
+
case 1:
|
38097
|
+
return _isPlaceholder(a) ? f2 : _curry1(function(_b) {
|
38098
|
+
return fn(a, _b);
|
38099
|
+
});
|
38100
|
+
default:
|
38101
|
+
return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function(_a) {
|
38102
|
+
return fn(_a, b);
|
38103
|
+
}) : _isPlaceholder(b) ? _curry1(function(_b) {
|
38104
|
+
return fn(a, _b);
|
38105
|
+
}) : fn(a, b);
|
38106
|
+
}
|
38107
|
+
};
|
38108
|
+
}
|
38109
|
+
|
38110
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry3.js
|
38111
|
+
function _curry3(fn) {
|
38112
|
+
return function f3(a, b, c) {
|
38113
|
+
switch (arguments.length) {
|
38114
|
+
case 0:
|
38115
|
+
return f3;
|
38116
|
+
case 1:
|
38117
|
+
return _isPlaceholder(a) ? f3 : _curry2(function(_b, _c) {
|
38118
|
+
return fn(a, _b, _c);
|
38119
|
+
});
|
38120
|
+
case 2:
|
38121
|
+
return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function(_a, _c) {
|
38122
|
+
return fn(_a, b, _c);
|
38123
|
+
}) : _isPlaceholder(b) ? _curry2(function(_b, _c) {
|
38124
|
+
return fn(a, _b, _c);
|
38125
|
+
}) : _curry1(function(_c) {
|
38126
|
+
return fn(a, b, _c);
|
38127
|
+
});
|
38128
|
+
default:
|
38129
|
+
return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function(_a, _b) {
|
38130
|
+
return fn(_a, _b, c);
|
38131
|
+
}) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function(_a, _c) {
|
38132
|
+
return fn(_a, b, _c);
|
38133
|
+
}) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function(_b, _c) {
|
38134
|
+
return fn(a, _b, _c);
|
38135
|
+
}) : _isPlaceholder(a) ? _curry1(function(_a) {
|
38136
|
+
return fn(_a, b, c);
|
38137
|
+
}) : _isPlaceholder(b) ? _curry1(function(_b) {
|
38138
|
+
return fn(a, _b, c);
|
38139
|
+
}) : _isPlaceholder(c) ? _curry1(function(_c) {
|
38140
|
+
return fn(a, b, _c);
|
38141
|
+
}) : fn(a, b, c);
|
38142
|
+
}
|
38143
|
+
};
|
38144
|
+
}
|
38145
|
+
|
38045
38146
|
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
|
38046
38147
|
var isArray_default = Array.isArray || function _isArray(val) {
|
38047
38148
|
return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
|
38048
38149
|
};
|
38049
38150
|
|
38151
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_has.js
|
38152
|
+
function _has(prop, obj) {
|
38153
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
38154
|
+
}
|
38155
|
+
|
38050
38156
|
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
|
38051
38157
|
var type = /* @__PURE__ */ _curry1(function type2(val) {
|
38052
38158
|
return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
|
@@ -38063,6 +38169,11 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38063
38169
|
return d.getUTCFullYear() + "-" + pad(d.getUTCMonth() + 1) + "-" + pad(d.getUTCDate()) + "T" + pad(d.getUTCHours()) + ":" + pad(d.getUTCMinutes()) + ":" + pad(d.getUTCSeconds()) + "." + (d.getUTCMilliseconds() / 1e3).toFixed(3).slice(2, 5) + "Z";
|
38064
38170
|
};
|
38065
38171
|
|
38172
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isObject.js
|
38173
|
+
function _isObject(x) {
|
38174
|
+
return Object.prototype.toString.call(x) === "[object Object]";
|
38175
|
+
}
|
38176
|
+
|
38066
38177
|
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
|
38067
38178
|
var isInteger_default = Number.isInteger || function _isInteger(n) {
|
38068
38179
|
return n << 0 === n;
|
@@ -38176,6 +38287,46 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38176
38287
|
});
|
38177
38288
|
var clone_default = clone2;
|
38178
38289
|
|
38290
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/mergeWithKey.js
|
38291
|
+
var mergeWithKey = /* @__PURE__ */ _curry3(function mergeWithKey2(fn, l, r) {
|
38292
|
+
var result = {};
|
38293
|
+
var k;
|
38294
|
+
l = l || {};
|
38295
|
+
r = r || {};
|
38296
|
+
for (k in l) {
|
38297
|
+
if (_has(k, l)) {
|
38298
|
+
result[k] = _has(k, r) ? fn(k, l[k], r[k]) : l[k];
|
38299
|
+
}
|
38300
|
+
}
|
38301
|
+
for (k in r) {
|
38302
|
+
if (_has(k, r) && !_has(k, result)) {
|
38303
|
+
result[k] = r[k];
|
38304
|
+
}
|
38305
|
+
}
|
38306
|
+
return result;
|
38307
|
+
});
|
38308
|
+
var mergeWithKey_default = mergeWithKey;
|
38309
|
+
|
38310
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/mergeDeepWithKey.js
|
38311
|
+
var mergeDeepWithKey = /* @__PURE__ */ _curry3(function mergeDeepWithKey2(fn, lObj, rObj) {
|
38312
|
+
return mergeWithKey_default(function(k, lVal, rVal) {
|
38313
|
+
if (_isObject(lVal) && _isObject(rVal)) {
|
38314
|
+
return mergeDeepWithKey2(fn, lVal, rVal);
|
38315
|
+
} else {
|
38316
|
+
return fn(k, lVal, rVal);
|
38317
|
+
}
|
38318
|
+
}, lObj, rObj);
|
38319
|
+
});
|
38320
|
+
var mergeDeepWithKey_default = mergeDeepWithKey;
|
38321
|
+
|
38322
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/mergeDeepRight.js
|
38323
|
+
var mergeDeepRight = /* @__PURE__ */ _curry2(function mergeDeepRight2(lObj, rObj) {
|
38324
|
+
return mergeDeepWithKey_default(function(k, lVal, rVal) {
|
38325
|
+
return rVal;
|
38326
|
+
}, lObj, rObj);
|
38327
|
+
});
|
38328
|
+
var mergeDeepRight_default = mergeDeepRight;
|
38329
|
+
|
38179
38330
|
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
|
38180
38331
|
var hasProtoTrim = typeof String.prototype.trim === "function";
|
38181
38332
|
|
@@ -38297,7 +38448,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38297
38448
|
}
|
38298
38449
|
return firstArg;
|
38299
38450
|
}
|
38300
|
-
var GraphQLError = class
|
38451
|
+
var GraphQLError = class extends Error {
|
38301
38452
|
/**
|
38302
38453
|
* An array of `{ line, column }` locations within the source GraphQL document
|
38303
38454
|
* which correspond to this error.
|
@@ -38384,7 +38535,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38384
38535
|
configurable: true
|
38385
38536
|
});
|
38386
38537
|
} else if (Error.captureStackTrace) {
|
38387
|
-
Error.captureStackTrace(this,
|
38538
|
+
Error.captureStackTrace(this, GraphQLError);
|
38388
38539
|
} else {
|
38389
38540
|
Object.defineProperty(this, "stack", {
|
38390
38541
|
value: Error().stack,
|
@@ -42148,12 +42299,11 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42148
42299
|
}
|
42149
42300
|
|
42150
42301
|
// src/providers/fuel-graphql-subscriber.ts
|
42151
|
-
var
|
42302
|
+
var _FuelGraphqlSubscriber = class {
|
42152
42303
|
constructor(options) {
|
42153
42304
|
this.options = options;
|
42154
42305
|
}
|
42155
42306
|
stream;
|
42156
|
-
static textDecoder = new TextDecoder();
|
42157
42307
|
async setStream() {
|
42158
42308
|
const { url, query, variables, fetchFn } = this.options;
|
42159
42309
|
const response = await fetchFn(`${url}-sub`, {
|
@@ -42213,6 +42363,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42213
42363
|
return this;
|
42214
42364
|
}
|
42215
42365
|
};
|
42366
|
+
var FuelGraphqlSubscriber = _FuelGraphqlSubscriber;
|
42367
|
+
__publicField(FuelGraphqlSubscriber, "textDecoder", new TextDecoder());
|
42216
42368
|
|
42217
42369
|
// src/providers/memory-cache.ts
|
42218
42370
|
var cache = {};
|
@@ -42706,15 +42858,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42706
42858
|
return normalize2(clone_default(root));
|
42707
42859
|
}
|
42708
42860
|
|
42709
|
-
// src/providers/utils/sleep.ts
|
42710
|
-
function sleep(time) {
|
42711
|
-
return new Promise((resolve) => {
|
42712
|
-
setTimeout(() => {
|
42713
|
-
resolve(true);
|
42714
|
-
}, time);
|
42715
|
-
});
|
42716
|
-
}
|
42717
|
-
|
42718
42861
|
// src/providers/transaction-request/errors.ts
|
42719
42862
|
var NoWitnessAtIndexError = class extends Error {
|
42720
42863
|
constructor(index) {
|
@@ -42735,7 +42878,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42735
42878
|
};
|
42736
42879
|
|
42737
42880
|
// src/providers/transaction-request/transaction-request.ts
|
42738
|
-
var BaseTransactionRequest = class
|
42881
|
+
var BaseTransactionRequest = class {
|
42739
42882
|
/** Gas price for transaction */
|
42740
42883
|
gasPrice;
|
42741
42884
|
/** Block until which tx cannot be included */
|
@@ -42805,7 +42948,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42805
42948
|
const inputs = this.inputs?.map(inputify) ?? [];
|
42806
42949
|
const outputs = this.outputs?.map(outputify) ?? [];
|
42807
42950
|
const witnesses = this.witnesses?.map(witnessify) ?? [];
|
42808
|
-
const { policyTypes, policies } =
|
42951
|
+
const { policyTypes, policies } = BaseTransactionRequest.getPolicyMeta(this);
|
42809
42952
|
return {
|
42810
42953
|
policyTypes,
|
42811
42954
|
inputs,
|
@@ -44294,7 +44437,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
44294
44437
|
}
|
44295
44438
|
|
44296
44439
|
// src/providers/transaction-response/transaction-response.ts
|
44297
|
-
var TransactionResponse2 = class
|
44440
|
+
var TransactionResponse2 = class {
|
44298
44441
|
/** Transaction ID */
|
44299
44442
|
id;
|
44300
44443
|
/** Current provider */
|
@@ -44322,7 +44465,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
44322
44465
|
* @param provider - The provider.
|
44323
44466
|
*/
|
44324
44467
|
static async create(id, provider) {
|
44325
|
-
const response = new
|
44468
|
+
const response = new TransactionResponse2(id, provider);
|
44326
44469
|
await response.fetch();
|
44327
44470
|
return response;
|
44328
44471
|
}
|
@@ -44533,7 +44676,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
44533
44676
|
}
|
44534
44677
|
};
|
44535
44678
|
};
|
44536
|
-
var
|
44679
|
+
var _cacheInputs, cacheInputs_fn;
|
44680
|
+
var _Provider = class {
|
44537
44681
|
/**
|
44538
44682
|
* Constructor to initialize a Provider.
|
44539
44683
|
*
|
@@ -44544,25 +44688,27 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
44544
44688
|
*/
|
44545
44689
|
constructor(url, options = {}) {
|
44546
44690
|
this.url = url;
|
44691
|
+
/**
|
44692
|
+
* @hidden
|
44693
|
+
*/
|
44694
|
+
__privateAdd(this, _cacheInputs);
|
44695
|
+
__publicField(this, "operations");
|
44696
|
+
__publicField(this, "cache");
|
44697
|
+
__publicField(this, "options", {
|
44698
|
+
timeout: void 0,
|
44699
|
+
cacheUtxo: void 0,
|
44700
|
+
fetch: void 0,
|
44701
|
+
retryOptions: void 0
|
44702
|
+
});
|
44547
44703
|
this.options = { ...this.options, ...options };
|
44548
44704
|
this.url = url;
|
44549
44705
|
this.operations = this.createOperations();
|
44550
44706
|
this.cache = options.cacheUtxo ? new MemoryCache(options.cacheUtxo) : void 0;
|
44551
44707
|
}
|
44552
|
-
operations;
|
44553
|
-
cache;
|
44554
44708
|
static clearChainAndNodeCaches() {
|
44555
44709
|
_Provider.nodeInfoCache = {};
|
44556
44710
|
_Provider.chainInfoCache = {};
|
44557
44711
|
}
|
44558
|
-
static chainInfoCache = {};
|
44559
|
-
static nodeInfoCache = {};
|
44560
|
-
options = {
|
44561
|
-
timeout: void 0,
|
44562
|
-
cacheUtxo: void 0,
|
44563
|
-
fetch: void 0,
|
44564
|
-
retryOptions: void 0
|
44565
|
-
};
|
44566
44712
|
static getFetchFn(options) {
|
44567
44713
|
const { retryOptions, timeout } = options;
|
44568
44714
|
return autoRetryFetch(async (...args) => {
|
@@ -44759,19 +44905,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
44759
44905
|
} = this.getChain();
|
44760
44906
|
return chainId.toNumber();
|
44761
44907
|
}
|
44762
|
-
/**
|
44763
|
-
* @hidden
|
44764
|
-
*/
|
44765
|
-
#cacheInputs(inputs) {
|
44766
|
-
if (!this.cache) {
|
44767
|
-
return;
|
44768
|
-
}
|
44769
|
-
inputs.forEach((input) => {
|
44770
|
-
if (input.type === InputType.Coin) {
|
44771
|
-
this.cache?.set(input.id);
|
44772
|
-
}
|
44773
|
-
});
|
44774
|
-
}
|
44775
44908
|
/**
|
44776
44909
|
* Submits a transaction to the chain to be executed.
|
44777
44910
|
*
|
@@ -44784,7 +44917,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
44784
44917
|
// #region Provider-sendTransaction
|
44785
44918
|
async sendTransaction(transactionRequestLike, { estimateTxDependencies = true, awaitExecution = false } = {}) {
|
44786
44919
|
const transactionRequest = transactionRequestify(transactionRequestLike);
|
44787
|
-
this
|
44920
|
+
__privateMethod(this, _cacheInputs, cacheInputs_fn).call(this, transactionRequest.inputs);
|
44788
44921
|
if (estimateTxDependencies) {
|
44789
44922
|
await this.estimateTxDependencies(transactionRequest);
|
44790
44923
|
}
|
@@ -45409,6 +45542,20 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
45409
45542
|
return new TransactionResponse2(transactionId, this);
|
45410
45543
|
}
|
45411
45544
|
};
|
45545
|
+
var Provider = _Provider;
|
45546
|
+
_cacheInputs = new WeakSet();
|
45547
|
+
cacheInputs_fn = function(inputs) {
|
45548
|
+
if (!this.cache) {
|
45549
|
+
return;
|
45550
|
+
}
|
45551
|
+
inputs.forEach((input) => {
|
45552
|
+
if (input.type === InputType.Coin) {
|
45553
|
+
this.cache?.set(input.id);
|
45554
|
+
}
|
45555
|
+
});
|
45556
|
+
};
|
45557
|
+
__publicField(Provider, "chainInfoCache", {});
|
45558
|
+
__publicField(Provider, "nodeInfoCache", {});
|
45412
45559
|
|
45413
45560
|
// src/providers/chains.ts
|
45414
45561
|
var CHAIN_IDS = {
|
@@ -47163,7 +47310,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
47163
47310
|
var Point = secp256k1.ProjectivePoint;
|
47164
47311
|
|
47165
47312
|
// src/signer/signer.ts
|
47166
|
-
var Signer = class
|
47313
|
+
var Signer = class {
|
47167
47314
|
address;
|
47168
47315
|
publicKey;
|
47169
47316
|
compressedPublicKey;
|
@@ -47242,7 +47389,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
47242
47389
|
* @returns Address from signature
|
47243
47390
|
*/
|
47244
47391
|
static recoverAddress(data, signature) {
|
47245
|
-
return Address.fromPublicKey(
|
47392
|
+
return Address.fromPublicKey(Signer.recoverPublicKey(data, signature));
|
47246
47393
|
}
|
47247
47394
|
/**
|
47248
47395
|
* Generate a random privateKey
|
@@ -47400,10 +47547,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
47400
47547
|
|
47401
47548
|
// src/wallet/base-wallet-unlocked.ts
|
47402
47549
|
var BaseWalletUnlocked = class extends Account {
|
47403
|
-
/**
|
47404
|
-
* Default HDWallet path.
|
47405
|
-
*/
|
47406
|
-
static defaultPath = "m/44'/1179993420'/0'/0/0";
|
47407
47550
|
/**
|
47408
47551
|
* A function that returns the wallet's signer.
|
47409
47552
|
*/
|
@@ -47509,6 +47652,10 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
47509
47652
|
return encryptKeystoreWallet(this.privateKey, this.address, password);
|
47510
47653
|
}
|
47511
47654
|
};
|
47655
|
+
/**
|
47656
|
+
* Default HDWallet path.
|
47657
|
+
*/
|
47658
|
+
__publicField(BaseWalletUnlocked, "defaultPath", "m/44'/1179993420'/0'/0/0");
|
47512
47659
|
|
47513
47660
|
// src/wordlists/words/english.ts
|
47514
47661
|
var english = [
|
@@ -49695,7 +49842,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
49695
49842
|
throw new FuelError(ErrorCode.INVALID_MNEMONIC, errorMsg);
|
49696
49843
|
}
|
49697
49844
|
}
|
49698
|
-
var Mnemonic = class
|
49845
|
+
var Mnemonic = class {
|
49699
49846
|
wordlist;
|
49700
49847
|
/**
|
49701
49848
|
*
|
@@ -49712,7 +49859,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
49712
49859
|
* @returns Entropy hash
|
49713
49860
|
*/
|
49714
49861
|
mnemonicToEntropy(phrase) {
|
49715
|
-
return
|
49862
|
+
return Mnemonic.mnemonicToEntropy(phrase, this.wordlist);
|
49716
49863
|
}
|
49717
49864
|
/**
|
49718
49865
|
*
|
@@ -49720,7 +49867,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
49720
49867
|
* @returns Mnemonic phrase
|
49721
49868
|
*/
|
49722
49869
|
entropyToMnemonic(entropy) {
|
49723
|
-
return
|
49870
|
+
return Mnemonic.entropyToMnemonic(entropy, this.wordlist);
|
49724
49871
|
}
|
49725
49872
|
/**
|
49726
49873
|
*
|
@@ -49761,8 +49908,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
49761
49908
|
* @returns 64-byte array contains privateKey and chainCode as described on BIP39
|
49762
49909
|
*/
|
49763
49910
|
static mnemonicToMasterKeys(phrase, passphrase = "") {
|
49764
|
-
const seed =
|
49765
|
-
return
|
49911
|
+
const seed = Mnemonic.mnemonicToSeed(phrase, passphrase);
|
49912
|
+
return Mnemonic.masterKeysFromSeed(seed);
|
49766
49913
|
}
|
49767
49914
|
/**
|
49768
49915
|
* Validates if given mnemonic is valid
|
@@ -49778,7 +49925,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
49778
49925
|
return false;
|
49779
49926
|
}
|
49780
49927
|
while (i < words.length) {
|
49781
|
-
if (
|
49928
|
+
if (Mnemonic.binarySearch(words[i]) === false) {
|
49782
49929
|
return false;
|
49783
49930
|
}
|
49784
49931
|
i += 1;
|
@@ -49825,7 +49972,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
49825
49972
|
* @returns BIP-32 extended private key
|
49826
49973
|
*/
|
49827
49974
|
static seedToExtendedKey(seed, testnet = false) {
|
49828
|
-
const masterKey =
|
49975
|
+
const masterKey = Mnemonic.masterKeysFromSeed(seed);
|
49829
49976
|
const prefix = arrayify(testnet ? TestnetPRV : MainnetPRV);
|
49830
49977
|
const depth = "0x00";
|
49831
49978
|
const fingerprint = "0x00000000";
|
@@ -49857,7 +50004,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
49857
50004
|
*/
|
49858
50005
|
static generate(size = 32, extraEntropy = "") {
|
49859
50006
|
const entropy = extraEntropy ? sha2563(concat([randomBytes22(size), arrayify(extraEntropy)])) : randomBytes22(size);
|
49860
|
-
return
|
50007
|
+
return Mnemonic.entropyToMnemonic(entropy);
|
49861
50008
|
}
|
49862
50009
|
};
|
49863
50010
|
var mnemonic_default = Mnemonic;
|
@@ -49897,7 +50044,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
49897
50044
|
(p) => ~p.indexOf(`'`) ? parseInt(p, 10) + HARDENED_INDEX : parseInt(p, 10)
|
49898
50045
|
);
|
49899
50046
|
}
|
49900
|
-
var HDWallet = class
|
50047
|
+
var HDWallet = class {
|
49901
50048
|
depth = 0;
|
49902
50049
|
index = 0;
|
49903
50050
|
fingerprint = hexlify("0x00000000");
|
@@ -49963,7 +50110,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
49963
50110
|
if (privateKey) {
|
49964
50111
|
const N = "0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141";
|
49965
50112
|
const ki = bn(IL).add(privateKey).mod(N).toBytes(32);
|
49966
|
-
return new
|
50113
|
+
return new HDWallet({
|
49967
50114
|
privateKey: ki,
|
49968
50115
|
chainCode: IR,
|
49969
50116
|
index,
|
@@ -49973,7 +50120,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
49973
50120
|
}
|
49974
50121
|
const signer = new Signer(hexlify(IL));
|
49975
50122
|
const Ki = signer.addPoint(publicKey);
|
49976
|
-
return new
|
50123
|
+
return new HDWallet({
|
49977
50124
|
publicKey: Ki,
|
49978
50125
|
chainCode: IR,
|
49979
50126
|
index,
|
@@ -50022,7 +50169,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50022
50169
|
*/
|
50023
50170
|
static fromSeed(seed) {
|
50024
50171
|
const masterKey = mnemonic_default.masterKeysFromSeed(seed);
|
50025
|
-
return new
|
50172
|
+
return new HDWallet({
|
50026
50173
|
chainCode: arrayify(masterKey.slice(32)),
|
50027
50174
|
privateKey: arrayify(masterKey.slice(0, 32))
|
50028
50175
|
});
|
@@ -50052,7 +50199,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50052
50199
|
if (key[0] !== 3) {
|
50053
50200
|
throw new FuelError(ErrorCode.HD_WALLET_ERROR, "Invalid public extended key.");
|
50054
50201
|
}
|
50055
|
-
return new
|
50202
|
+
return new HDWallet({
|
50056
50203
|
publicKey: key,
|
50057
50204
|
chainCode,
|
50058
50205
|
index,
|
@@ -50063,7 +50210,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50063
50210
|
if (key[0] !== 0) {
|
50064
50211
|
throw new FuelError(ErrorCode.HD_WALLET_ERROR, "Invalid private extended key.");
|
50065
50212
|
}
|
50066
|
-
return new
|
50213
|
+
return new HDWallet({
|
50067
50214
|
privateKey: key.slice(1),
|
50068
50215
|
chainCode,
|
50069
50216
|
index,
|
@@ -50086,7 +50233,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50086
50233
|
return new WalletUnlocked(privateKey, this._provider);
|
50087
50234
|
}
|
50088
50235
|
};
|
50089
|
-
var WalletUnlocked = class
|
50236
|
+
var WalletUnlocked = class extends BaseWalletUnlocked {
|
50090
50237
|
/**
|
50091
50238
|
* Locks the wallet and returns an instance of WalletLocked.
|
50092
50239
|
*
|
@@ -50104,7 +50251,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50104
50251
|
*/
|
50105
50252
|
static generate(generateOptions) {
|
50106
50253
|
const privateKey = Signer.generatePrivateKey(generateOptions?.entropy);
|
50107
|
-
return new
|
50254
|
+
return new WalletUnlocked(privateKey, generateOptions?.provider);
|
50108
50255
|
}
|
50109
50256
|
/**
|
50110
50257
|
* Create a Wallet Unlocked from a seed.
|
@@ -50116,8 +50263,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50116
50263
|
*/
|
50117
50264
|
static fromSeed(seed, path2, provider) {
|
50118
50265
|
const hdWallet = hdwallet_default.fromSeed(seed);
|
50119
|
-
const childWallet = hdWallet.derivePath(path2 ||
|
50120
|
-
return new
|
50266
|
+
const childWallet = hdWallet.derivePath(path2 || WalletUnlocked.defaultPath);
|
50267
|
+
return new WalletUnlocked(childWallet.privateKey, provider);
|
50121
50268
|
}
|
50122
50269
|
/**
|
50123
50270
|
* Create a Wallet Unlocked from a mnemonic phrase.
|
@@ -50131,8 +50278,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50131
50278
|
static fromMnemonic(mnemonic, path2, passphrase, provider) {
|
50132
50279
|
const seed = mnemonic_default.mnemonicToSeed(mnemonic, passphrase);
|
50133
50280
|
const hdWallet = hdwallet_default.fromSeed(seed);
|
50134
|
-
const childWallet = hdWallet.derivePath(path2 ||
|
50135
|
-
return new
|
50281
|
+
const childWallet = hdWallet.derivePath(path2 || WalletUnlocked.defaultPath);
|
50282
|
+
return new WalletUnlocked(childWallet.privateKey, provider);
|
50136
50283
|
}
|
50137
50284
|
/**
|
50138
50285
|
* Create a Wallet Unlocked from an extended key.
|
@@ -50143,7 +50290,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50143
50290
|
*/
|
50144
50291
|
static fromExtendedKey(extendedKey, provider) {
|
50145
50292
|
const hdWallet = hdwallet_default.fromExtendedKey(extendedKey);
|
50146
|
-
return new
|
50293
|
+
return new WalletUnlocked(hdWallet.privateKey, provider);
|
50147
50294
|
}
|
50148
50295
|
/**
|
50149
50296
|
* Create a Wallet Unlocked from an encrypted JSON.
|
@@ -50155,7 +50302,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50155
50302
|
*/
|
50156
50303
|
static async fromEncryptedJson(jsonWallet, password, provider) {
|
50157
50304
|
const privateKey = await decryptKeystoreWallet(jsonWallet, password);
|
50158
|
-
return new
|
50305
|
+
return new WalletUnlocked(privateKey, provider);
|
50159
50306
|
}
|
50160
50307
|
};
|
50161
50308
|
|
@@ -50181,50 +50328,50 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50181
50328
|
static fromPrivateKey(privateKey, provider) {
|
50182
50329
|
return new WalletUnlocked(privateKey, provider);
|
50183
50330
|
}
|
50184
|
-
/**
|
50185
|
-
* Generate a new Wallet Unlocked with a random key pair.
|
50186
|
-
*
|
50187
|
-
* @param generateOptions - Options to customize the generation process (optional).
|
50188
|
-
* @returns An unlocked wallet instance.
|
50189
|
-
*/
|
50190
|
-
static generate = WalletUnlocked.generate;
|
50191
|
-
/**
|
50192
|
-
* Create a Wallet Unlocked from a seed.
|
50193
|
-
*
|
50194
|
-
* @param seed - The seed phrase.
|
50195
|
-
* @param provider - A Provider instance (optional).
|
50196
|
-
* @param path - The derivation path (optional).
|
50197
|
-
* @returns An unlocked wallet instance.
|
50198
|
-
*/
|
50199
|
-
static fromSeed = WalletUnlocked.fromSeed;
|
50200
|
-
/**
|
50201
|
-
* Create a Wallet Unlocked from a mnemonic phrase.
|
50202
|
-
*
|
50203
|
-
* @param mnemonic - The mnemonic phrase.
|
50204
|
-
* @param provider - A Provider instance (optional).
|
50205
|
-
* @param path - The derivation path (optional).
|
50206
|
-
* @param passphrase - The passphrase for the mnemonic (optional).
|
50207
|
-
* @returns An unlocked wallet instance.
|
50208
|
-
*/
|
50209
|
-
static fromMnemonic = WalletUnlocked.fromMnemonic;
|
50210
|
-
/**
|
50211
|
-
* Create a Wallet Unlocked from an extended key.
|
50212
|
-
*
|
50213
|
-
* @param extendedKey - The extended key.
|
50214
|
-
* @param provider - A Provider instance (optional).
|
50215
|
-
* @returns An unlocked wallet instance.
|
50216
|
-
*/
|
50217
|
-
static fromExtendedKey = WalletUnlocked.fromExtendedKey;
|
50218
|
-
/**
|
50219
|
-
* Create a Wallet Unlocked from an encrypted JSON.
|
50220
|
-
*
|
50221
|
-
* @param jsonWallet - The encrypted JSON keystore.
|
50222
|
-
* @param password - The password to decrypt the JSON.
|
50223
|
-
* @param provider - A Provider instance (optional).
|
50224
|
-
* @returns An unlocked wallet instance.
|
50225
|
-
*/
|
50226
|
-
static fromEncryptedJson = WalletUnlocked.fromEncryptedJson;
|
50227
50331
|
};
|
50332
|
+
/**
|
50333
|
+
* Generate a new Wallet Unlocked with a random key pair.
|
50334
|
+
*
|
50335
|
+
* @param generateOptions - Options to customize the generation process (optional).
|
50336
|
+
* @returns An unlocked wallet instance.
|
50337
|
+
*/
|
50338
|
+
__publicField(Wallet, "generate", WalletUnlocked.generate);
|
50339
|
+
/**
|
50340
|
+
* Create a Wallet Unlocked from a seed.
|
50341
|
+
*
|
50342
|
+
* @param seed - The seed phrase.
|
50343
|
+
* @param provider - A Provider instance (optional).
|
50344
|
+
* @param path - The derivation path (optional).
|
50345
|
+
* @returns An unlocked wallet instance.
|
50346
|
+
*/
|
50347
|
+
__publicField(Wallet, "fromSeed", WalletUnlocked.fromSeed);
|
50348
|
+
/**
|
50349
|
+
* Create a Wallet Unlocked from a mnemonic phrase.
|
50350
|
+
*
|
50351
|
+
* @param mnemonic - The mnemonic phrase.
|
50352
|
+
* @param provider - A Provider instance (optional).
|
50353
|
+
* @param path - The derivation path (optional).
|
50354
|
+
* @param passphrase - The passphrase for the mnemonic (optional).
|
50355
|
+
* @returns An unlocked wallet instance.
|
50356
|
+
*/
|
50357
|
+
__publicField(Wallet, "fromMnemonic", WalletUnlocked.fromMnemonic);
|
50358
|
+
/**
|
50359
|
+
* Create a Wallet Unlocked from an extended key.
|
50360
|
+
*
|
50361
|
+
* @param extendedKey - The extended key.
|
50362
|
+
* @param provider - A Provider instance (optional).
|
50363
|
+
* @returns An unlocked wallet instance.
|
50364
|
+
*/
|
50365
|
+
__publicField(Wallet, "fromExtendedKey", WalletUnlocked.fromExtendedKey);
|
50366
|
+
/**
|
50367
|
+
* Create a Wallet Unlocked from an encrypted JSON.
|
50368
|
+
*
|
50369
|
+
* @param jsonWallet - The encrypted JSON keystore.
|
50370
|
+
* @param password - The password to decrypt the JSON.
|
50371
|
+
* @param provider - A Provider instance (optional).
|
50372
|
+
* @returns An unlocked wallet instance.
|
50373
|
+
*/
|
50374
|
+
__publicField(Wallet, "fromEncryptedJson", WalletUnlocked.fromEncryptedJson);
|
50228
50375
|
|
50229
50376
|
// src/test-utils/seedTestWallet.ts
|
50230
50377
|
var seedTestWallet = async (wallet, quantities) => {
|
@@ -50313,7 +50460,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50313
50460
|
useSystemFuelCore = false,
|
50314
50461
|
loggingEnabled = true,
|
50315
50462
|
debugEnabled = false,
|
50316
|
-
basePath
|
50463
|
+
basePath,
|
50464
|
+
chainConfig = defaultChainConfig
|
50317
50465
|
}) => (
|
50318
50466
|
// eslint-disable-next-line no-async-promise-executor
|
50319
50467
|
new Promise(async (resolve, reject) => {
|
@@ -50350,17 +50498,17 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50350
50498
|
(0, import_fs2.mkdirSync)(tempDirPath, { recursive: true });
|
50351
50499
|
}
|
50352
50500
|
const tempChainConfigFilePath = import_path8.default.join(tempDirPath, "chainConfig.json");
|
50353
|
-
let
|
50501
|
+
let generatedChainConfig = chainConfig;
|
50354
50502
|
if (!process.env.GENESIS_SECRET) {
|
50355
50503
|
const pk = Signer.generatePrivateKey();
|
50356
50504
|
const signer = new Signer(pk);
|
50357
50505
|
process.env.GENESIS_SECRET = hexlify(pk);
|
50358
|
-
|
50359
|
-
...
|
50506
|
+
generatedChainConfig = {
|
50507
|
+
...generatedChainConfig,
|
50360
50508
|
initial_state: {
|
50361
|
-
...
|
50509
|
+
...generatedChainConfig.initial_state,
|
50362
50510
|
coins: [
|
50363
|
-
...
|
50511
|
+
...generatedChainConfig.initial_state.coins,
|
50364
50512
|
{
|
50365
50513
|
owner: signer.address.toHexString(),
|
50366
50514
|
amount: toHex(1e9),
|
@@ -50370,7 +50518,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50370
50518
|
}
|
50371
50519
|
};
|
50372
50520
|
}
|
50373
|
-
(0, import_fs2.writeFileSync)(tempChainConfigFilePath, JSON.stringify(
|
50521
|
+
(0, import_fs2.writeFileSync)(tempChainConfigFilePath, JSON.stringify(generatedChainConfig), "utf8");
|
50374
50522
|
chainConfigPathToUse = tempChainConfigFilePath;
|
50375
50523
|
}
|
50376
50524
|
const child = (0, import_child_process.spawn)(
|
@@ -50408,16 +50556,21 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50408
50556
|
}
|
50409
50557
|
};
|
50410
50558
|
child.stderr.on("data", (chunk) => {
|
50411
|
-
|
50559
|
+
const text = typeof chunk === "string" ? chunk : chunk.toString();
|
50560
|
+
if (text.indexOf(graphQLStartSubstring) !== -1) {
|
50561
|
+
const rows = text.split("\n");
|
50562
|
+
const rowWithUrl = rows.find((row) => row.indexOf(graphQLStartSubstring) !== -1);
|
50563
|
+
const [realIp, realPort] = rowWithUrl.split(" ").at(-1).trim().split(":");
|
50412
50564
|
resolve({
|
50413
50565
|
cleanup: () => killNode(cleanupConfig),
|
50414
|
-
ip:
|
50415
|
-
port:
|
50566
|
+
ip: realIp,
|
50567
|
+
port: realPort,
|
50568
|
+
url: `http://${realIp}:${realPort}/graphql`,
|
50416
50569
|
chainConfigPath: chainConfigPathToUse
|
50417
50570
|
});
|
50418
50571
|
}
|
50419
|
-
if (/error/i.test(
|
50420
|
-
reject(
|
50572
|
+
if (/error/i.test(text)) {
|
50573
|
+
reject(text.toString());
|
50421
50574
|
}
|
50422
50575
|
});
|
50423
50576
|
process.on("exit", () => killNode(cleanupConfig));
|
@@ -50449,6 +50602,198 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
50449
50602
|
};
|
50450
50603
|
return { wallets, stop: cleanup, provider };
|
50451
50604
|
};
|
50605
|
+
|
50606
|
+
// src/test-utils/asset-id.ts
|
50607
|
+
var _AssetId = class {
|
50608
|
+
constructor(value) {
|
50609
|
+
this.value = value;
|
50610
|
+
}
|
50611
|
+
static random() {
|
50612
|
+
return new _AssetId(hexlify(randomBytes22(32)));
|
50613
|
+
}
|
50614
|
+
};
|
50615
|
+
var AssetId = _AssetId;
|
50616
|
+
__publicField(AssetId, "BaseAssetId", new _AssetId(BaseAssetId));
|
50617
|
+
__publicField(AssetId, "A", new _AssetId(
|
50618
|
+
"0x0101010101010101010101010101010101010101010101010101010101010101"
|
50619
|
+
));
|
50620
|
+
__publicField(AssetId, "B", new _AssetId(
|
50621
|
+
"0x0202020202020202020202020202020202020202020202020202020202020202"
|
50622
|
+
));
|
50623
|
+
|
50624
|
+
// src/test-utils/wallet-config.ts
|
50625
|
+
var WalletConfig = class {
|
50626
|
+
initialState;
|
50627
|
+
options;
|
50628
|
+
wallets;
|
50629
|
+
generateWallets = () => {
|
50630
|
+
const generatedWallets = [];
|
50631
|
+
for (let index = 1; index <= this.options.count; index++) {
|
50632
|
+
generatedWallets.push(new WalletUnlocked(randomBytes22(32)));
|
50633
|
+
}
|
50634
|
+
return generatedWallets;
|
50635
|
+
};
|
50636
|
+
constructor(config) {
|
50637
|
+
WalletConfig.guard(config);
|
50638
|
+
this.options = config;
|
50639
|
+
const { assets: assets2, coinsPerAsset, amountPerCoin, messages } = this.options;
|
50640
|
+
this.wallets = this.generateWallets();
|
50641
|
+
this.initialState = {
|
50642
|
+
messages: WalletConfig.createMessages(this.wallets, messages),
|
50643
|
+
coins: WalletConfig.createCoins(this.wallets, assets2, coinsPerAsset, amountPerCoin)
|
50644
|
+
};
|
50645
|
+
}
|
50646
|
+
apply(chainConfig) {
|
50647
|
+
return {
|
50648
|
+
...chainConfig,
|
50649
|
+
initial_state: {
|
50650
|
+
...chainConfig?.initial_state,
|
50651
|
+
coins: this.initialState.coins.concat(chainConfig?.initial_state?.coins || []),
|
50652
|
+
messages: this.initialState.messages.concat(chainConfig?.initial_state?.messages ?? [])
|
50653
|
+
}
|
50654
|
+
};
|
50655
|
+
}
|
50656
|
+
static createMessages(wallets, messages) {
|
50657
|
+
return messages.map((msg) => wallets.map((wallet) => msg.toChainMessage(wallet.address))).flatMap((x) => x);
|
50658
|
+
}
|
50659
|
+
static createCoins(wallets, assets2, coinsPerAsset, amountPerCoin) {
|
50660
|
+
const coins = [];
|
50661
|
+
let assetIds = [AssetId.BaseAssetId.value];
|
50662
|
+
if (Array.isArray(assets2)) {
|
50663
|
+
assetIds = assetIds.concat(assets2.map((a) => a.value));
|
50664
|
+
} else {
|
50665
|
+
for (let index = 0; index < assets2 - 1; index++) {
|
50666
|
+
assetIds.push(AssetId.random().value);
|
50667
|
+
}
|
50668
|
+
}
|
50669
|
+
wallets.map((wallet) => wallet.address.toHexString()).forEach((walletAddress) => {
|
50670
|
+
assetIds.forEach((assetId) => {
|
50671
|
+
for (let index = 0; index < coinsPerAsset; index++) {
|
50672
|
+
coins.push({
|
50673
|
+
amount: toHex(amountPerCoin, 8),
|
50674
|
+
asset_id: assetId,
|
50675
|
+
owner: walletAddress
|
50676
|
+
});
|
50677
|
+
}
|
50678
|
+
});
|
50679
|
+
});
|
50680
|
+
return coins;
|
50681
|
+
}
|
50682
|
+
static guard({
|
50683
|
+
count: wallets,
|
50684
|
+
assets: assets2,
|
50685
|
+
coinsPerAsset,
|
50686
|
+
amountPerCoin
|
50687
|
+
}) {
|
50688
|
+
if (Array.isArray(wallets) && wallets.length === 0 || typeof wallets === "number" && wallets <= 0) {
|
50689
|
+
throw new FuelError(
|
50690
|
+
FuelError.CODES.INVALID_INPUT_PARAMETERS,
|
50691
|
+
"Number of wallets must be greater than zero."
|
50692
|
+
);
|
50693
|
+
}
|
50694
|
+
if (Array.isArray(assets2) && assets2.length === 0 || typeof assets2 === "number" && assets2 <= 0) {
|
50695
|
+
throw new FuelError(
|
50696
|
+
FuelError.CODES.INVALID_INPUT_PARAMETERS,
|
50697
|
+
"Number of assets per wallet must be greater than zero."
|
50698
|
+
);
|
50699
|
+
}
|
50700
|
+
if (coinsPerAsset <= 0) {
|
50701
|
+
throw new FuelError(
|
50702
|
+
FuelError.CODES.INVALID_INPUT_PARAMETERS,
|
50703
|
+
"Number of coins per asset must be greater than zero."
|
50704
|
+
);
|
50705
|
+
}
|
50706
|
+
if (amountPerCoin <= 0) {
|
50707
|
+
throw new FuelError(
|
50708
|
+
FuelError.CODES.INVALID_INPUT_PARAMETERS,
|
50709
|
+
"Amount per coin must be greater than zero."
|
50710
|
+
);
|
50711
|
+
}
|
50712
|
+
}
|
50713
|
+
};
|
50714
|
+
|
50715
|
+
// src/test-utils/setup-test-provider-and-wallets.ts
|
50716
|
+
var defaultWalletConfigOptions = {
|
50717
|
+
count: 2,
|
50718
|
+
assets: [AssetId.A, AssetId.B],
|
50719
|
+
coinsPerAsset: 1,
|
50720
|
+
amountPerCoin: 1e10,
|
50721
|
+
messages: []
|
50722
|
+
};
|
50723
|
+
async function setupTestProviderAndWallets({
|
50724
|
+
walletConfig: walletConfigOptions = {},
|
50725
|
+
providerOptions,
|
50726
|
+
nodeOptions = {}
|
50727
|
+
} = {}) {
|
50728
|
+
Symbol.dispose ??= Symbol("Symbol.dispose");
|
50729
|
+
const walletConfig = new WalletConfig({
|
50730
|
+
...defaultWalletConfigOptions,
|
50731
|
+
...walletConfigOptions
|
50732
|
+
});
|
50733
|
+
const { cleanup, url } = await launchNode({
|
50734
|
+
...nodeOptions,
|
50735
|
+
chainConfig: mergeDeepRight_default(defaultChainConfig, walletConfig.apply(nodeOptions?.chainConfig)),
|
50736
|
+
port: "0"
|
50737
|
+
});
|
50738
|
+
let provider;
|
50739
|
+
try {
|
50740
|
+
provider = await Provider.create(url, providerOptions);
|
50741
|
+
} catch (err) {
|
50742
|
+
cleanup();
|
50743
|
+
throw err;
|
50744
|
+
}
|
50745
|
+
const wallets = walletConfig.wallets;
|
50746
|
+
wallets.forEach((wallet) => {
|
50747
|
+
wallet.connect(provider);
|
50748
|
+
});
|
50749
|
+
return {
|
50750
|
+
provider,
|
50751
|
+
wallets,
|
50752
|
+
cleanup,
|
50753
|
+
[Symbol.dispose]: cleanup
|
50754
|
+
};
|
50755
|
+
}
|
50756
|
+
|
50757
|
+
// src/test-utils/test-message.ts
|
50758
|
+
var TestMessage = class {
|
50759
|
+
sender;
|
50760
|
+
recipient;
|
50761
|
+
nonce;
|
50762
|
+
amount;
|
50763
|
+
data;
|
50764
|
+
da_height;
|
50765
|
+
/**
|
50766
|
+
* A helper class to create messages for testing purposes.
|
50767
|
+
*
|
50768
|
+
* Used in tandem with `WalletConfig`.
|
50769
|
+
* It can also be used standalone and passed into the initial state of a chain via the `.toChainMessage` method.
|
50770
|
+
*/
|
50771
|
+
constructor({
|
50772
|
+
sender = Address.fromRandom(),
|
50773
|
+
recipient = Address.fromRandom(),
|
50774
|
+
nonce = hexlify(randomBytes22(32)),
|
50775
|
+
amount = 1e6,
|
50776
|
+
data = "02",
|
50777
|
+
da_height = "0x00"
|
50778
|
+
} = {}) {
|
50779
|
+
this.sender = sender;
|
50780
|
+
this.recipient = recipient;
|
50781
|
+
this.nonce = nonce;
|
50782
|
+
this.amount = amount;
|
50783
|
+
this.data = data;
|
50784
|
+
this.da_height = da_height;
|
50785
|
+
}
|
50786
|
+
toChainMessage(recipient) {
|
50787
|
+
return {
|
50788
|
+
sender: this.sender.toB256(),
|
50789
|
+
recipient: recipient?.toB256() ?? this.recipient.toB256(),
|
50790
|
+
nonce: this.nonce,
|
50791
|
+
amount: new BN(this.amount).toHex(8),
|
50792
|
+
data: this.data,
|
50793
|
+
da_height: this.da_height
|
50794
|
+
};
|
50795
|
+
}
|
50796
|
+
};
|
50452
50797
|
})();
|
50453
50798
|
/*! Bundled license information:
|
50454
50799
|
|