@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.

Files changed (218) hide show
  1. package/dist/account.d.ts +177 -0
  2. package/dist/account.d.ts.map +1 -0
  3. package/dist/configs.d.ts +2 -3
  4. package/dist/configs.d.ts.map +1 -0
  5. package/dist/connectors/fuel-connector.d.ts +188 -0
  6. package/dist/connectors/fuel-connector.d.ts.map +1 -0
  7. package/dist/connectors/fuel.d.ts +133 -0
  8. package/dist/connectors/fuel.d.ts.map +1 -0
  9. package/dist/connectors/index.d.ts +5 -0
  10. package/dist/connectors/index.d.ts.map +1 -0
  11. package/dist/connectors/types/connector-metadata.d.ts +12 -0
  12. package/dist/connectors/types/connector-metadata.d.ts.map +1 -0
  13. package/dist/connectors/types/connector-types.d.ts +34 -0
  14. package/dist/connectors/types/connector-types.d.ts.map +1 -0
  15. package/dist/connectors/types/data-type.d.ts +34 -0
  16. package/dist/connectors/types/data-type.d.ts.map +1 -0
  17. package/dist/connectors/types/events.d.ts +111 -0
  18. package/dist/connectors/types/events.d.ts.map +1 -0
  19. package/dist/connectors/types/index.d.ts +7 -0
  20. package/dist/connectors/types/index.d.ts.map +1 -0
  21. package/dist/connectors/types/local-storage.d.ts +11 -0
  22. package/dist/connectors/types/local-storage.d.ts.map +1 -0
  23. package/dist/connectors/types/target-object.d.ts +14 -0
  24. package/dist/connectors/types/target-object.d.ts.map +1 -0
  25. package/dist/connectors/utils/cache.d.ts +14 -0
  26. package/dist/connectors/utils/cache.d.ts.map +1 -0
  27. package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts +7 -0
  28. package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts.map +1 -0
  29. package/dist/connectors/utils/index.d.ts +4 -0
  30. package/dist/connectors/utils/index.d.ts.map +1 -0
  31. package/dist/connectors/utils/promises.d.ts +8 -0
  32. package/dist/connectors/utils/promises.d.ts.map +1 -0
  33. package/dist/hdwallet/hdwallet.d.ts +58 -0
  34. package/dist/hdwallet/hdwallet.d.ts.map +1 -0
  35. package/dist/hdwallet/index.d.ts +2 -0
  36. package/dist/hdwallet/index.d.ts.map +1 -0
  37. package/dist/index.d.ts +13 -904
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.global.js +461 -394
  40. package/dist/index.global.js.map +1 -1
  41. package/dist/index.js +350 -314
  42. package/dist/index.js.map +1 -1
  43. package/dist/index.mjs +251 -212
  44. package/dist/index.mjs.map +1 -1
  45. package/dist/mnemonic/index.d.ts +3 -0
  46. package/dist/mnemonic/index.d.ts.map +1 -0
  47. package/dist/mnemonic/mnemonic.d.ts +85 -0
  48. package/dist/mnemonic/mnemonic.d.ts.map +1 -0
  49. package/dist/mnemonic/utils.d.ts +8 -0
  50. package/dist/mnemonic/utils.d.ts.map +1 -0
  51. package/dist/predicate/index.d.ts +3 -0
  52. package/dist/predicate/index.d.ts.map +1 -0
  53. package/dist/predicate/predicate.d.ts +94 -0
  54. package/dist/predicate/predicate.d.ts.map +1 -0
  55. package/dist/predicate/utils/getPredicateRoot.d.ts +12 -0
  56. package/dist/predicate/utils/getPredicateRoot.d.ts.map +1 -0
  57. package/dist/predicate/utils/index.d.ts +2 -0
  58. package/dist/predicate/utils/index.d.ts.map +1 -0
  59. package/dist/providers/__generated__/operations.d.ts +3477 -0
  60. package/dist/providers/__generated__/operations.d.ts.map +1 -0
  61. package/dist/providers/assets/index.d.ts +5 -0
  62. package/dist/providers/assets/index.d.ts.map +1 -0
  63. package/dist/providers/assets/types.d.ts +36 -0
  64. package/dist/providers/assets/types.d.ts.map +1 -0
  65. package/dist/providers/assets/utils/index.d.ts +4 -0
  66. package/dist/providers/assets/utils/index.d.ts.map +1 -0
  67. package/dist/providers/assets/utils/network.d.ts +33 -0
  68. package/dist/providers/assets/utils/network.d.ts.map +1 -0
  69. package/dist/providers/assets/utils/resolveIconPaths.d.ts +14 -0
  70. package/dist/providers/assets/utils/resolveIconPaths.d.ts.map +1 -0
  71. package/dist/providers/assets/utils/url.d.ts +2 -0
  72. package/dist/providers/assets/utils/url.d.ts.map +1 -0
  73. package/dist/providers/chains.d.ts +11 -0
  74. package/dist/providers/chains.d.ts.map +1 -0
  75. package/dist/providers/coin-quantity.d.ts +21 -0
  76. package/dist/providers/coin-quantity.d.ts.map +1 -0
  77. package/dist/providers/coin.d.ts +15 -0
  78. package/dist/providers/coin.d.ts.map +1 -0
  79. package/dist/providers/fuel-graphql-subscriber.d.ts +23 -0
  80. package/dist/providers/fuel-graphql-subscriber.d.ts.map +1 -0
  81. package/dist/providers/index.d.ts +13 -0
  82. package/dist/providers/index.d.ts.map +1 -0
  83. package/dist/providers/memory-cache.d.ts +11 -0
  84. package/dist/providers/memory-cache.d.ts.map +1 -0
  85. package/dist/providers/message.d.ts +60 -0
  86. package/dist/providers/message.d.ts.map +1 -0
  87. package/dist/providers/provider.d.ts +522 -0
  88. package/dist/providers/provider.d.ts.map +1 -0
  89. package/dist/providers/resource.d.ts +37 -0
  90. package/dist/providers/resource.d.ts.map +1 -0
  91. package/dist/providers/transaction-request/create-transaction-request.d.ts +73 -0
  92. package/dist/providers/transaction-request/create-transaction-request.d.ts.map +1 -0
  93. package/dist/providers/transaction-request/errors.d.ts +25 -0
  94. package/dist/providers/transaction-request/errors.d.ts.map +1 -0
  95. package/dist/providers/transaction-request/hash-transaction.d.ts +9 -0
  96. package/dist/providers/transaction-request/hash-transaction.d.ts.map +1 -0
  97. package/dist/providers/transaction-request/index.d.ts +10 -0
  98. package/dist/providers/transaction-request/index.d.ts.map +1 -0
  99. package/dist/providers/transaction-request/input.d.ts +59 -0
  100. package/dist/providers/transaction-request/input.d.ts.map +1 -0
  101. package/dist/providers/transaction-request/output.d.ts +39 -0
  102. package/dist/providers/transaction-request/output.d.ts.map +1 -0
  103. package/dist/providers/transaction-request/script-transaction-request.d.ts +106 -0
  104. package/dist/providers/transaction-request/script-transaction-request.d.ts.map +1 -0
  105. package/dist/providers/transaction-request/scripts.d.ts +6 -0
  106. package/dist/providers/transaction-request/scripts.d.ts.map +1 -0
  107. package/dist/providers/transaction-request/storage-slot.d.ts +10 -0
  108. package/dist/providers/transaction-request/storage-slot.d.ts.map +1 -0
  109. package/dist/providers/transaction-request/transaction-request.d.ts +259 -0
  110. package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -0
  111. package/dist/providers/transaction-request/types.d.ts +10 -0
  112. package/dist/providers/transaction-request/types.d.ts.map +1 -0
  113. package/dist/providers/transaction-request/utils.d.ts +4 -0
  114. package/dist/providers/transaction-request/utils.d.ts.map +1 -0
  115. package/dist/providers/transaction-request/witness.d.ts +5 -0
  116. package/dist/providers/transaction-request/witness.d.ts.map +1 -0
  117. package/dist/providers/transaction-response/getDecodedLogs.d.ts +5 -0
  118. package/dist/providers/transaction-response/getDecodedLogs.d.ts.map +1 -0
  119. package/dist/providers/transaction-response/index.d.ts +3 -0
  120. package/dist/providers/transaction-response/index.d.ts.map +1 -0
  121. package/dist/providers/transaction-response/transaction-response.d.ts +106 -0
  122. package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -0
  123. package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts +20 -0
  124. package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts.map +1 -0
  125. package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts +21 -0
  126. package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts.map +1 -0
  127. package/dist/providers/transaction-summary/call.d.ts +18 -0
  128. package/dist/providers/transaction-summary/call.d.ts.map +1 -0
  129. package/dist/providers/transaction-summary/get-transaction-summary.d.ts +31 -0
  130. package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -0
  131. package/dist/providers/transaction-summary/index.d.ts +10 -0
  132. package/dist/providers/transaction-summary/index.d.ts.map +1 -0
  133. package/dist/providers/transaction-summary/input.d.ts +21 -0
  134. package/dist/providers/transaction-summary/input.d.ts.map +1 -0
  135. package/dist/providers/transaction-summary/operations.d.ts +40 -0
  136. package/dist/providers/transaction-summary/operations.d.ts.map +1 -0
  137. package/dist/providers/transaction-summary/output.d.ts +15 -0
  138. package/dist/providers/transaction-summary/output.d.ts.map +1 -0
  139. package/dist/providers/transaction-summary/receipt.d.ts +7 -0
  140. package/dist/providers/transaction-summary/receipt.d.ts.map +1 -0
  141. package/dist/providers/transaction-summary/status.d.ts +9 -0
  142. package/dist/providers/transaction-summary/status.d.ts.map +1 -0
  143. package/dist/providers/transaction-summary/types.d.ts +146 -0
  144. package/dist/providers/transaction-summary/types.d.ts.map +1 -0
  145. package/dist/providers/utils/auto-retry-fetch.d.ts +36 -0
  146. package/dist/providers/utils/auto-retry-fetch.d.ts.map +1 -0
  147. package/dist/providers/utils/block-explorer.d.ts +14 -0
  148. package/dist/providers/utils/block-explorer.d.ts.map +1 -0
  149. package/dist/providers/utils/gas.d.ts +38 -0
  150. package/dist/providers/utils/gas.d.ts.map +1 -0
  151. package/dist/providers/utils/index.d.ts +5 -0
  152. package/dist/providers/utils/index.d.ts.map +1 -0
  153. package/dist/providers/utils/json.d.ts +7 -0
  154. package/dist/providers/utils/json.d.ts.map +1 -0
  155. package/dist/providers/utils/merge-quantities.d.ts +3 -0
  156. package/dist/providers/utils/merge-quantities.d.ts.map +1 -0
  157. package/dist/providers/utils/receipts.d.ts +10 -0
  158. package/dist/providers/utils/receipts.d.ts.map +1 -0
  159. package/dist/signer/index.d.ts +2 -0
  160. package/dist/signer/index.d.ts.map +1 -0
  161. package/dist/signer/signer.d.ts +64 -0
  162. package/dist/signer/signer.d.ts.map +1 -0
  163. package/dist/test-utils/asset-id.d.ts +9 -0
  164. package/dist/test-utils/asset-id.d.ts.map +1 -0
  165. package/dist/test-utils/generateTestWallet.d.ts +4 -0
  166. package/dist/test-utils/generateTestWallet.d.ts.map +1 -0
  167. package/dist/test-utils/index.d.ts +8 -0
  168. package/dist/test-utils/index.d.ts.map +1 -0
  169. package/dist/{test-utils.d.ts → test-utils/launchNode.d.ts} +19 -24
  170. package/dist/test-utils/launchNode.d.ts.map +1 -0
  171. package/dist/test-utils/seedTestWallet.d.ts +4 -0
  172. package/dist/test-utils/seedTestWallet.d.ts.map +1 -0
  173. package/dist/test-utils/setup-test-provider-and-wallets.d.ts +33 -0
  174. package/dist/test-utils/setup-test-provider-and-wallets.d.ts.map +1 -0
  175. package/dist/test-utils/test-message.d.ts +28 -0
  176. package/dist/test-utils/test-message.d.ts.map +1 -0
  177. package/dist/test-utils/wallet-config.d.ts +49 -0
  178. package/dist/test-utils/wallet-config.d.ts.map +1 -0
  179. package/dist/test-utils.global.js +655 -310
  180. package/dist/test-utils.global.js.map +1 -1
  181. package/dist/test-utils.js +452 -217
  182. package/dist/test-utils.js.map +1 -1
  183. package/dist/test-utils.mjs +357 -124
  184. package/dist/test-utils.mjs.map +1 -1
  185. package/dist/utils/formatTransferToContractScriptData.d.ts +14 -0
  186. package/dist/utils/formatTransferToContractScriptData.d.ts.map +1 -0
  187. package/dist/wallet/base-wallet-unlocked.d.ts +73 -0
  188. package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -0
  189. package/dist/wallet/index.d.ts +4 -0
  190. package/dist/wallet/index.d.ts.map +1 -0
  191. package/dist/wallet/keystore-wallet.d.ts +38 -0
  192. package/dist/wallet/keystore-wallet.d.ts.map +1 -0
  193. package/dist/wallet/wallet.d.ts +68 -0
  194. package/dist/wallet/wallet.d.ts.map +1 -0
  195. package/dist/wallet/wallets.d.ts +76 -0
  196. package/dist/wallet/wallets.d.ts.map +1 -0
  197. package/dist/wallet-manager/index.d.ts +6 -0
  198. package/dist/wallet-manager/index.d.ts.map +1 -0
  199. package/dist/wallet-manager/storages/memory-storage.d.ts +9 -0
  200. package/dist/wallet-manager/storages/memory-storage.d.ts.map +1 -0
  201. package/dist/wallet-manager/types.d.ts +42 -0
  202. package/dist/wallet-manager/types.d.ts.map +1 -0
  203. package/dist/wallet-manager/vaults/mnemonic-vault.d.ts +29 -0
  204. package/dist/wallet-manager/vaults/mnemonic-vault.d.ts.map +1 -0
  205. package/dist/wallet-manager/vaults/privatekey-vault.d.ts +29 -0
  206. package/dist/wallet-manager/vaults/privatekey-vault.d.ts.map +1 -0
  207. package/dist/wallet-manager/wallet-manager.d.ts +104 -0
  208. package/dist/wallet-manager/wallet-manager.d.ts.map +1 -0
  209. package/dist/wordlists/index.d.ts +5 -0
  210. package/dist/wordlists/index.d.ts.map +1 -0
  211. package/dist/wordlists/words/english.d.ts +2 -0
  212. package/dist/wordlists/words/english.d.ts.map +1 -0
  213. package/package.json +26 -21
  214. package/dist/account-E9nGNf5X.d.mts +0 -3837
  215. package/dist/account-E9nGNf5X.d.ts +0 -3837
  216. package/dist/configs.d.mts +0 -3
  217. package/dist/index.d.mts +0 -904
  218. 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,32 @@
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 __privateGet = (obj, member, getter) => {
53
+ __accessCheck(obj, member, "read from private field");
54
+ return getter ? getter.call(obj) : member.get(obj);
55
+ };
56
+ var __privateAdd = (obj, member, value) => {
57
+ if (member.has(obj))
58
+ throw TypeError("Cannot add the same private member more than once");
59
+ member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
60
+ };
61
+ var __privateSet = (obj, member, value, setter) => {
62
+ __accessCheck(obj, member, "write to private field");
63
+ setter ? setter.call(obj, value) : member.set(obj, value);
64
+ return value;
65
+ };
66
+ var __privateMethod = (obj, member, method) => {
67
+ __accessCheck(obj, member, "access private method");
68
+ return method;
69
+ };
43
70
 
44
71
  // ../../node_modules/.pnpm/bech32@2.0.0/node_modules/bech32/dist/index.js
45
72
  var require_dist = __commonJS({
@@ -210,7 +237,6 @@
210
237
  // ../../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js
211
238
  var require_bn = __commonJS({
212
239
  "../../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js"(exports, module) {
213
- "use strict";
214
240
  (function(module2, exports2) {
215
241
  "use strict";
216
242
  function assert4(val, msg) {
@@ -5528,7 +5554,6 @@
5528
5554
  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
5555
  var init_lib = __esm({
5530
5556
  "../../node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/lib/index.mjs"() {
5531
- "use strict";
5532
5557
  import_stream = __toESM(__require("stream"), 1);
5533
5558
  import_http = __toESM(__require("http"), 1);
5534
5559
  import_url = __toESM(__require("url"), 1);
@@ -5538,7 +5563,7 @@
5538
5563
  Readable = import_stream.default.Readable;
5539
5564
  BUFFER = Symbol("buffer");
5540
5565
  TYPE = Symbol("type");
5541
- Blob2 = class _Blob {
5566
+ Blob2 = class {
5542
5567
  constructor() {
5543
5568
  this[TYPE] = "";
5544
5569
  const blobParts = arguments[0];
@@ -5557,7 +5582,7 @@
5557
5582
  buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
5558
5583
  } else if (element instanceof ArrayBuffer) {
5559
5584
  buffer = Buffer.from(element);
5560
- } else if (element instanceof _Blob) {
5585
+ } else if (element instanceof Blob2) {
5561
5586
  buffer = element[BUFFER];
5562
5587
  } else {
5563
5588
  buffer = Buffer.from(typeof element === "string" ? element : String(element));
@@ -5619,7 +5644,7 @@
5619
5644
  const span = Math.max(relativeEnd - relativeStart, 0);
5620
5645
  const buffer = this[BUFFER];
5621
5646
  const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
5622
- const blob = new _Blob([], { type: arguments[2] });
5647
+ const blob = new Blob2([], { type: arguments[2] });
5623
5648
  blob[BUFFER] = slicedBuffer;
5624
5649
  return blob;
5625
5650
  }
@@ -5746,7 +5771,7 @@
5746
5771
  invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
5747
5772
  invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
5748
5773
  MAP = Symbol("map");
5749
- Headers2 = class _Headers {
5774
+ Headers2 = class {
5750
5775
  /**
5751
5776
  * Headers class
5752
5777
  *
@@ -5756,7 +5781,7 @@
5756
5781
  constructor() {
5757
5782
  let init = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : void 0;
5758
5783
  this[MAP] = /* @__PURE__ */ Object.create(null);
5759
- if (init instanceof _Headers) {
5784
+ if (init instanceof Headers2) {
5760
5785
  const rawHeaders = init.raw();
5761
5786
  const headerNames = Object.keys(rawHeaders);
5762
5787
  for (const headerName of headerNames) {
@@ -5974,7 +5999,7 @@
5974
5999
  });
5975
6000
  INTERNALS$1 = Symbol("Response internals");
5976
6001
  STATUS_CODES = import_http.default.STATUS_CODES;
5977
- Response2 = class _Response {
6002
+ Response2 = class {
5978
6003
  constructor() {
5979
6004
  let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
5980
6005
  let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -6022,7 +6047,7 @@
6022
6047
  * @return Response
6023
6048
  */
6024
6049
  clone() {
6025
- return new _Response(clone(this), {
6050
+ return new Response2(clone(this), {
6026
6051
  url: this.url,
6027
6052
  status: this.status,
6028
6053
  statusText: this.statusText,
@@ -6053,7 +6078,7 @@
6053
6078
  parse_url = import_url.default.parse;
6054
6079
  format_url = import_url.default.format;
6055
6080
  streamDestructionSupported = "destroy" in import_stream.default.Readable.prototype;
6056
- Request = class _Request {
6081
+ Request = class {
6057
6082
  constructor(input) {
6058
6083
  let init = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6059
6084
  let parsedURL;
@@ -6123,7 +6148,7 @@
6123
6148
  * @return Request
6124
6149
  */
6125
6150
  clone() {
6126
- return new _Request(this);
6151
+ return new Request(this);
6127
6152
  }
6128
6153
  };
6129
6154
  Body.mixIn(Request.prototype);
@@ -6167,7 +6192,6 @@
6167
6192
  // ../../node_modules/.pnpm/cross-fetch@4.0.0/node_modules/cross-fetch/dist/node-ponyfill.js
6168
6193
  var require_node_ponyfill = __commonJS({
6169
6194
  "../../node_modules/.pnpm/cross-fetch@4.0.0/node_modules/cross-fetch/dist/node-ponyfill.js"(exports, module) {
6170
- "use strict";
6171
6195
  var nodeFetch = (init_lib(), __toCommonJS(lib_exports));
6172
6196
  var realFetch = nodeFetch.default || nodeFetch;
6173
6197
  var fetch3 = function(url, options) {
@@ -6333,7 +6357,7 @@
6333
6357
  }
6334
6358
  return firstArg;
6335
6359
  }
6336
- var GraphQLError2 = class _GraphQLError extends Error {
6360
+ var GraphQLError2 = class extends Error {
6337
6361
  /**
6338
6362
  * An array of `{ line, column }` locations within the source GraphQL document
6339
6363
  * which correspond to this error.
@@ -6422,7 +6446,7 @@
6422
6446
  configurable: true
6423
6447
  });
6424
6448
  } else if (Error.captureStackTrace) {
6425
- Error.captureStackTrace(this, _GraphQLError);
6449
+ Error.captureStackTrace(this, GraphQLError2);
6426
6450
  } else {
6427
6451
  Object.defineProperty(this, "stack", {
6428
6452
  value: Error().stack,
@@ -9819,7 +9843,6 @@ spurious results.`);
9819
9843
  // ../../node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js
9820
9844
  var require_delayed_stream = __commonJS({
9821
9845
  "../../node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js"(exports, module) {
9822
- "use strict";
9823
9846
  var Stream2 = __require("stream").Stream;
9824
9847
  var util = __require("util");
9825
9848
  module.exports = DelayedStream;
@@ -9911,7 +9934,6 @@ spurious results.`);
9911
9934
  // ../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js
9912
9935
  var require_combined_stream = __commonJS({
9913
9936
  "../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js"(exports, module) {
9914
- "use strict";
9915
9937
  var util = __require("util");
9916
9938
  var Stream2 = __require("stream").Stream;
9917
9939
  var DelayedStream = require_delayed_stream();
@@ -18608,7 +18630,6 @@ spurious results.`);
18608
18630
  // ../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js
18609
18631
  var require_mime_db = __commonJS({
18610
18632
  "../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js"(exports, module) {
18611
- "use strict";
18612
18633
  module.exports = require_db();
18613
18634
  }
18614
18635
  });
@@ -18707,7 +18728,6 @@ spurious results.`);
18707
18728
  // ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/defer.js
18708
18729
  var require_defer = __commonJS({
18709
18730
  "../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/defer.js"(exports, module) {
18710
- "use strict";
18711
18731
  module.exports = defer;
18712
18732
  function defer(fn) {
18713
18733
  var nextTick = typeof setImmediate == "function" ? setImmediate : typeof process == "object" && typeof process.nextTick == "function" ? process.nextTick : null;
@@ -18723,7 +18743,6 @@ spurious results.`);
18723
18743
  // ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/async.js
18724
18744
  var require_async = __commonJS({
18725
18745
  "../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/async.js"(exports, module) {
18726
- "use strict";
18727
18746
  var defer = require_defer();
18728
18747
  module.exports = async;
18729
18748
  function async(callback) {
@@ -18747,7 +18766,6 @@ spurious results.`);
18747
18766
  // ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/abort.js
18748
18767
  var require_abort = __commonJS({
18749
18768
  "../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/abort.js"(exports, module) {
18750
- "use strict";
18751
18769
  module.exports = abort;
18752
18770
  function abort(state) {
18753
18771
  Object.keys(state.jobs).forEach(clean.bind(state));
@@ -18764,7 +18782,6 @@ spurious results.`);
18764
18782
  // ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/iterate.js
18765
18783
  var require_iterate = __commonJS({
18766
18784
  "../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/iterate.js"(exports, module) {
18767
- "use strict";
18768
18785
  var async = require_async();
18769
18786
  var abort = require_abort();
18770
18787
  module.exports = iterate;
@@ -18798,7 +18815,6 @@ spurious results.`);
18798
18815
  // ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/state.js
18799
18816
  var require_state = __commonJS({
18800
18817
  "../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/state.js"(exports, module) {
18801
- "use strict";
18802
18818
  module.exports = state;
18803
18819
  function state(list, sortMethod) {
18804
18820
  var isNamedList = !Array.isArray(list), initState = {
@@ -18821,7 +18837,6 @@ spurious results.`);
18821
18837
  // ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/terminator.js
18822
18838
  var require_terminator = __commonJS({
18823
18839
  "../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/terminator.js"(exports, module) {
18824
- "use strict";
18825
18840
  var abort = require_abort();
18826
18841
  var async = require_async();
18827
18842
  module.exports = terminator;
@@ -18839,7 +18854,6 @@ spurious results.`);
18839
18854
  // ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/parallel.js
18840
18855
  var require_parallel = __commonJS({
18841
18856
  "../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/parallel.js"(exports, module) {
18842
- "use strict";
18843
18857
  var iterate = require_iterate();
18844
18858
  var initState = require_state();
18845
18859
  var terminator = require_terminator();
@@ -18867,7 +18881,6 @@ spurious results.`);
18867
18881
  // ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serialOrdered.js
18868
18882
  var require_serialOrdered = __commonJS({
18869
18883
  "../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serialOrdered.js"(exports, module) {
18870
- "use strict";
18871
18884
  var iterate = require_iterate();
18872
18885
  var initState = require_state();
18873
18886
  var terminator = require_terminator();
@@ -18902,7 +18915,6 @@ spurious results.`);
18902
18915
  // ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serial.js
18903
18916
  var require_serial = __commonJS({
18904
18917
  "../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serial.js"(exports, module) {
18905
- "use strict";
18906
18918
  var serialOrdered = require_serialOrdered();
18907
18919
  module.exports = serial;
18908
18920
  function serial(list, iterator, callback) {
@@ -18914,7 +18926,6 @@ spurious results.`);
18914
18926
  // ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/index.js
18915
18927
  var require_asynckit = __commonJS({
18916
18928
  "../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/index.js"(exports, module) {
18917
- "use strict";
18918
18929
  module.exports = {
18919
18930
  parallel: require_parallel(),
18920
18931
  serial: require_serial(),
@@ -18926,7 +18937,6 @@ spurious results.`);
18926
18937
  // ../../node_modules/.pnpm/form-data@3.0.1/node_modules/form-data/lib/populate.js
18927
18938
  var require_populate = __commonJS({
18928
18939
  "../../node_modules/.pnpm/form-data@3.0.1/node_modules/form-data/lib/populate.js"(exports, module) {
18929
- "use strict";
18930
18940
  module.exports = function(dst, src) {
18931
18941
  Object.keys(src).forEach(function(prop) {
18932
18942
  dst[prop] = dst[prop] || src[prop];
@@ -18939,7 +18949,6 @@ spurious results.`);
18939
18949
  // ../../node_modules/.pnpm/form-data@3.0.1/node_modules/form-data/lib/form_data.js
18940
18950
  var require_form_data = __commonJS({
18941
18951
  "../../node_modules/.pnpm/form-data@3.0.1/node_modules/form-data/lib/form_data.js"(exports, module) {
18942
- "use strict";
18943
18952
  var CombinedStream = require_combined_stream();
18944
18953
  var util = __require("util");
18945
18954
  var path = __require("path");
@@ -19381,7 +19390,7 @@ spurious results.`);
19381
19390
  var require_types = __commonJS({
19382
19391
  "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/types.js"(exports) {
19383
19392
  "use strict";
19384
- var __extends = exports && exports.__extends || /* @__PURE__ */ function() {
19393
+ var __extends = exports && exports.__extends || function() {
19385
19394
  var extendStatics = function(d, b) {
19386
19395
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
19387
19396
  d2.__proto__ = b2;
@@ -22371,10 +22380,10 @@ spurious results.`);
22371
22380
  return RegId.__wrap(ret3);
22372
22381
  }
22373
22382
  };
22374
- var CompareArgs = class _CompareArgs {
22383
+ var CompareArgs = class {
22375
22384
  static __wrap(ptr) {
22376
22385
  ptr = ptr >>> 0;
22377
- const obj = Object.create(_CompareArgs.prototype);
22386
+ const obj = Object.create(CompareArgs.prototype);
22378
22387
  obj.__wbg_ptr = ptr;
22379
22388
  return obj;
22380
22389
  }
@@ -22435,7 +22444,7 @@ spurious results.`);
22435
22444
  _assertClass(bits, Imm06);
22436
22445
  var ptr0 = bits.__destroy_into_raw();
22437
22446
  const ret3 = wasm$1.compareargs_from_imm(ptr0);
22438
- return ret3 === 0 ? void 0 : _CompareArgs.__wrap(ret3);
22447
+ return ret3 === 0 ? void 0 : CompareArgs.__wrap(ret3);
22439
22448
  }
22440
22449
  };
22441
22450
  var DIV = class {
@@ -22973,10 +22982,10 @@ spurious results.`);
22973
22982
  return RegId.__wrap(ret3);
22974
22983
  }
22975
22984
  };
22976
- var GM = class _GM {
22985
+ var GM = class {
22977
22986
  static __wrap(ptr) {
22978
22987
  ptr = ptr >>> 0;
22979
- const obj = Object.create(_GM.prototype);
22988
+ const obj = Object.create(GM.prototype);
22980
22989
  obj.__wbg_ptr = ptr;
22981
22990
  return obj;
22982
22991
  }
@@ -23029,7 +23038,7 @@ spurious results.`);
23029
23038
  _assertClass(ra, RegId);
23030
23039
  var ptr0 = ra.__destroy_into_raw();
23031
23040
  const ret3 = wasm$1.gm_from_args(ptr0, args);
23032
- return _GM.__wrap(ret3);
23041
+ return GM.__wrap(ret3);
23033
23042
  }
23034
23043
  };
23035
23044
  var GT = class {
@@ -23084,10 +23093,10 @@ spurious results.`);
23084
23093
  return RegId.__wrap(ret3);
23085
23094
  }
23086
23095
  };
23087
- var GTF = class _GTF {
23096
+ var GTF = class {
23088
23097
  static __wrap(ptr) {
23089
23098
  ptr = ptr >>> 0;
23090
- const obj = Object.create(_GTF.prototype);
23099
+ const obj = Object.create(GTF.prototype);
23091
23100
  obj.__wbg_ptr = ptr;
23092
23101
  return obj;
23093
23102
  }
@@ -23154,13 +23163,13 @@ spurious results.`);
23154
23163
  _assertClass(rb, RegId);
23155
23164
  var ptr1 = rb.__destroy_into_raw();
23156
23165
  const ret3 = wasm$1.gtf_from_args(ptr0, ptr1, args);
23157
- return _GTF.__wrap(ret3);
23166
+ return GTF.__wrap(ret3);
23158
23167
  }
23159
23168
  };
23160
- var Imm06 = class _Imm06 {
23169
+ var Imm06 = class {
23161
23170
  static __wrap(ptr) {
23162
23171
  ptr = ptr >>> 0;
23163
- const obj = Object.create(_Imm06.prototype);
23172
+ const obj = Object.create(Imm06.prototype);
23164
23173
  obj.__wbg_ptr = ptr;
23165
23174
  return obj;
23166
23175
  }
@@ -23174,10 +23183,10 @@ spurious results.`);
23174
23183
  wasm$1.__wbg_imm06_free(ptr);
23175
23184
  }
23176
23185
  };
23177
- var Imm12 = class _Imm12 {
23186
+ var Imm12 = class {
23178
23187
  static __wrap(ptr) {
23179
23188
  ptr = ptr >>> 0;
23180
- const obj = Object.create(_Imm12.prototype);
23189
+ const obj = Object.create(Imm12.prototype);
23181
23190
  obj.__wbg_ptr = ptr;
23182
23191
  return obj;
23183
23192
  }
@@ -23191,10 +23200,10 @@ spurious results.`);
23191
23200
  wasm$1.__wbg_imm12_free(ptr);
23192
23201
  }
23193
23202
  };
23194
- var Imm18 = class _Imm18 {
23203
+ var Imm18 = class {
23195
23204
  static __wrap(ptr) {
23196
23205
  ptr = ptr >>> 0;
23197
- const obj = Object.create(_Imm18.prototype);
23206
+ const obj = Object.create(Imm18.prototype);
23198
23207
  obj.__wbg_ptr = ptr;
23199
23208
  return obj;
23200
23209
  }
@@ -23208,10 +23217,10 @@ spurious results.`);
23208
23217
  wasm$1.__wbg_imm18_free(ptr);
23209
23218
  }
23210
23219
  };
23211
- var Imm24 = class _Imm24 {
23220
+ var Imm24 = class {
23212
23221
  static __wrap(ptr) {
23213
23222
  ptr = ptr >>> 0;
23214
- const obj = Object.create(_Imm24.prototype);
23223
+ const obj = Object.create(Imm24.prototype);
23215
23224
  obj.__wbg_ptr = ptr;
23216
23225
  return obj;
23217
23226
  }
@@ -23225,10 +23234,10 @@ spurious results.`);
23225
23234
  wasm$1.__wbg_imm24_free(ptr);
23226
23235
  }
23227
23236
  };
23228
- var Instruction = class _Instruction {
23237
+ var Instruction = class {
23229
23238
  static __wrap(ptr) {
23230
23239
  ptr = ptr >>> 0;
23231
- const obj = Object.create(_Instruction.prototype);
23240
+ const obj = Object.create(Instruction.prototype);
23232
23241
  obj.__wbg_ptr = ptr;
23233
23242
  return obj;
23234
23243
  }
@@ -25421,10 +25430,10 @@ spurious results.`);
25421
25430
  return RegId.__wrap(ret3);
25422
25431
  }
25423
25432
  };
25424
- var RegId = class _RegId {
25433
+ var RegId = class {
25425
25434
  static __wrap(ptr) {
25426
25435
  ptr = ptr >>> 0;
25427
- const obj = Object.create(_RegId.prototype);
25436
+ const obj = Object.create(RegId.prototype);
25428
25437
  obj.__wbg_ptr = ptr;
25429
25438
  return obj;
25430
25439
  }
@@ -25446,7 +25455,7 @@ spurious results.`);
25446
25455
  */
25447
25456
  static new_checked(u) {
25448
25457
  const ret3 = wasm$1.regid_new_checked(u);
25449
- return ret3 === 0 ? void 0 : _RegId.__wrap(ret3);
25458
+ return ret3 === 0 ? void 0 : RegId.__wrap(ret3);
25450
25459
  }
25451
25460
  /**
25452
25461
  * Received balance for this context.
@@ -25454,7 +25463,7 @@ spurious results.`);
25454
25463
  */
25455
25464
  static bal() {
25456
25465
  const ret3 = wasm$1.regid_bal();
25457
- return _RegId.__wrap(ret3);
25466
+ return RegId.__wrap(ret3);
25458
25467
  }
25459
25468
  /**
25460
25469
  * Remaining gas in the context.
@@ -25462,7 +25471,7 @@ spurious results.`);
25462
25471
  */
25463
25472
  static cgas() {
25464
25473
  const ret3 = wasm$1.regid_cgas();
25465
- return _RegId.__wrap(ret3);
25474
+ return RegId.__wrap(ret3);
25466
25475
  }
25467
25476
  /**
25468
25477
  * Error codes for particular operations.
@@ -25470,7 +25479,7 @@ spurious results.`);
25470
25479
  */
25471
25480
  static err() {
25472
25481
  const ret3 = wasm$1.regid_err();
25473
- return _RegId.__wrap(ret3);
25482
+ return RegId.__wrap(ret3);
25474
25483
  }
25475
25484
  /**
25476
25485
  * Flags register.
@@ -25478,7 +25487,7 @@ spurious results.`);
25478
25487
  */
25479
25488
  static flag() {
25480
25489
  const ret3 = wasm$1.regid_flag();
25481
- return _RegId.__wrap(ret3);
25490
+ return RegId.__wrap(ret3);
25482
25491
  }
25483
25492
  /**
25484
25493
  * Frame pointer. Memory address of beginning of current call frame.
@@ -25486,7 +25495,7 @@ spurious results.`);
25486
25495
  */
25487
25496
  static fp() {
25488
25497
  const ret3 = wasm$1.regid_fp();
25489
- return _RegId.__wrap(ret3);
25498
+ return RegId.__wrap(ret3);
25490
25499
  }
25491
25500
  /**
25492
25501
  * Remaining gas globally.
@@ -25494,7 +25503,7 @@ spurious results.`);
25494
25503
  */
25495
25504
  static ggas() {
25496
25505
  const ret3 = wasm$1.regid_ggas();
25497
- return _RegId.__wrap(ret3);
25506
+ return RegId.__wrap(ret3);
25498
25507
  }
25499
25508
  /**
25500
25509
  * Heap pointer. Memory address below the current bottom of the heap (points to free
@@ -25503,7 +25512,7 @@ spurious results.`);
25503
25512
  */
25504
25513
  static hp() {
25505
25514
  const ret3 = wasm$1.regid_hp();
25506
- return _RegId.__wrap(ret3);
25515
+ return RegId.__wrap(ret3);
25507
25516
  }
25508
25517
  /**
25509
25518
  * Instructions start. Pointer to the start of the currently-executing code.
@@ -25511,7 +25520,7 @@ spurious results.`);
25511
25520
  */
25512
25521
  static is() {
25513
25522
  const ret3 = wasm$1.regid_is();
25514
- return _RegId.__wrap(ret3);
25523
+ return RegId.__wrap(ret3);
25515
25524
  }
25516
25525
  /**
25517
25526
  * Contains overflow/underflow of addition, subtraction, and multiplication.
@@ -25519,7 +25528,7 @@ spurious results.`);
25519
25528
  */
25520
25529
  static of() {
25521
25530
  const ret3 = wasm$1.regid_of();
25522
- return _RegId.__wrap(ret3);
25531
+ return RegId.__wrap(ret3);
25523
25532
  }
25524
25533
  /**
25525
25534
  * Contains one (1), for convenience.
@@ -25527,7 +25536,7 @@ spurious results.`);
25527
25536
  */
25528
25537
  static one() {
25529
25538
  const ret3 = wasm$1.regid_one();
25530
- return _RegId.__wrap(ret3);
25539
+ return RegId.__wrap(ret3);
25531
25540
  }
25532
25541
  /**
25533
25542
  * The program counter. Memory address of the current instruction.
@@ -25535,7 +25544,7 @@ spurious results.`);
25535
25544
  */
25536
25545
  static pc() {
25537
25546
  const ret3 = wasm$1.regid_pc();
25538
- return _RegId.__wrap(ret3);
25547
+ return RegId.__wrap(ret3);
25539
25548
  }
25540
25549
  /**
25541
25550
  * Return value or pointer.
@@ -25543,7 +25552,7 @@ spurious results.`);
25543
25552
  */
25544
25553
  static ret() {
25545
25554
  const ret3 = wasm$1.regid_ret();
25546
- return _RegId.__wrap(ret3);
25555
+ return RegId.__wrap(ret3);
25547
25556
  }
25548
25557
  /**
25549
25558
  * Return value length in bytes.
@@ -25551,7 +25560,7 @@ spurious results.`);
25551
25560
  */
25552
25561
  static retl() {
25553
25562
  const ret3 = wasm$1.regid_retl();
25554
- return _RegId.__wrap(ret3);
25563
+ return RegId.__wrap(ret3);
25555
25564
  }
25556
25565
  /**
25557
25566
  * Stack pointer. Memory address on top of current writable stack area (points to
@@ -25560,7 +25569,7 @@ spurious results.`);
25560
25569
  */
25561
25570
  static sp() {
25562
25571
  const ret3 = wasm$1.regid_sp();
25563
- return _RegId.__wrap(ret3);
25572
+ return RegId.__wrap(ret3);
25564
25573
  }
25565
25574
  /**
25566
25575
  * Stack start pointer. Memory address of bottom of current writable stack area.
@@ -25568,7 +25577,7 @@ spurious results.`);
25568
25577
  */
25569
25578
  static spp() {
25570
25579
  const ret3 = wasm$1.regid_spp();
25571
- return _RegId.__wrap(ret3);
25580
+ return RegId.__wrap(ret3);
25572
25581
  }
25573
25582
  /**
25574
25583
  * Smallest writable register.
@@ -25576,7 +25585,7 @@ spurious results.`);
25576
25585
  */
25577
25586
  static writable() {
25578
25587
  const ret3 = wasm$1.regid_writable();
25579
- return _RegId.__wrap(ret3);
25588
+ return RegId.__wrap(ret3);
25580
25589
  }
25581
25590
  /**
25582
25591
  * Contains zero (0), for convenience.
@@ -25584,7 +25593,7 @@ spurious results.`);
25584
25593
  */
25585
25594
  static zero() {
25586
25595
  const ret3 = wasm$1.regid_zero();
25587
- return _RegId.__wrap(ret3);
25596
+ return RegId.__wrap(ret3);
25588
25597
  }
25589
25598
  /**
25590
25599
  * Construct a register ID from the given value.
@@ -26639,10 +26648,10 @@ spurious results.`);
26639
26648
  return RegId.__wrap(ret3);
26640
26649
  }
26641
26650
  };
26642
- var WDCM = class _WDCM {
26651
+ var WDCM = class {
26643
26652
  static __wrap(ptr) {
26644
26653
  ptr = ptr >>> 0;
26645
- const obj = Object.create(_WDCM.prototype);
26654
+ const obj = Object.create(WDCM.prototype);
26646
26655
  obj.__wbg_ptr = ptr;
26647
26656
  return obj;
26648
26657
  }
@@ -26725,13 +26734,13 @@ spurious results.`);
26725
26734
  _assertClass(args, CompareArgs);
26726
26735
  var ptr3 = args.__destroy_into_raw();
26727
26736
  const ret3 = wasm$1.wdcm_from_args(ptr0, ptr1, ptr2, ptr3);
26728
- return _WDCM.__wrap(ret3);
26737
+ return WDCM.__wrap(ret3);
26729
26738
  }
26730
26739
  };
26731
- var WDDV = class _WDDV {
26740
+ var WDDV = class {
26732
26741
  static __wrap(ptr) {
26733
26742
  ptr = ptr >>> 0;
26734
- const obj = Object.create(_WDDV.prototype);
26743
+ const obj = Object.create(WDDV.prototype);
26735
26744
  obj.__wbg_ptr = ptr;
26736
26745
  return obj;
26737
26746
  }
@@ -26814,7 +26823,7 @@ spurious results.`);
26814
26823
  _assertClass(args, DivArgs);
26815
26824
  var ptr3 = args.__destroy_into_raw();
26816
26825
  const ret3 = wasm$1.wddv_from_args(ptr0, ptr1, ptr2, ptr3);
26817
- return _WDDV.__wrap(ret3);
26826
+ return WDDV.__wrap(ret3);
26818
26827
  }
26819
26828
  };
26820
26829
  var WDMD = class {
@@ -26880,10 +26889,10 @@ spurious results.`);
26880
26889
  return RegId.__wrap(ret3);
26881
26890
  }
26882
26891
  };
26883
- var WDML = class _WDML {
26892
+ var WDML = class {
26884
26893
  static __wrap(ptr) {
26885
26894
  ptr = ptr >>> 0;
26886
- const obj = Object.create(_WDML.prototype);
26895
+ const obj = Object.create(WDML.prototype);
26887
26896
  obj.__wbg_ptr = ptr;
26888
26897
  return obj;
26889
26898
  }
@@ -26966,7 +26975,7 @@ spurious results.`);
26966
26975
  _assertClass(args, MulArgs);
26967
26976
  var ptr3 = args.__destroy_into_raw();
26968
26977
  const ret3 = wasm$1.wdml_from_args(ptr0, ptr1, ptr2, ptr3);
26969
- return _WDML.__wrap(ret3);
26978
+ return WDML.__wrap(ret3);
26970
26979
  }
26971
26980
  };
26972
26981
  var WDMM = class {
@@ -27032,10 +27041,10 @@ spurious results.`);
27032
27041
  return RegId.__wrap(ret3);
27033
27042
  }
27034
27043
  };
27035
- var WDOP = class _WDOP {
27044
+ var WDOP = class {
27036
27045
  static __wrap(ptr) {
27037
27046
  ptr = ptr >>> 0;
27038
- const obj = Object.create(_WDOP.prototype);
27047
+ const obj = Object.create(WDOP.prototype);
27039
27048
  obj.__wbg_ptr = ptr;
27040
27049
  return obj;
27041
27050
  }
@@ -27118,7 +27127,7 @@ spurious results.`);
27118
27127
  _assertClass(args, MathArgs);
27119
27128
  var ptr3 = args.__destroy_into_raw();
27120
27129
  const ret3 = wasm$1.wdop_from_args(ptr0, ptr1, ptr2, ptr3);
27121
- return _WDOP.__wrap(ret3);
27130
+ return WDOP.__wrap(ret3);
27122
27131
  }
27123
27132
  };
27124
27133
  var WQAM = class {
@@ -27184,10 +27193,10 @@ spurious results.`);
27184
27193
  return RegId.__wrap(ret3);
27185
27194
  }
27186
27195
  };
27187
- var WQCM = class _WQCM {
27196
+ var WQCM = class {
27188
27197
  static __wrap(ptr) {
27189
27198
  ptr = ptr >>> 0;
27190
- const obj = Object.create(_WQCM.prototype);
27199
+ const obj = Object.create(WQCM.prototype);
27191
27200
  obj.__wbg_ptr = ptr;
27192
27201
  return obj;
27193
27202
  }
@@ -27270,13 +27279,13 @@ spurious results.`);
27270
27279
  _assertClass(args, CompareArgs);
27271
27280
  var ptr3 = args.__destroy_into_raw();
27272
27281
  const ret3 = wasm$1.wdcm_from_args(ptr0, ptr1, ptr2, ptr3);
27273
- return _WQCM.__wrap(ret3);
27282
+ return WQCM.__wrap(ret3);
27274
27283
  }
27275
27284
  };
27276
- var WQDV = class _WQDV {
27285
+ var WQDV = class {
27277
27286
  static __wrap(ptr) {
27278
27287
  ptr = ptr >>> 0;
27279
- const obj = Object.create(_WQDV.prototype);
27288
+ const obj = Object.create(WQDV.prototype);
27280
27289
  obj.__wbg_ptr = ptr;
27281
27290
  return obj;
27282
27291
  }
@@ -27359,7 +27368,7 @@ spurious results.`);
27359
27368
  _assertClass(args, DivArgs);
27360
27369
  var ptr3 = args.__destroy_into_raw();
27361
27370
  const ret3 = wasm$1.wddv_from_args(ptr0, ptr1, ptr2, ptr3);
27362
- return _WQDV.__wrap(ret3);
27371
+ return WQDV.__wrap(ret3);
27363
27372
  }
27364
27373
  };
27365
27374
  var WQMD = class {
@@ -27425,10 +27434,10 @@ spurious results.`);
27425
27434
  return RegId.__wrap(ret3);
27426
27435
  }
27427
27436
  };
27428
- var WQML = class _WQML {
27437
+ var WQML = class {
27429
27438
  static __wrap(ptr) {
27430
27439
  ptr = ptr >>> 0;
27431
- const obj = Object.create(_WQML.prototype);
27440
+ const obj = Object.create(WQML.prototype);
27432
27441
  obj.__wbg_ptr = ptr;
27433
27442
  return obj;
27434
27443
  }
@@ -27511,7 +27520,7 @@ spurious results.`);
27511
27520
  _assertClass(args, MulArgs);
27512
27521
  var ptr3 = args.__destroy_into_raw();
27513
27522
  const ret3 = wasm$1.wdml_from_args(ptr0, ptr1, ptr2, ptr3);
27514
- return _WQML.__wrap(ret3);
27523
+ return WQML.__wrap(ret3);
27515
27524
  }
27516
27525
  };
27517
27526
  var WQMM = class {
@@ -27577,10 +27586,10 @@ spurious results.`);
27577
27586
  return RegId.__wrap(ret3);
27578
27587
  }
27579
27588
  };
27580
- var WQOP = class _WQOP {
27589
+ var WQOP = class {
27581
27590
  static __wrap(ptr) {
27582
27591
  ptr = ptr >>> 0;
27583
- const obj = Object.create(_WQOP.prototype);
27592
+ const obj = Object.create(WQOP.prototype);
27584
27593
  obj.__wbg_ptr = ptr;
27585
27594
  return obj;
27586
27595
  }
@@ -27663,7 +27672,7 @@ spurious results.`);
27663
27672
  _assertClass(args, MathArgs);
27664
27673
  var ptr3 = args.__destroy_into_raw();
27665
27674
  const ret3 = wasm$1.wdop_from_args(ptr0, ptr1, ptr2, ptr3);
27666
- return _WQOP.__wrap(ret3);
27675
+ return WQOP.__wrap(ret3);
27667
27676
  }
27668
27677
  };
27669
27678
  var XOR = class {
@@ -28823,7 +28832,7 @@ spurious results.`);
28823
28832
  }
28824
28833
  B.fill(0);
28825
28834
  }
28826
- var Keccak = class _Keccak extends Hash {
28835
+ var Keccak = class extends Hash {
28827
28836
  // NOTE: we accept arguments in bytes instead of bits here.
28828
28837
  constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
28829
28838
  super();
@@ -28914,7 +28923,7 @@ spurious results.`);
28914
28923
  }
28915
28924
  _cloneInto(to) {
28916
28925
  const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
28917
- to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
28926
+ to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
28918
28927
  to.state32.set(this.state32);
28919
28928
  to.pos = this.pos;
28920
28929
  to.posOut = this.posOut;
@@ -28993,6 +29002,12 @@ This unreleased fuel-core build may include features and updates not yet support
28993
29002
  var versions = getBuiltinVersions();
28994
29003
 
28995
29004
  // ../errors/dist/index.mjs
29005
+ var __defProp2 = Object.defineProperty;
29006
+ var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
29007
+ var __publicField2 = (obj, key, value) => {
29008
+ __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
29009
+ return value;
29010
+ };
28996
29011
  var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
28997
29012
  ErrorCode2["NO_ABIS_FOUND"] = "no-abis-found";
28998
29013
  ErrorCode2["ABI_TYPES_AND_VALUES_MISMATCH"] = "abi-types-and-values-mismatch";
@@ -29071,8 +29086,7 @@ This unreleased fuel-core build may include features and updates not yet support
29071
29086
  ErrorCode2["STREAM_PARSING_ERROR"] = "stream-parsing-error";
29072
29087
  return ErrorCode2;
29073
29088
  })(ErrorCode || {});
29074
- var FuelError = class _FuelError extends Error {
29075
- static CODES = ErrorCode;
29089
+ var _FuelError = class extends Error {
29076
29090
  VERSIONS = versions;
29077
29091
  static parse(e) {
29078
29092
  const error = e;
@@ -29103,8 +29117,16 @@ This unreleased fuel-core build may include features and updates not yet support
29103
29117
  return { code, name, message, VERSIONS };
29104
29118
  }
29105
29119
  };
29120
+ var FuelError = _FuelError;
29121
+ __publicField2(FuelError, "CODES", ErrorCode);
29106
29122
 
29107
29123
  // ../utils/dist/index.mjs
29124
+ var __defProp3 = Object.defineProperty;
29125
+ var __defNormalProp3 = (obj, key, value) => key in obj ? __defProp3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
29126
+ var __publicField3 = (obj, key, value) => {
29127
+ __defNormalProp3(obj, typeof key !== "symbol" ? key + "" : key, value);
29128
+ return value;
29129
+ };
29108
29130
  var chunkAndPadBytes = (bytes3, chunkSize) => {
29109
29131
  const chunks = [];
29110
29132
  for (let offset = 0; offset < bytes3.length; offset += chunkSize) {
@@ -29170,8 +29192,7 @@ This unreleased fuel-core build may include features and updates not yet support
29170
29192
  var tai64ToUnixSeconds = (tai64) => Number(BigInt(tai64) - TAI64_UNIX_OFFSET);
29171
29193
  var unixSecondsToTai64 = (unixSeconds) => String(BigInt(unixSeconds) + TAI64_UNIX_OFFSET);
29172
29194
  var tai64ToUnixMilliseconds = (tai64) => secondsToMs(tai64ToUnixSeconds(tai64));
29173
- var DateTime = class _DateTime extends Date {
29174
- static TAI64_NULL = "";
29195
+ var _DateTime = class extends Date {
29175
29196
  /**
29176
29197
  * Generates a new DateTime instance from a Tai64 timestamp.
29177
29198
  *
@@ -29222,6 +29243,15 @@ This unreleased fuel-core build may include features and updates not yet support
29222
29243
  return msToSeconds(this.getTime());
29223
29244
  }
29224
29245
  };
29246
+ var DateTime = _DateTime;
29247
+ __publicField3(DateTime, "TAI64_NULL", "");
29248
+ function sleep(time) {
29249
+ return new Promise((resolve) => {
29250
+ setTimeout(() => {
29251
+ resolve(true);
29252
+ }, time);
29253
+ });
29254
+ }
29225
29255
 
29226
29256
  // ../crypto/dist/index.mjs
29227
29257
  var import_crypto8 = __toESM(__require("crypto"), 1);
@@ -29935,7 +29965,7 @@ This unreleased fuel-core build may include features and updates not yet support
29935
29965
  }
29936
29966
  B.fill(0);
29937
29967
  }
29938
- var Keccak2 = class _Keccak extends Hash2 {
29968
+ var Keccak2 = class extends Hash2 {
29939
29969
  // NOTE: we accept arguments in bytes instead of bits here.
29940
29970
  constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
29941
29971
  super();
@@ -30026,7 +30056,7 @@ This unreleased fuel-core build may include features and updates not yet support
30026
30056
  }
30027
30057
  _cloneInto(to) {
30028
30058
  const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
30029
- to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
30059
+ to || (to = new Keccak2(blockLen, suffix, outputLen, enableXOF, rounds));
30030
30060
  to.state32.set(this.state32);
30031
30061
  to.pos = this.pos;
30032
30062
  to.posOut = this.posOut;
@@ -30414,7 +30444,7 @@ This unreleased fuel-core build may include features and updates not yet support
30414
30444
 
30415
30445
  // ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/providers/plugins-network.js
30416
30446
  var EnsAddress = "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
30417
- var NetworkPlugin = class _NetworkPlugin {
30447
+ var NetworkPlugin = class {
30418
30448
  /**
30419
30449
  * The name of the plugin.
30420
30450
  *
@@ -30432,10 +30462,10 @@ This unreleased fuel-core build may include features and updates not yet support
30432
30462
  * Creates a copy of this plugin.
30433
30463
  */
30434
30464
  clone() {
30435
- return new _NetworkPlugin(this.name);
30465
+ return new NetworkPlugin(this.name);
30436
30466
  }
30437
30467
  };
30438
- var GasCostPlugin = class _GasCostPlugin extends NetworkPlugin {
30468
+ var GasCostPlugin = class extends NetworkPlugin {
30439
30469
  /**
30440
30470
  * The block number to treat these values as valid from.
30441
30471
  *
@@ -30495,10 +30525,10 @@ This unreleased fuel-core build may include features and updates not yet support
30495
30525
  defineProperties(this, props);
30496
30526
  }
30497
30527
  clone() {
30498
- return new _GasCostPlugin(this.effectiveBlock, this);
30528
+ return new GasCostPlugin(this.effectiveBlock, this);
30499
30529
  }
30500
30530
  };
30501
- var EnsPlugin = class _EnsPlugin extends NetworkPlugin {
30531
+ var EnsPlugin = class extends NetworkPlugin {
30502
30532
  /**
30503
30533
  * The ENS Registrty Contract address.
30504
30534
  */
@@ -30520,7 +30550,7 @@ This unreleased fuel-core build may include features and updates not yet support
30520
30550
  });
30521
30551
  }
30522
30552
  clone() {
30523
- return new _EnsPlugin(this.address, this.targetNetwork);
30553
+ return new EnsPlugin(this.address, this.targetNetwork);
30524
30554
  }
30525
30555
  };
30526
30556
  var FetchUrlFeeDataNetworkPlugin = class extends NetworkPlugin {
@@ -30555,7 +30585,7 @@ This unreleased fuel-core build may include features and updates not yet support
30555
30585
 
30556
30586
  // ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/providers/network.js
30557
30587
  var Networks = /* @__PURE__ */ new Map();
30558
- var Network = class _Network {
30588
+ var Network = class {
30559
30589
  #name;
30560
30590
  #chainId;
30561
30591
  #plugins;
@@ -30670,7 +30700,7 @@ This unreleased fuel-core build may include features and updates not yet support
30670
30700
  * Create a copy of this Network.
30671
30701
  */
30672
30702
  clone() {
30673
- const clone4 = new _Network(this.name, this.chainId);
30703
+ const clone4 = new Network(this.name, this.chainId);
30674
30704
  this.plugins.forEach((plugin) => {
30675
30705
  clone4.attachPlugin(plugin.clone());
30676
30706
  });
@@ -30711,7 +30741,7 @@ This unreleased fuel-core build may include features and updates not yet support
30711
30741
  static from(network) {
30712
30742
  injectCommonNetworks();
30713
30743
  if (network == null) {
30714
- return _Network.from("mainnet");
30744
+ return Network.from("mainnet");
30715
30745
  }
30716
30746
  if (typeof network === "number") {
30717
30747
  network = BigInt(network);
@@ -30722,7 +30752,7 @@ This unreleased fuel-core build may include features and updates not yet support
30722
30752
  return networkFunc();
30723
30753
  }
30724
30754
  if (typeof network === "bigint") {
30725
- return new _Network("unknown", network);
30755
+ return new Network("unknown", network);
30726
30756
  }
30727
30757
  assertArgument(false, "unknown network", "network", network);
30728
30758
  }
@@ -30732,7 +30762,7 @@ This unreleased fuel-core build may include features and updates not yet support
30732
30762
  }
30733
30763
  if (typeof network === "object") {
30734
30764
  assertArgument(typeof network.name === "string" && typeof network.chainId === "number", "invalid network object name or chainId", "network", network);
30735
- const custom = new _Network(network.name, network.chainId);
30765
+ const custom = new Network(network.name, network.chainId);
30736
30766
  if (network.ensAddress || network.ensNetwork != null) {
30737
30767
  custom.attachPlugin(new EnsPlugin(network.ensAddress, network.ensNetwork));
30738
30768
  }
@@ -31050,7 +31080,7 @@ This unreleased fuel-core build may include features and updates not yet support
31050
31080
  }
31051
31081
  return address.replace("0x", "0x000000000000000000000000");
31052
31082
  };
31053
- var Address = class _Address extends AbstractAddress {
31083
+ var Address = class extends AbstractAddress {
31054
31084
  // #region address-2
31055
31085
  bech32Address;
31056
31086
  // #endregion address-2
@@ -31164,7 +31194,7 @@ This unreleased fuel-core build may include features and updates not yet support
31164
31194
  throw new FuelError(FuelError.CODES.INVALID_PUBLIC_KEY, `Invalid Public Key: ${publicKey}.`);
31165
31195
  }
31166
31196
  const b256Address = hexlify(sha256(arrayify(publicKey)));
31167
- return new _Address(toBech32(b256Address));
31197
+ return new Address(toBech32(b256Address));
31168
31198
  }
31169
31199
  /**
31170
31200
  * Takes a B256 Address and creates an `Address`
@@ -31179,7 +31209,7 @@ This unreleased fuel-core build may include features and updates not yet support
31179
31209
  `Invalid B256 Address: ${b256Address}.`
31180
31210
  );
31181
31211
  }
31182
- return new _Address(toBech32(b256Address));
31212
+ return new Address(toBech32(b256Address));
31183
31213
  }
31184
31214
  /**
31185
31215
  * Creates an `Address` with a randomized `bech32Address` property
@@ -31196,7 +31226,7 @@ This unreleased fuel-core build may include features and updates not yet support
31196
31226
  * @returns A new `Address` instance
31197
31227
  */
31198
31228
  static fromString(address) {
31199
- return isBech32(address) ? new _Address(address) : this.fromB256(address);
31229
+ return isBech32(address) ? new Address(address) : this.fromB256(address);
31200
31230
  }
31201
31231
  /**
31202
31232
  * Takes an ambiguous string or address and creates an `Address`
@@ -31215,19 +31245,19 @@ This unreleased fuel-core build may include features and updates not yet support
31215
31245
  */
31216
31246
  static fromDynamicInput(address) {
31217
31247
  if (typeof address !== "string" && "toB256" in address) {
31218
- return _Address.fromB256(address.toB256());
31248
+ return Address.fromB256(address.toB256());
31219
31249
  }
31220
31250
  if (isPublicKey(address)) {
31221
- return _Address.fromPublicKey(address);
31251
+ return Address.fromPublicKey(address);
31222
31252
  }
31223
31253
  if (isBech32(address)) {
31224
- return new _Address(address);
31254
+ return new Address(address);
31225
31255
  }
31226
31256
  if (isB256(address)) {
31227
- return _Address.fromB256(address);
31257
+ return Address.fromB256(address);
31228
31258
  }
31229
31259
  if (isEvmAddress(address)) {
31230
- return _Address.fromEvmAddress(address);
31260
+ return Address.fromEvmAddress(address);
31231
31261
  }
31232
31262
  throw new FuelError(
31233
31263
  FuelError.CODES.PARSE_FAILED,
@@ -31247,7 +31277,7 @@ This unreleased fuel-core build may include features and updates not yet support
31247
31277
  );
31248
31278
  }
31249
31279
  const paddedAddress = padFirst12BytesOfEvmAddress(evmAddress);
31250
- return new _Address(toBech32(paddedAddress));
31280
+ return new Address(toBech32(paddedAddress));
31251
31281
  }
31252
31282
  };
31253
31283
 
@@ -31275,12 +31305,12 @@ This unreleased fuel-core build may include features and updates not yet support
31275
31305
  const decimalPortion = decimals ? `.${decimals}` : "";
31276
31306
  return `${units}${decimalPortion}`;
31277
31307
  }
31278
- var BN = class _BN extends import_bn.default {
31308
+ var BN = class extends import_bn.default {
31279
31309
  MAX_U64 = "0xFFFFFFFFFFFFFFFF";
31280
31310
  constructor(value, base, endian) {
31281
31311
  let bnValue = value;
31282
31312
  let bnBase = base;
31283
- if (_BN.isBN(value)) {
31313
+ if (BN.isBN(value)) {
31284
31314
  bnValue = value.toArray();
31285
31315
  } else if (typeof value === "string" && value.slice(0, 2) === "0x") {
31286
31316
  bnValue = value.substring(2);
@@ -31393,26 +31423,26 @@ This unreleased fuel-core build may include features and updates not yet support
31393
31423
  // END ANCHOR: OVERRIDES to accept better inputs
31394
31424
  // ANCHOR: OVERRIDES to output our BN type
31395
31425
  sqr() {
31396
- return new _BN(super.sqr().toArray());
31426
+ return new BN(super.sqr().toArray());
31397
31427
  }
31398
31428
  neg() {
31399
- return new _BN(super.neg().toArray());
31429
+ return new BN(super.neg().toArray());
31400
31430
  }
31401
31431
  abs() {
31402
- return new _BN(super.abs().toArray());
31432
+ return new BN(super.abs().toArray());
31403
31433
  }
31404
31434
  toTwos(width) {
31405
- return new _BN(super.toTwos(width).toArray());
31435
+ return new BN(super.toTwos(width).toArray());
31406
31436
  }
31407
31437
  fromTwos(width) {
31408
- return new _BN(super.fromTwos(width).toArray());
31438
+ return new BN(super.fromTwos(width).toArray());
31409
31439
  }
31410
31440
  // END ANCHOR: OVERRIDES to output our BN type
31411
31441
  // ANCHOR: OVERRIDES to avoid losing references
31412
31442
  caller(v, methodName) {
31413
- const output3 = super[methodName](new _BN(v));
31414
- if (_BN.isBN(output3)) {
31415
- return new _BN(output3.toArray());
31443
+ const output3 = super[methodName](new BN(v));
31444
+ if (BN.isBN(output3)) {
31445
+ return new BN(output3.toArray());
31416
31446
  }
31417
31447
  if (typeof output3 === "boolean") {
31418
31448
  return output3;
@@ -31420,32 +31450,32 @@ This unreleased fuel-core build may include features and updates not yet support
31420
31450
  return output3;
31421
31451
  }
31422
31452
  clone() {
31423
- return new _BN(this.toArray());
31453
+ return new BN(this.toArray());
31424
31454
  }
31425
31455
  mulTo(num, out) {
31426
31456
  const output3 = new import_bn.default(this.toArray()).mulTo(num, out);
31427
- return new _BN(output3.toArray());
31457
+ return new BN(output3.toArray());
31428
31458
  }
31429
31459
  egcd(p) {
31430
31460
  const { a, b, gcd } = new import_bn.default(this.toArray()).egcd(p);
31431
31461
  return {
31432
- a: new _BN(a.toArray()),
31433
- b: new _BN(b.toArray()),
31434
- gcd: new _BN(gcd.toArray())
31462
+ a: new BN(a.toArray()),
31463
+ b: new BN(b.toArray()),
31464
+ gcd: new BN(gcd.toArray())
31435
31465
  };
31436
31466
  }
31437
31467
  divmod(num, mode, positive) {
31438
- const { div, mod: mod2 } = new import_bn.default(this.toArray()).divmod(new _BN(num), mode, positive);
31468
+ const { div, mod: mod2 } = new import_bn.default(this.toArray()).divmod(new BN(num), mode, positive);
31439
31469
  return {
31440
- div: new _BN(div?.toArray()),
31441
- mod: new _BN(mod2?.toArray())
31470
+ div: new BN(div?.toArray()),
31471
+ mod: new BN(mod2?.toArray())
31442
31472
  };
31443
31473
  }
31444
31474
  maxU64() {
31445
- return this.gte(this.MAX_U64) ? new _BN(this.MAX_U64) : this;
31475
+ return this.gte(this.MAX_U64) ? new BN(this.MAX_U64) : this;
31446
31476
  }
31447
31477
  normalizeZeroToOne() {
31448
- return this.isZero() ? new _BN(1) : this;
31478
+ return this.isZero() ? new BN(1) : this;
31449
31479
  }
31450
31480
  // END ANCHOR: OVERRIDES to avoid losing references
31451
31481
  };
@@ -31530,6 +31560,25 @@ This unreleased fuel-core build may include features and updates not yet support
31530
31560
  }
31531
31561
 
31532
31562
  // ../abi-coder/dist/index.mjs
31563
+ var __defProp4 = Object.defineProperty;
31564
+ var __defNormalProp4 = (obj, key, value) => key in obj ? __defProp4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
31565
+ var __publicField4 = (obj, key, value) => {
31566
+ __defNormalProp4(obj, typeof key !== "symbol" ? key + "" : key, value);
31567
+ return value;
31568
+ };
31569
+ var __accessCheck2 = (obj, member, msg) => {
31570
+ if (!member.has(obj))
31571
+ throw TypeError("Cannot " + msg);
31572
+ };
31573
+ var __privateAdd2 = (obj, member, value) => {
31574
+ if (member.has(obj))
31575
+ throw TypeError("Cannot add the same private member more than once");
31576
+ member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
31577
+ };
31578
+ var __privateMethod2 = (obj, member, method) => {
31579
+ __accessCheck2(obj, member, "access private method");
31580
+ return method;
31581
+ };
31533
31582
  var Coder = class {
31534
31583
  name;
31535
31584
  type;
@@ -31868,10 +31917,12 @@ This unreleased fuel-core build may include features and updates not yet support
31868
31917
  return [true, offset + this.paddingLength];
31869
31918
  }
31870
31919
  };
31920
+ var _getPaddedData;
31921
+ var getPaddedData_fn;
31871
31922
  var ByteCoder = class extends Coder {
31872
- static memorySize = 1;
31873
31923
  constructor() {
31874
31924
  super("struct", "struct Bytes", BASE_VECTOR_OFFSET);
31925
+ __privateAdd2(this, _getPaddedData);
31875
31926
  }
31876
31927
  encode(value) {
31877
31928
  if (!Array.isArray(value)) {
@@ -31879,7 +31930,7 @@ This unreleased fuel-core build may include features and updates not yet support
31879
31930
  }
31880
31931
  const parts = [];
31881
31932
  const pointer = new BigNumberCoder("u64").encode(BASE_VECTOR_OFFSET);
31882
- const data = this.#getPaddedData(value);
31933
+ const data = __privateMethod2(this, _getPaddedData, getPaddedData_fn).call(this, value);
31883
31934
  pointer.dynamicData = {
31884
31935
  0: concatWithDynamicData([data])
31885
31936
  };
@@ -31888,14 +31939,6 @@ This unreleased fuel-core build may include features and updates not yet support
31888
31939
  parts.push(new BigNumberCoder("u64").encode(value.length));
31889
31940
  return concatWithDynamicData(parts);
31890
31941
  }
31891
- #getPaddedData(value) {
31892
- const data = [Uint8Array.from(value)];
31893
- const paddingLength = (WORD_SIZE - value.length % WORD_SIZE) % WORD_SIZE;
31894
- if (paddingLength) {
31895
- data.push(new Uint8Array(paddingLength));
31896
- }
31897
- return concat(data);
31898
- }
31899
31942
  decode(data, offset) {
31900
31943
  if (data.length < BASE_VECTOR_OFFSET) {
31901
31944
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid byte data size.`);
@@ -31909,6 +31952,16 @@ This unreleased fuel-core build may include features and updates not yet support
31909
31952
  return [byteData, offset + BASE_VECTOR_OFFSET];
31910
31953
  }
31911
31954
  };
31955
+ _getPaddedData = /* @__PURE__ */ new WeakSet();
31956
+ getPaddedData_fn = function(value) {
31957
+ const data = [Uint8Array.from(value)];
31958
+ const paddingLength = (WORD_SIZE - value.length % WORD_SIZE) % WORD_SIZE;
31959
+ if (paddingLength) {
31960
+ data.push(new Uint8Array(paddingLength));
31961
+ }
31962
+ return concat(data);
31963
+ };
31964
+ __publicField4(ByteCoder, "memorySize", 1);
31912
31965
  var isFullyNativeEnum = (enumCoders) => Object.values(enumCoders).every(
31913
31966
  // @ts-expect-error complicated types
31914
31967
  ({ type: type3, coders }) => type3 === "()" && JSON.stringify(coders) === JSON.stringify([])
@@ -32107,15 +32160,17 @@ This unreleased fuel-core build may include features and updates not yet support
32107
32160
  return [decodedValue, offset + dataBytes.length];
32108
32161
  }
32109
32162
  };
32163
+ var _getPaddedData2;
32164
+ var getPaddedData_fn2;
32110
32165
  var StdStringCoder = class extends Coder {
32111
- static memorySize = 1;
32112
32166
  constructor() {
32113
32167
  super("struct", "struct String", 1);
32168
+ __privateAdd2(this, _getPaddedData2);
32114
32169
  }
32115
32170
  encode(value) {
32116
32171
  const parts = [];
32117
32172
  const pointer = new BigNumberCoder("u64").encode(BASE_VECTOR_OFFSET);
32118
- const data = this.#getPaddedData(value);
32173
+ const data = __privateMethod2(this, _getPaddedData2, getPaddedData_fn2).call(this, value);
32119
32174
  pointer.dynamicData = {
32120
32175
  0: concatWithDynamicData([data])
32121
32176
  };
@@ -32124,14 +32179,6 @@ This unreleased fuel-core build may include features and updates not yet support
32124
32179
  parts.push(new BigNumberCoder("u64").encode(value.length));
32125
32180
  return concatWithDynamicData(parts);
32126
32181
  }
32127
- #getPaddedData(value) {
32128
- const data = [toUtf8Bytes(value)];
32129
- const paddingLength = (WORD_SIZE - value.length % WORD_SIZE) % WORD_SIZE;
32130
- if (paddingLength) {
32131
- data.push(new Uint8Array(paddingLength));
32132
- }
32133
- return concat(data);
32134
- }
32135
32182
  decode(data, offset) {
32136
32183
  if (data.length < this.encodedLength) {
32137
32184
  throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid std string data size.`);
@@ -32146,6 +32193,16 @@ This unreleased fuel-core build may include features and updates not yet support
32146
32193
  return [value, offset + BASE_VECTOR_OFFSET];
32147
32194
  }
32148
32195
  };
32196
+ _getPaddedData2 = /* @__PURE__ */ new WeakSet();
32197
+ getPaddedData_fn2 = function(value) {
32198
+ const data = [toUtf8Bytes(value)];
32199
+ const paddingLength = (WORD_SIZE - value.length % WORD_SIZE) % WORD_SIZE;
32200
+ if (paddingLength) {
32201
+ data.push(new Uint8Array(paddingLength));
32202
+ }
32203
+ return concat(data);
32204
+ };
32205
+ __publicField4(StdStringCoder, "memorySize", 1);
32149
32206
  var StringCoder = class extends Coder {
32150
32207
  length;
32151
32208
  #paddingLength;
@@ -32301,7 +32358,7 @@ This unreleased fuel-core build may include features and updates not yet support
32301
32358
  ];
32302
32359
  }
32303
32360
  };
32304
- var ResolvedAbiType = class _ResolvedAbiType {
32361
+ var ResolvedAbiType = class {
32305
32362
  abi;
32306
32363
  name;
32307
32364
  type;
@@ -32325,11 +32382,11 @@ This unreleased fuel-core build may include features and updates not yet support
32325
32382
  this.name = argument.name;
32326
32383
  this.type = type3.type;
32327
32384
  this.originalTypeArguments = argument.typeArguments;
32328
- this.components = _ResolvedAbiType.getResolvedGenericComponents(
32385
+ this.components = ResolvedAbiType.getResolvedGenericComponents(
32329
32386
  abi,
32330
32387
  argument,
32331
32388
  type3.components,
32332
- type3.typeParameters ?? _ResolvedAbiType.getImplicitGenericTypeParameters(abi, type3.components)
32389
+ type3.typeParameters ?? ResolvedAbiType.getImplicitGenericTypeParameters(abi, type3.components)
32333
32390
  );
32334
32391
  }
32335
32392
  static getResolvedGenericComponents(abi, arg, components, typeParameters) {
@@ -32337,7 +32394,7 @@ This unreleased fuel-core build may include features and updates not yet support
32337
32394
  return null;
32338
32395
  }
32339
32396
  if (typeParameters === null || typeParameters.length === 0) {
32340
- return components.map((c) => new _ResolvedAbiType(abi, c));
32397
+ return components.map((c) => new ResolvedAbiType(abi, c));
32341
32398
  }
32342
32399
  const typeParametersAndArgsMap = typeParameters.reduce(
32343
32400
  (obj, typeParameter, typeParameterIndex) => {
@@ -32354,7 +32411,7 @@ This unreleased fuel-core build may include features and updates not yet support
32354
32411
  components,
32355
32412
  typeParametersAndArgsMap
32356
32413
  );
32357
- return resolvedComponents.map((c) => new _ResolvedAbiType(abi, c));
32414
+ return resolvedComponents.map((c) => new ResolvedAbiType(abi, c));
32358
32415
  }
32359
32416
  static resolveGenericArgTypes(abi, args, typeParametersAndArgsMap) {
32360
32417
  return args.map((arg) => {
@@ -32441,7 +32498,7 @@ This unreleased fuel-core build may include features and updates not yet support
32441
32498
  if (arrayMatch) {
32442
32499
  return `[${this.components[0].getSignature()};${arrayMatch.length}]`;
32443
32500
  }
32444
- const typeArgumentsSignature = this.originalTypeArguments !== null ? `<${this.originalTypeArguments.map((a) => new _ResolvedAbiType(this.abi, a).getSignature()).join(",")}>` : "";
32501
+ const typeArgumentsSignature = this.originalTypeArguments !== null ? `<${this.originalTypeArguments.map((a) => new ResolvedAbiType(this.abi, a).getSignature()).join(",")}>` : "";
32445
32502
  const componentsSignature = `(${this.components.map((c) => c.getSignature()).join(",")})`;
32446
32503
  return `${typeArgumentsSignature}${componentsSignature}`;
32447
32504
  }
@@ -32569,7 +32626,6 @@ This unreleased fuel-core build may include features and updates not yet support
32569
32626
  }
32570
32627
  };
32571
32628
  var ByteCoder2 = class extends Coder {
32572
- static memorySize = 1;
32573
32629
  constructor() {
32574
32630
  super("struct", "struct Bytes", WORD_SIZE);
32575
32631
  }
@@ -32595,6 +32651,7 @@ This unreleased fuel-core build may include features and updates not yet support
32595
32651
  return [dataBytes, offsetAndLength + length];
32596
32652
  }
32597
32653
  };
32654
+ __publicField4(ByteCoder2, "memorySize", 1);
32598
32655
  var isFullyNativeEnum2 = (enumCoders) => Object.values(enumCoders).every(
32599
32656
  // @ts-expect-error complicated types
32600
32657
  ({ type: type3, coders }) => type3 === "()" && JSON.stringify(coders) === JSON.stringify([])
@@ -32738,7 +32795,6 @@ This unreleased fuel-core build may include features and updates not yet support
32738
32795
  }
32739
32796
  };
32740
32797
  var StdStringCoder2 = class extends Coder {
32741
- static memorySize = 1;
32742
32798
  constructor() {
32743
32799
  super("struct", "struct String", WORD_SIZE);
32744
32800
  }
@@ -32761,6 +32817,7 @@ This unreleased fuel-core build may include features and updates not yet support
32761
32817
  return [toUtf8String(dataBytes), offsetAndLength + length];
32762
32818
  }
32763
32819
  };
32820
+ __publicField4(StdStringCoder2, "memorySize", 1);
32764
32821
  var StringCoder2 = class extends Coder {
32765
32822
  constructor(length) {
32766
32823
  super("string", `str[${length}]`, length);
@@ -33000,7 +33057,7 @@ This unreleased fuel-core build may include features and updates not yet support
33000
33057
  return this.getCoder(abi, argument, options).decode(data, offset);
33001
33058
  }
33002
33059
  };
33003
- var FunctionFragment = class _FunctionFragment {
33060
+ var FunctionFragment = class {
33004
33061
  signature;
33005
33062
  selector;
33006
33063
  name;
@@ -33013,8 +33070,8 @@ This unreleased fuel-core build may include features and updates not yet support
33013
33070
  this.jsonAbi = jsonAbi;
33014
33071
  this.jsonFn = findOrThrow(this.jsonAbi.functions, (f2) => f2.name === name);
33015
33072
  this.name = name;
33016
- this.signature = _FunctionFragment.getSignature(this.jsonAbi, this.jsonFn);
33017
- this.selector = _FunctionFragment.getFunctionSelector(this.signature);
33073
+ this.signature = FunctionFragment.getSignature(this.jsonAbi, this.jsonFn);
33074
+ this.selector = FunctionFragment.getFunctionSelector(this.signature);
33018
33075
  this.isInputDataPointer = this.#isInputDataPointer();
33019
33076
  this.outputMetadata = {
33020
33077
  isHeapType: this.#isOutputDataHeap(),
@@ -33057,7 +33114,7 @@ This unreleased fuel-core build may include features and updates not yet support
33057
33114
  }
33058
33115
  }
33059
33116
  encodeArguments(values, offset = 0) {
33060
- _FunctionFragment.verifyArgsAndInputsAlign(values, this.jsonFn.inputs, this.jsonAbi);
33117
+ FunctionFragment.verifyArgsAndInputsAlign(values, this.jsonFn.inputs, this.jsonAbi);
33061
33118
  const shallowCopyValues = values.slice();
33062
33119
  const nonEmptyInputs = this.jsonFn.inputs.filter(
33063
33120
  (x) => findOrThrow(this.jsonAbi.types, (t) => t.typeId === x.type).type !== "()"
@@ -33408,7 +33465,7 @@ This unreleased fuel-core build may include features and updates not yet support
33408
33465
  ];
33409
33466
  }
33410
33467
  };
33411
- var InputMessageCoder = class _InputMessageCoder extends Coder {
33468
+ var InputMessageCoder = class extends Coder {
33412
33469
  constructor() {
33413
33470
  super("InputMessage", "struct InputMessage", 0);
33414
33471
  }
@@ -33428,7 +33485,7 @@ This unreleased fuel-core build may include features and updates not yet support
33428
33485
  }
33429
33486
  encode(value) {
33430
33487
  const parts = [];
33431
- const data = _InputMessageCoder.encodeData(value.data);
33488
+ const data = InputMessageCoder.encodeData(value.data);
33432
33489
  parts.push(new ByteArrayCoder(32).encode(value.sender));
33433
33490
  parts.push(new ByteArrayCoder(32).encode(value.recipient));
33434
33491
  parts.push(new BigNumberCoder("u64").encode(value.amount));
@@ -33872,7 +33929,7 @@ This unreleased fuel-core build may include features and updates not yet support
33872
33929
  ReceiptType2[ReceiptType2["Burn"] = 12] = "Burn";
33873
33930
  return ReceiptType2;
33874
33931
  })(ReceiptType || {});
33875
- var ReceiptMessageOutCoder = class _ReceiptMessageOutCoder extends Coder {
33932
+ var ReceiptMessageOutCoder = class extends Coder {
33876
33933
  constructor() {
33877
33934
  super("ReceiptMessageOut", "struct ReceiptMessageOut", 0);
33878
33935
  }
@@ -33923,7 +33980,7 @@ This unreleased fuel-core build may include features and updates not yet support
33923
33980
  digest,
33924
33981
  data: messageData
33925
33982
  };
33926
- receiptMessageOut.messageId = _ReceiptMessageOutCoder.getMessageId(receiptMessageOut);
33983
+ receiptMessageOut.messageId = ReceiptMessageOutCoder.getMessageId(receiptMessageOut);
33927
33984
  return [receiptMessageOut, o];
33928
33985
  }
33929
33986
  };
@@ -33932,7 +33989,7 @@ This unreleased fuel-core build may include features and updates not yet support
33932
33989
  const subIdBytes = arrayify(subId);
33933
33990
  return sha2563(concat([contractIdBytes, subIdBytes]));
33934
33991
  };
33935
- var ReceiptMintCoder = class _ReceiptMintCoder extends Coder {
33992
+ var ReceiptMintCoder = class extends Coder {
33936
33993
  constructor() {
33937
33994
  super("ReceiptMint", "struct ReceiptMint", 0);
33938
33995
  }
@@ -33961,7 +34018,7 @@ This unreleased fuel-core build may include features and updates not yet support
33961
34018
  const pc = decoded;
33962
34019
  [decoded, o] = new BigNumberCoder("u64").decode(data, o);
33963
34020
  const is = decoded;
33964
- const assetId = _ReceiptMintCoder.getAssetId(contractId, subId);
34021
+ const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
33965
34022
  const receiptMint = {
33966
34023
  type: 11,
33967
34024
  subId,
@@ -34820,7 +34877,7 @@ This unreleased fuel-core build may include features and updates not yet support
34820
34877
  }
34821
34878
  return firstArg;
34822
34879
  }
34823
- var GraphQLError = class _GraphQLError extends Error {
34880
+ var GraphQLError = class extends Error {
34824
34881
  /**
34825
34882
  * An array of `{ line, column }` locations within the source GraphQL document
34826
34883
  * which correspond to this error.
@@ -34907,7 +34964,7 @@ This unreleased fuel-core build may include features and updates not yet support
34907
34964
  configurable: true
34908
34965
  });
34909
34966
  } else if (Error.captureStackTrace) {
34910
- Error.captureStackTrace(this, _GraphQLError);
34967
+ Error.captureStackTrace(this, GraphQLError);
34911
34968
  } else {
34912
34969
  Object.defineProperty(this, "stack", {
34913
34970
  value: Error().stack,
@@ -38671,12 +38728,11 @@ ${MessageCoinFragmentFragmentDoc}`;
38671
38728
  }
38672
38729
 
38673
38730
  // src/providers/fuel-graphql-subscriber.ts
38674
- var FuelGraphqlSubscriber = class _FuelGraphqlSubscriber {
38731
+ var _FuelGraphqlSubscriber = class {
38675
38732
  constructor(options) {
38676
38733
  this.options = options;
38677
38734
  }
38678
38735
  stream;
38679
- static textDecoder = new TextDecoder();
38680
38736
  async setStream() {
38681
38737
  const { url, query, variables, fetchFn } = this.options;
38682
38738
  const response = await fetchFn(`${url}-sub`, {
@@ -38736,6 +38792,8 @@ ${MessageCoinFragmentFragmentDoc}`;
38736
38792
  return this;
38737
38793
  }
38738
38794
  };
38795
+ var FuelGraphqlSubscriber = _FuelGraphqlSubscriber;
38796
+ __publicField(FuelGraphqlSubscriber, "textDecoder", new TextDecoder());
38739
38797
 
38740
38798
  // src/providers/memory-cache.ts
38741
38799
  var cache = {};
@@ -39293,15 +39351,6 @@ ${MessageCoinFragmentFragmentDoc}`;
39293
39351
  return normalize2(clone_default(root));
39294
39352
  }
39295
39353
 
39296
- // src/providers/utils/sleep.ts
39297
- function sleep(time) {
39298
- return new Promise((resolve) => {
39299
- setTimeout(() => {
39300
- resolve(true);
39301
- }, time);
39302
- });
39303
- }
39304
-
39305
39354
  // src/providers/transaction-request/errors.ts
39306
39355
  var ChangeOutputCollisionError = class extends Error {
39307
39356
  name = "ChangeOutputCollisionError";
@@ -39334,7 +39383,7 @@ ${MessageCoinFragmentFragmentDoc}`;
39334
39383
  };
39335
39384
 
39336
39385
  // src/providers/transaction-request/transaction-request.ts
39337
- var BaseTransactionRequest = class _BaseTransactionRequest {
39386
+ var BaseTransactionRequest = class {
39338
39387
  /** Gas price for transaction */
39339
39388
  gasPrice;
39340
39389
  /** Block until which tx cannot be included */
@@ -39404,7 +39453,7 @@ ${MessageCoinFragmentFragmentDoc}`;
39404
39453
  const inputs = this.inputs?.map(inputify) ?? [];
39405
39454
  const outputs = this.outputs?.map(outputify) ?? [];
39406
39455
  const witnesses = this.witnesses?.map(witnessify) ?? [];
39407
- const { policyTypes, policies } = _BaseTransactionRequest.getPolicyMeta(this);
39456
+ const { policyTypes, policies } = BaseTransactionRequest.getPolicyMeta(this);
39408
39457
  return {
39409
39458
  policyTypes,
39410
39459
  inputs,
@@ -40940,7 +40989,7 @@ ${MessageCoinFragmentFragmentDoc}`;
40940
40989
  }
40941
40990
 
40942
40991
  // src/providers/transaction-response/transaction-response.ts
40943
- var TransactionResponse2 = class _TransactionResponse {
40992
+ var TransactionResponse2 = class {
40944
40993
  /** Transaction ID */
40945
40994
  id;
40946
40995
  /** Current provider */
@@ -40968,7 +41017,7 @@ ${MessageCoinFragmentFragmentDoc}`;
40968
41017
  * @param provider - The provider.
40969
41018
  */
40970
41019
  static async create(id, provider) {
40971
- const response = new _TransactionResponse(id, provider);
41020
+ const response = new TransactionResponse2(id, provider);
40972
41021
  await response.fetch();
40973
41022
  return response;
40974
41023
  }
@@ -41194,7 +41243,8 @@ ${MessageCoinFragmentFragmentDoc}`;
41194
41243
  }
41195
41244
  };
41196
41245
  };
41197
- var Provider = class _Provider {
41246
+ var _cacheInputs, cacheInputs_fn;
41247
+ var _Provider = class {
41198
41248
  /**
41199
41249
  * Constructor to initialize a Provider.
41200
41250
  *
@@ -41205,25 +41255,27 @@ ${MessageCoinFragmentFragmentDoc}`;
41205
41255
  */
41206
41256
  constructor(url, options = {}) {
41207
41257
  this.url = url;
41258
+ /**
41259
+ * @hidden
41260
+ */
41261
+ __privateAdd(this, _cacheInputs);
41262
+ __publicField(this, "operations");
41263
+ __publicField(this, "cache");
41264
+ __publicField(this, "options", {
41265
+ timeout: void 0,
41266
+ cacheUtxo: void 0,
41267
+ fetch: void 0,
41268
+ retryOptions: void 0
41269
+ });
41208
41270
  this.options = { ...this.options, ...options };
41209
41271
  this.url = url;
41210
41272
  this.operations = this.createOperations();
41211
41273
  this.cache = options.cacheUtxo ? new MemoryCache(options.cacheUtxo) : void 0;
41212
41274
  }
41213
- operations;
41214
- cache;
41215
41275
  static clearChainAndNodeCaches() {
41216
41276
  _Provider.nodeInfoCache = {};
41217
41277
  _Provider.chainInfoCache = {};
41218
41278
  }
41219
- static chainInfoCache = {};
41220
- static nodeInfoCache = {};
41221
- options = {
41222
- timeout: void 0,
41223
- cacheUtxo: void 0,
41224
- fetch: void 0,
41225
- retryOptions: void 0
41226
- };
41227
41279
  static getFetchFn(options) {
41228
41280
  const { retryOptions, timeout } = options;
41229
41281
  return autoRetryFetch(async (...args) => {
@@ -41420,19 +41472,6 @@ ${MessageCoinFragmentFragmentDoc}`;
41420
41472
  } = this.getChain();
41421
41473
  return chainId.toNumber();
41422
41474
  }
41423
- /**
41424
- * @hidden
41425
- */
41426
- #cacheInputs(inputs) {
41427
- if (!this.cache) {
41428
- return;
41429
- }
41430
- inputs.forEach((input) => {
41431
- if (input.type === InputType.Coin) {
41432
- this.cache?.set(input.id);
41433
- }
41434
- });
41435
- }
41436
41475
  /**
41437
41476
  * Submits a transaction to the chain to be executed.
41438
41477
  *
@@ -41445,7 +41484,7 @@ ${MessageCoinFragmentFragmentDoc}`;
41445
41484
  // #region Provider-sendTransaction
41446
41485
  async sendTransaction(transactionRequestLike, { estimateTxDependencies = true, awaitExecution = false } = {}) {
41447
41486
  const transactionRequest = transactionRequestify(transactionRequestLike);
41448
- this.#cacheInputs(transactionRequest.inputs);
41487
+ __privateMethod(this, _cacheInputs, cacheInputs_fn).call(this, transactionRequest.inputs);
41449
41488
  if (estimateTxDependencies) {
41450
41489
  await this.estimateTxDependencies(transactionRequest);
41451
41490
  }
@@ -42070,6 +42109,20 @@ ${MessageCoinFragmentFragmentDoc}`;
42070
42109
  return new TransactionResponse2(transactionId, this);
42071
42110
  }
42072
42111
  };
42112
+ var Provider = _Provider;
42113
+ _cacheInputs = new WeakSet();
42114
+ cacheInputs_fn = function(inputs) {
42115
+ if (!this.cache) {
42116
+ return;
42117
+ }
42118
+ inputs.forEach((input) => {
42119
+ if (input.type === InputType.Coin) {
42120
+ this.cache?.set(input.id);
42121
+ }
42122
+ });
42123
+ };
42124
+ __publicField(Provider, "chainInfoCache", {});
42125
+ __publicField(Provider, "nodeInfoCache", {});
42073
42126
 
42074
42127
  // src/providers/transaction-summary/get-transaction-summary.ts
42075
42128
  async function getTransactionSummary(params) {
@@ -43992,7 +44045,7 @@ ${MessageCoinFragmentFragmentDoc}`;
43992
44045
  var Point = secp256k1.ProjectivePoint;
43993
44046
 
43994
44047
  // src/signer/signer.ts
43995
- var Signer = class _Signer {
44048
+ var Signer = class {
43996
44049
  address;
43997
44050
  publicKey;
43998
44051
  compressedPublicKey;
@@ -44071,7 +44124,7 @@ ${MessageCoinFragmentFragmentDoc}`;
44071
44124
  * @returns Address from signature
44072
44125
  */
44073
44126
  static recoverAddress(data, signature) {
44074
- return Address.fromPublicKey(_Signer.recoverPublicKey(data, signature));
44127
+ return Address.fromPublicKey(Signer.recoverPublicKey(data, signature));
44075
44128
  }
44076
44129
  /**
44077
44130
  * Generate a random privateKey
@@ -44229,10 +44282,6 @@ ${MessageCoinFragmentFragmentDoc}`;
44229
44282
 
44230
44283
  // src/wallet/base-wallet-unlocked.ts
44231
44284
  var BaseWalletUnlocked = class extends Account {
44232
- /**
44233
- * Default HDWallet path.
44234
- */
44235
- static defaultPath = "m/44'/1179993420'/0'/0/0";
44236
44285
  /**
44237
44286
  * A function that returns the wallet's signer.
44238
44287
  */
@@ -44338,6 +44387,10 @@ ${MessageCoinFragmentFragmentDoc}`;
44338
44387
  return encryptKeystoreWallet(this.privateKey, this.address, password);
44339
44388
  }
44340
44389
  };
44390
+ /**
44391
+ * Default HDWallet path.
44392
+ */
44393
+ __publicField(BaseWalletUnlocked, "defaultPath", "m/44'/1179993420'/0'/0/0");
44341
44394
 
44342
44395
  // src/wordlists/words/english.ts
44343
44396
  var english = [
@@ -46530,7 +46583,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46530
46583
  throw new FuelError(ErrorCode.INVALID_MNEMONIC, errorMsg);
46531
46584
  }
46532
46585
  }
46533
- var Mnemonic = class _Mnemonic {
46586
+ var Mnemonic = class {
46534
46587
  wordlist;
46535
46588
  /**
46536
46589
  *
@@ -46547,7 +46600,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46547
46600
  * @returns Entropy hash
46548
46601
  */
46549
46602
  mnemonicToEntropy(phrase) {
46550
- return _Mnemonic.mnemonicToEntropy(phrase, this.wordlist);
46603
+ return Mnemonic.mnemonicToEntropy(phrase, this.wordlist);
46551
46604
  }
46552
46605
  /**
46553
46606
  *
@@ -46555,7 +46608,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46555
46608
  * @returns Mnemonic phrase
46556
46609
  */
46557
46610
  entropyToMnemonic(entropy) {
46558
- return _Mnemonic.entropyToMnemonic(entropy, this.wordlist);
46611
+ return Mnemonic.entropyToMnemonic(entropy, this.wordlist);
46559
46612
  }
46560
46613
  /**
46561
46614
  *
@@ -46596,8 +46649,8 @@ ${MessageCoinFragmentFragmentDoc}`;
46596
46649
  * @returns 64-byte array contains privateKey and chainCode as described on BIP39
46597
46650
  */
46598
46651
  static mnemonicToMasterKeys(phrase, passphrase = "") {
46599
- const seed = _Mnemonic.mnemonicToSeed(phrase, passphrase);
46600
- return _Mnemonic.masterKeysFromSeed(seed);
46652
+ const seed = Mnemonic.mnemonicToSeed(phrase, passphrase);
46653
+ return Mnemonic.masterKeysFromSeed(seed);
46601
46654
  }
46602
46655
  /**
46603
46656
  * Validates if given mnemonic is valid
@@ -46613,7 +46666,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46613
46666
  return false;
46614
46667
  }
46615
46668
  while (i < words.length) {
46616
- if (_Mnemonic.binarySearch(words[i]) === false) {
46669
+ if (Mnemonic.binarySearch(words[i]) === false) {
46617
46670
  return false;
46618
46671
  }
46619
46672
  i += 1;
@@ -46660,7 +46713,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46660
46713
  * @returns BIP-32 extended private key
46661
46714
  */
46662
46715
  static seedToExtendedKey(seed, testnet = false) {
46663
- const masterKey = _Mnemonic.masterKeysFromSeed(seed);
46716
+ const masterKey = Mnemonic.masterKeysFromSeed(seed);
46664
46717
  const prefix = arrayify(testnet ? TestnetPRV : MainnetPRV);
46665
46718
  const depth = "0x00";
46666
46719
  const fingerprint = "0x00000000";
@@ -46692,7 +46745,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46692
46745
  */
46693
46746
  static generate(size = 32, extraEntropy = "") {
46694
46747
  const entropy = extraEntropy ? sha2563(concat([randomBytes22(size), arrayify(extraEntropy)])) : randomBytes22(size);
46695
- return _Mnemonic.entropyToMnemonic(entropy);
46748
+ return Mnemonic.entropyToMnemonic(entropy);
46696
46749
  }
46697
46750
  };
46698
46751
  var mnemonic_default = Mnemonic;
@@ -46732,7 +46785,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46732
46785
  (p) => ~p.indexOf(`'`) ? parseInt(p, 10) + HARDENED_INDEX : parseInt(p, 10)
46733
46786
  );
46734
46787
  }
46735
- var HDWallet = class _HDWallet {
46788
+ var HDWallet = class {
46736
46789
  depth = 0;
46737
46790
  index = 0;
46738
46791
  fingerprint = hexlify("0x00000000");
@@ -46798,7 +46851,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46798
46851
  if (privateKey) {
46799
46852
  const N = "0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141";
46800
46853
  const ki = bn(IL).add(privateKey).mod(N).toBytes(32);
46801
- return new _HDWallet({
46854
+ return new HDWallet({
46802
46855
  privateKey: ki,
46803
46856
  chainCode: IR,
46804
46857
  index,
@@ -46808,7 +46861,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46808
46861
  }
46809
46862
  const signer = new Signer(hexlify(IL));
46810
46863
  const Ki = signer.addPoint(publicKey);
46811
- return new _HDWallet({
46864
+ return new HDWallet({
46812
46865
  publicKey: Ki,
46813
46866
  chainCode: IR,
46814
46867
  index,
@@ -46857,7 +46910,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46857
46910
  */
46858
46911
  static fromSeed(seed) {
46859
46912
  const masterKey = mnemonic_default.masterKeysFromSeed(seed);
46860
- return new _HDWallet({
46913
+ return new HDWallet({
46861
46914
  chainCode: arrayify(masterKey.slice(32)),
46862
46915
  privateKey: arrayify(masterKey.slice(0, 32))
46863
46916
  });
@@ -46887,7 +46940,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46887
46940
  if (key[0] !== 3) {
46888
46941
  throw new FuelError(ErrorCode.HD_WALLET_ERROR, "Invalid public extended key.");
46889
46942
  }
46890
- return new _HDWallet({
46943
+ return new HDWallet({
46891
46944
  publicKey: key,
46892
46945
  chainCode,
46893
46946
  index,
@@ -46898,7 +46951,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46898
46951
  if (key[0] !== 0) {
46899
46952
  throw new FuelError(ErrorCode.HD_WALLET_ERROR, "Invalid private extended key.");
46900
46953
  }
46901
- return new _HDWallet({
46954
+ return new HDWallet({
46902
46955
  privateKey: key.slice(1),
46903
46956
  chainCode,
46904
46957
  index,
@@ -46921,7 +46974,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46921
46974
  return new WalletUnlocked(privateKey, this._provider);
46922
46975
  }
46923
46976
  };
46924
- var WalletUnlocked = class _WalletUnlocked extends BaseWalletUnlocked {
46977
+ var WalletUnlocked = class extends BaseWalletUnlocked {
46925
46978
  /**
46926
46979
  * Locks the wallet and returns an instance of WalletLocked.
46927
46980
  *
@@ -46939,7 +46992,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46939
46992
  */
46940
46993
  static generate(generateOptions) {
46941
46994
  const privateKey = Signer.generatePrivateKey(generateOptions?.entropy);
46942
- return new _WalletUnlocked(privateKey, generateOptions?.provider);
46995
+ return new WalletUnlocked(privateKey, generateOptions?.provider);
46943
46996
  }
46944
46997
  /**
46945
46998
  * Create a Wallet Unlocked from a seed.
@@ -46951,8 +47004,8 @@ ${MessageCoinFragmentFragmentDoc}`;
46951
47004
  */
46952
47005
  static fromSeed(seed, path, provider) {
46953
47006
  const hdWallet = hdwallet_default.fromSeed(seed);
46954
- const childWallet = hdWallet.derivePath(path || _WalletUnlocked.defaultPath);
46955
- return new _WalletUnlocked(childWallet.privateKey, provider);
47007
+ const childWallet = hdWallet.derivePath(path || WalletUnlocked.defaultPath);
47008
+ return new WalletUnlocked(childWallet.privateKey, provider);
46956
47009
  }
46957
47010
  /**
46958
47011
  * Create a Wallet Unlocked from a mnemonic phrase.
@@ -46966,8 +47019,8 @@ ${MessageCoinFragmentFragmentDoc}`;
46966
47019
  static fromMnemonic(mnemonic, path, passphrase, provider) {
46967
47020
  const seed = mnemonic_default.mnemonicToSeed(mnemonic, passphrase);
46968
47021
  const hdWallet = hdwallet_default.fromSeed(seed);
46969
- const childWallet = hdWallet.derivePath(path || _WalletUnlocked.defaultPath);
46970
- return new _WalletUnlocked(childWallet.privateKey, provider);
47022
+ const childWallet = hdWallet.derivePath(path || WalletUnlocked.defaultPath);
47023
+ return new WalletUnlocked(childWallet.privateKey, provider);
46971
47024
  }
46972
47025
  /**
46973
47026
  * Create a Wallet Unlocked from an extended key.
@@ -46978,7 +47031,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46978
47031
  */
46979
47032
  static fromExtendedKey(extendedKey, provider) {
46980
47033
  const hdWallet = hdwallet_default.fromExtendedKey(extendedKey);
46981
- return new _WalletUnlocked(hdWallet.privateKey, provider);
47034
+ return new WalletUnlocked(hdWallet.privateKey, provider);
46982
47035
  }
46983
47036
  /**
46984
47037
  * Create a Wallet Unlocked from an encrypted JSON.
@@ -46990,7 +47043,7 @@ ${MessageCoinFragmentFragmentDoc}`;
46990
47043
  */
46991
47044
  static async fromEncryptedJson(jsonWallet, password, provider) {
46992
47045
  const privateKey = await decryptKeystoreWallet(jsonWallet, password);
46993
- return new _WalletUnlocked(privateKey, provider);
47046
+ return new WalletUnlocked(privateKey, provider);
46994
47047
  }
46995
47048
  };
46996
47049
 
@@ -47016,50 +47069,50 @@ ${MessageCoinFragmentFragmentDoc}`;
47016
47069
  static fromPrivateKey(privateKey, provider) {
47017
47070
  return new WalletUnlocked(privateKey, provider);
47018
47071
  }
47019
- /**
47020
- * Generate a new Wallet Unlocked with a random key pair.
47021
- *
47022
- * @param generateOptions - Options to customize the generation process (optional).
47023
- * @returns An unlocked wallet instance.
47024
- */
47025
- static generate = WalletUnlocked.generate;
47026
- /**
47027
- * Create a Wallet Unlocked from a seed.
47028
- *
47029
- * @param seed - The seed phrase.
47030
- * @param provider - A Provider instance (optional).
47031
- * @param path - The derivation path (optional).
47032
- * @returns An unlocked wallet instance.
47033
- */
47034
- static fromSeed = WalletUnlocked.fromSeed;
47035
- /**
47036
- * Create a Wallet Unlocked from a mnemonic phrase.
47037
- *
47038
- * @param mnemonic - The mnemonic phrase.
47039
- * @param provider - A Provider instance (optional).
47040
- * @param path - The derivation path (optional).
47041
- * @param passphrase - The passphrase for the mnemonic (optional).
47042
- * @returns An unlocked wallet instance.
47043
- */
47044
- static fromMnemonic = WalletUnlocked.fromMnemonic;
47045
- /**
47046
- * Create a Wallet Unlocked from an extended key.
47047
- *
47048
- * @param extendedKey - The extended key.
47049
- * @param provider - A Provider instance (optional).
47050
- * @returns An unlocked wallet instance.
47051
- */
47052
- static fromExtendedKey = WalletUnlocked.fromExtendedKey;
47053
- /**
47054
- * Create a Wallet Unlocked from an encrypted JSON.
47055
- *
47056
- * @param jsonWallet - The encrypted JSON keystore.
47057
- * @param password - The password to decrypt the JSON.
47058
- * @param provider - A Provider instance (optional).
47059
- * @returns An unlocked wallet instance.
47060
- */
47061
- static fromEncryptedJson = WalletUnlocked.fromEncryptedJson;
47062
47072
  };
47073
+ /**
47074
+ * Generate a new Wallet Unlocked with a random key pair.
47075
+ *
47076
+ * @param generateOptions - Options to customize the generation process (optional).
47077
+ * @returns An unlocked wallet instance.
47078
+ */
47079
+ __publicField(Wallet, "generate", WalletUnlocked.generate);
47080
+ /**
47081
+ * Create a Wallet Unlocked from a seed.
47082
+ *
47083
+ * @param seed - The seed phrase.
47084
+ * @param provider - A Provider instance (optional).
47085
+ * @param path - The derivation path (optional).
47086
+ * @returns An unlocked wallet instance.
47087
+ */
47088
+ __publicField(Wallet, "fromSeed", WalletUnlocked.fromSeed);
47089
+ /**
47090
+ * Create a Wallet Unlocked from a mnemonic phrase.
47091
+ *
47092
+ * @param mnemonic - The mnemonic phrase.
47093
+ * @param provider - A Provider instance (optional).
47094
+ * @param path - The derivation path (optional).
47095
+ * @param passphrase - The passphrase for the mnemonic (optional).
47096
+ * @returns An unlocked wallet instance.
47097
+ */
47098
+ __publicField(Wallet, "fromMnemonic", WalletUnlocked.fromMnemonic);
47099
+ /**
47100
+ * Create a Wallet Unlocked from an extended key.
47101
+ *
47102
+ * @param extendedKey - The extended key.
47103
+ * @param provider - A Provider instance (optional).
47104
+ * @returns An unlocked wallet instance.
47105
+ */
47106
+ __publicField(Wallet, "fromExtendedKey", WalletUnlocked.fromExtendedKey);
47107
+ /**
47108
+ * Create a Wallet Unlocked from an encrypted JSON.
47109
+ *
47110
+ * @param jsonWallet - The encrypted JSON keystore.
47111
+ * @param password - The password to decrypt the JSON.
47112
+ * @param provider - A Provider instance (optional).
47113
+ * @returns An unlocked wallet instance.
47114
+ */
47115
+ __publicField(Wallet, "fromEncryptedJson", WalletUnlocked.fromEncryptedJson);
47063
47116
 
47064
47117
  // src/wallet-manager/wallet-manager.ts
47065
47118
  var import_events = __require("events");
@@ -47083,14 +47136,14 @@ ${MessageCoinFragmentFragmentDoc}`;
47083
47136
  };
47084
47137
 
47085
47138
  // src/wallet-manager/vaults/mnemonic-vault.ts
47139
+ var _secret;
47086
47140
  var MnemonicVault = class {
47087
- static type = "mnemonic";
47088
- #secret;
47089
- pathKey = "{}";
47090
- rootPath = `m/44'/1179993420'/${this.pathKey}'/0/0`;
47091
- numberOfAccounts = 0;
47092
47141
  constructor(options) {
47093
- this.#secret = options.secret || mnemonic_default.generate();
47142
+ __privateAdd(this, _secret, void 0);
47143
+ __publicField(this, "pathKey", "{}");
47144
+ __publicField(this, "rootPath", `m/44'/1179993420'/${this.pathKey}'/0/0`);
47145
+ __publicField(this, "numberOfAccounts", 0);
47146
+ __privateSet(this, _secret, options.secret || mnemonic_default.generate());
47094
47147
  this.rootPath = options.rootPath || this.rootPath;
47095
47148
  this.numberOfAccounts = options.numberOfAccounts || 1;
47096
47149
  }
@@ -47102,7 +47155,7 @@ ${MessageCoinFragmentFragmentDoc}`;
47102
47155
  }
47103
47156
  serialize() {
47104
47157
  return {
47105
- secret: this.#secret,
47158
+ secret: __privateGet(this, _secret),
47106
47159
  rootPath: this.rootPath,
47107
47160
  numberOfAccounts: this.numberOfAccounts
47108
47161
  };
@@ -47111,7 +47164,7 @@ ${MessageCoinFragmentFragmentDoc}`;
47111
47164
  const accounts = [];
47112
47165
  let numberOfAccounts = 0;
47113
47166
  do {
47114
- const wallet = Wallet.fromMnemonic(this.#secret, this.getDerivePath(numberOfAccounts));
47167
+ const wallet = Wallet.fromMnemonic(__privateGet(this, _secret), this.getDerivePath(numberOfAccounts));
47115
47168
  accounts.push({
47116
47169
  publicKey: wallet.publicKey,
47117
47170
  address: wallet.address
@@ -47122,7 +47175,7 @@ ${MessageCoinFragmentFragmentDoc}`;
47122
47175
  }
47123
47176
  addAccount() {
47124
47177
  this.numberOfAccounts += 1;
47125
- const wallet = Wallet.fromMnemonic(this.#secret, this.getDerivePath(this.numberOfAccounts - 1));
47178
+ const wallet = Wallet.fromMnemonic(__privateGet(this, _secret), this.getDerivePath(this.numberOfAccounts - 1));
47126
47179
  return {
47127
47180
  publicKey: wallet.publicKey,
47128
47181
  address: wallet.address
@@ -47132,7 +47185,7 @@ ${MessageCoinFragmentFragmentDoc}`;
47132
47185
  let numberOfAccounts = 0;
47133
47186
  const ownerAddress = Address.fromAddressOrString(address);
47134
47187
  do {
47135
- const wallet = Wallet.fromMnemonic(this.#secret, this.getDerivePath(numberOfAccounts));
47188
+ const wallet = Wallet.fromMnemonic(__privateGet(this, _secret), this.getDerivePath(numberOfAccounts));
47136
47189
  if (wallet.address.equals(ownerAddress)) {
47137
47190
  return wallet.privateKey;
47138
47191
  }
@@ -47148,25 +47201,27 @@ ${MessageCoinFragmentFragmentDoc}`;
47148
47201
  return Wallet.fromPrivateKey(privateKey);
47149
47202
  }
47150
47203
  };
47204
+ _secret = new WeakMap();
47205
+ __publicField(MnemonicVault, "type", "mnemonic");
47151
47206
 
47152
47207
  // src/wallet-manager/vaults/privatekey-vault.ts
47208
+ var _privateKeys;
47153
47209
  var PrivateKeyVault = class {
47154
- static type = "privateKey";
47155
- #privateKeys = [];
47156
47210
  /**
47157
47211
  * If privateKey vault is initialized with a secretKey, it creates
47158
47212
  * one account with the fallowing secret
47159
47213
  */
47160
47214
  constructor(options = {}) {
47215
+ __privateAdd(this, _privateKeys, []);
47161
47216
  if (options.secret) {
47162
- this.#privateKeys = [options.secret];
47217
+ __privateSet(this, _privateKeys, [options.secret]);
47163
47218
  } else {
47164
- this.#privateKeys = options.accounts || [Wallet.generate().privateKey];
47219
+ __privateSet(this, _privateKeys, options.accounts || [Wallet.generate().privateKey]);
47165
47220
  }
47166
47221
  }
47167
47222
  serialize() {
47168
47223
  return {
47169
- accounts: this.#privateKeys
47224
+ accounts: __privateGet(this, _privateKeys)
47170
47225
  };
47171
47226
  }
47172
47227
  getPublicAccount(privateKey) {
@@ -47177,16 +47232,16 @@ ${MessageCoinFragmentFragmentDoc}`;
47177
47232
  };
47178
47233
  }
47179
47234
  getAccounts() {
47180
- return this.#privateKeys.map((pk) => this.getPublicAccount(pk));
47235
+ return __privateGet(this, _privateKeys).map((pk) => this.getPublicAccount(pk));
47181
47236
  }
47182
47237
  addAccount() {
47183
47238
  const wallet = Wallet.generate();
47184
- this.#privateKeys.push(wallet.privateKey);
47239
+ __privateGet(this, _privateKeys).push(wallet.privateKey);
47185
47240
  return this.getPublicAccount(wallet.privateKey);
47186
47241
  }
47187
47242
  exportAccount(address) {
47188
47243
  const ownerAddress = Address.fromAddressOrString(address);
47189
- const privateKey = this.#privateKeys.find(
47244
+ const privateKey = __privateGet(this, _privateKeys).find(
47190
47245
  (pk) => Wallet.fromPrivateKey(pk).address.equals(ownerAddress)
47191
47246
  );
47192
47247
  if (!privateKey) {
@@ -47202,6 +47257,8 @@ ${MessageCoinFragmentFragmentDoc}`;
47202
47257
  return Wallet.fromPrivateKey(privateKey);
47203
47258
  }
47204
47259
  };
47260
+ _privateKeys = new WeakMap();
47261
+ __publicField(PrivateKeyVault, "type", "privateKey");
47205
47262
 
47206
47263
  // src/wallet-manager/wallet-manager.ts
47207
47264
  var ERROR_MESSAGES = {
@@ -47216,43 +47273,46 @@ ${MessageCoinFragmentFragmentDoc}`;
47216
47273
  throw new FuelError(ErrorCode.WALLET_MANAGER_ERROR, message);
47217
47274
  }
47218
47275
  }
47219
- var WalletManager = class _WalletManager extends import_events.EventEmitter {
47220
- /**
47221
- * Vaults
47222
- *
47223
- * Vaults are responsible to store secret keys and return an `Wallet` instance,
47224
- * to interact with the network.
47225
- *
47226
- * Each vault has access to its own state
47227
- *
47228
- */
47229
- static Vaults = [MnemonicVault, PrivateKeyVault];
47230
- /**
47231
- * Storage
47232
- *
47233
- * Persistent encrypted data. `The default storage works only on memory`.
47234
- */
47235
- storage = new MemoryStorage();
47236
- /* Key name passed to the storage */
47237
- STORAGE_KEY = "WalletManager";
47238
- // `This variables are only accessible from inside the class`
47239
- #vaults = [];
47240
- #passphrase = "";
47241
- #isLocked = true;
47276
+ var _vaults, _passphrase, _isLocked, _serializeVaults, serializeVaults_fn, _deserializeVaults, deserializeVaults_fn;
47277
+ var _WalletManager = class extends import_events.EventEmitter {
47242
47278
  constructor(options) {
47243
47279
  super();
47280
+ /**
47281
+ * Serialize all vaults to store
47282
+ *
47283
+ * `This is only accessible from inside the class`
47284
+ */
47285
+ __privateAdd(this, _serializeVaults);
47286
+ /**
47287
+ * Deserialize all vaults to state
47288
+ *
47289
+ * `This is only accessible from inside the class`
47290
+ */
47291
+ __privateAdd(this, _deserializeVaults);
47292
+ /**
47293
+ * Storage
47294
+ *
47295
+ * Persistent encrypted data. `The default storage works only on memory`.
47296
+ */
47297
+ __publicField(this, "storage", new MemoryStorage());
47298
+ /* Key name passed to the storage */
47299
+ __publicField(this, "STORAGE_KEY", "WalletManager");
47300
+ // `This variables are only accessible from inside the class`
47301
+ __privateAdd(this, _vaults, []);
47302
+ __privateAdd(this, _passphrase, "");
47303
+ __privateAdd(this, _isLocked, true);
47244
47304
  this.storage = options?.storage || this.storage;
47245
47305
  }
47246
47306
  get isLocked() {
47247
- return this.#isLocked;
47307
+ return __privateGet(this, _isLocked);
47248
47308
  }
47249
47309
  /**
47250
47310
  * Return the vault serialized object containing all the privateKeys,
47251
47311
  * the format of the return depends on the Vault type.
47252
47312
  */
47253
47313
  exportVault(vaultId) {
47254
- assert3(!this.#isLocked, ERROR_MESSAGES.wallet_not_unlocked);
47255
- const vaultState = this.#vaults.find((_, idx) => idx === vaultId);
47314
+ assert3(!__privateGet(this, _isLocked), ERROR_MESSAGES.wallet_not_unlocked);
47315
+ const vaultState = __privateGet(this, _vaults).find((_, idx) => idx === vaultId);
47256
47316
  assert3(vaultState, ERROR_MESSAGES.vault_not_found);
47257
47317
  return vaultState.vault.serialize();
47258
47318
  }
@@ -47260,7 +47320,7 @@ ${MessageCoinFragmentFragmentDoc}`;
47260
47320
  * List all vaults on the Wallet Manager, this function not return secret's
47261
47321
  */
47262
47322
  getVaults() {
47263
- return this.#vaults.map((v, idx) => ({
47323
+ return __privateGet(this, _vaults).map((v, idx) => ({
47264
47324
  title: v.title,
47265
47325
  type: v.type,
47266
47326
  vaultId: idx
@@ -47270,7 +47330,7 @@ ${MessageCoinFragmentFragmentDoc}`;
47270
47330
  * List all accounts on the Wallet Manager not vault information is revealed
47271
47331
  */
47272
47332
  getAccounts() {
47273
- return this.#vaults.flatMap(
47333
+ return __privateGet(this, _vaults).flatMap(
47274
47334
  (vaultState, vaultId) => vaultState.vault.getAccounts().map((account) => ({ ...account, vaultId }))
47275
47335
  );
47276
47336
  }
@@ -47279,7 +47339,7 @@ ${MessageCoinFragmentFragmentDoc}`;
47279
47339
  */
47280
47340
  getWallet(address) {
47281
47341
  const ownerAddress = Address.fromAddressOrString(address);
47282
- const vaultState = this.#vaults.find(
47342
+ const vaultState = __privateGet(this, _vaults).find(
47283
47343
  (vs) => vs.vault.getAccounts().find((a) => a.address.equals(ownerAddress))
47284
47344
  );
47285
47345
  assert3(vaultState, ERROR_MESSAGES.address_not_found);
@@ -47290,8 +47350,8 @@ ${MessageCoinFragmentFragmentDoc}`;
47290
47350
  */
47291
47351
  exportPrivateKey(address) {
47292
47352
  const ownerAddress = Address.fromAddressOrString(address);
47293
- assert3(!this.#isLocked, ERROR_MESSAGES.wallet_not_unlocked);
47294
- const vaultState = this.#vaults.find(
47353
+ assert3(!__privateGet(this, _isLocked), ERROR_MESSAGES.wallet_not_unlocked);
47354
+ const vaultState = __privateGet(this, _vaults).find(
47295
47355
  (vs) => vs.vault.getAccounts().find((a) => a.address.equals(ownerAddress))
47296
47356
  );
47297
47357
  assert3(vaultState, ERROR_MESSAGES.address_not_found);
@@ -47303,7 +47363,7 @@ ${MessageCoinFragmentFragmentDoc}`;
47303
47363
  */
47304
47364
  async addAccount(options) {
47305
47365
  await this.loadState();
47306
- const vaultState = this.#vaults[options?.vaultId || 0];
47366
+ const vaultState = __privateGet(this, _vaults)[options?.vaultId || 0];
47307
47367
  await assert3(vaultState, ERROR_MESSAGES.vault_not_found);
47308
47368
  const account = vaultState.vault.addAccount();
47309
47369
  await this.saveState();
@@ -47314,7 +47374,7 @@ ${MessageCoinFragmentFragmentDoc}`;
47314
47374
  * created by the vault.
47315
47375
  */
47316
47376
  async removeVault(index) {
47317
- this.#vaults.splice(index, 1);
47377
+ __privateGet(this, _vaults).splice(index, 1);
47318
47378
  await this.saveState();
47319
47379
  }
47320
47380
  /**
@@ -47325,11 +47385,11 @@ ${MessageCoinFragmentFragmentDoc}`;
47325
47385
  await this.loadState();
47326
47386
  const Vault2 = this.getVaultClass(vaultConfig.type);
47327
47387
  const vault = new Vault2(vaultConfig);
47328
- this.#vaults = this.#vaults.concat({
47388
+ __privateSet(this, _vaults, __privateGet(this, _vaults).concat({
47329
47389
  title: vaultConfig.title,
47330
47390
  type: vaultConfig.type,
47331
47391
  vault
47332
- });
47392
+ }));
47333
47393
  await this.saveState();
47334
47394
  }
47335
47395
  /**
@@ -47337,9 +47397,9 @@ ${MessageCoinFragmentFragmentDoc}`;
47337
47397
  * secrets.
47338
47398
  */
47339
47399
  lock() {
47340
- this.#isLocked = true;
47341
- this.#vaults = [];
47342
- this.#passphrase = "";
47400
+ __privateSet(this, _isLocked, true);
47401
+ __privateSet(this, _vaults, []);
47402
+ __privateSet(this, _passphrase, "");
47343
47403
  this.emit("lock");
47344
47404
  }
47345
47405
  /**
@@ -47347,8 +47407,8 @@ ${MessageCoinFragmentFragmentDoc}`;
47347
47407
  * Vaults with secrets are not unlocked or instantiated on this moment.
47348
47408
  */
47349
47409
  async unlock(passphrase) {
47350
- this.#passphrase = passphrase;
47351
- this.#isLocked = false;
47410
+ __privateSet(this, _passphrase, passphrase);
47411
+ __privateSet(this, _isLocked, false);
47352
47412
  try {
47353
47413
  await this.loadState();
47354
47414
  this.emit("unlock");
@@ -47361,9 +47421,9 @@ ${MessageCoinFragmentFragmentDoc}`;
47361
47421
  * Update WalletManager encryption passphrase
47362
47422
  */
47363
47423
  async updatePassphrase(oldpass, newpass) {
47364
- const isLocked = this.#isLocked;
47424
+ const isLocked = __privateGet(this, _isLocked);
47365
47425
  await this.unlock(oldpass);
47366
- this.#passphrase = newpass;
47426
+ __privateSet(this, _passphrase, newpass);
47367
47427
  await this.saveState();
47368
47428
  await this.loadState();
47369
47429
  if (isLocked) {
@@ -47374,51 +47434,24 @@ ${MessageCoinFragmentFragmentDoc}`;
47374
47434
  * Retrieve and decrypt WalletManager state from storage
47375
47435
  */
47376
47436
  async loadState() {
47377
- await assert3(!this.#isLocked, ERROR_MESSAGES.wallet_not_unlocked);
47437
+ await assert3(!__privateGet(this, _isLocked), ERROR_MESSAGES.wallet_not_unlocked);
47378
47438
  const data = await this.storage.getItem(this.STORAGE_KEY);
47379
47439
  if (data) {
47380
- const state = await decrypt2(this.#passphrase, JSON.parse(data));
47381
- this.#vaults = this.#deserializeVaults(state.vaults);
47440
+ const state = await decrypt2(__privateGet(this, _passphrase), JSON.parse(data));
47441
+ __privateSet(this, _vaults, __privateMethod(this, _deserializeVaults, deserializeVaults_fn).call(this, state.vaults));
47382
47442
  }
47383
47443
  }
47384
47444
  /**
47385
47445
  * Store encrypted WalletManager state on storage
47386
47446
  */
47387
47447
  async saveState() {
47388
- await assert3(!this.#isLocked, ERROR_MESSAGES.wallet_not_unlocked);
47389
- const encryptedData = await encrypt2(this.#passphrase, {
47390
- vaults: this.#serializeVaults(this.#vaults)
47448
+ await assert3(!__privateGet(this, _isLocked), ERROR_MESSAGES.wallet_not_unlocked);
47449
+ const encryptedData = await encrypt2(__privateGet(this, _passphrase), {
47450
+ vaults: __privateMethod(this, _serializeVaults, serializeVaults_fn).call(this, __privateGet(this, _vaults))
47391
47451
  });
47392
47452
  await this.storage.setItem(this.STORAGE_KEY, JSON.stringify(encryptedData));
47393
47453
  this.emit("update");
47394
47454
  }
47395
- /**
47396
- * Serialize all vaults to store
47397
- *
47398
- * `This is only accessible from inside the class`
47399
- */
47400
- #serializeVaults(vaults) {
47401
- return vaults.map(({ title, type: type3, vault }) => ({
47402
- title,
47403
- type: type3,
47404
- data: vault.serialize()
47405
- }));
47406
- }
47407
- /**
47408
- * Deserialize all vaults to state
47409
- *
47410
- * `This is only accessible from inside the class`
47411
- */
47412
- #deserializeVaults(vaults) {
47413
- return vaults.map(({ title, type: type3, data: vaultConfig }) => {
47414
- const VaultClass = this.getVaultClass(type3);
47415
- return {
47416
- title,
47417
- type: type3,
47418
- vault: new VaultClass(vaultConfig)
47419
- };
47420
- });
47421
- }
47422
47455
  /**
47423
47456
  * Return a instantiable Class reference from `WalletManager.Vaults` supported list.
47424
47457
  */
@@ -47428,10 +47461,42 @@ ${MessageCoinFragmentFragmentDoc}`;
47428
47461
  return VaultClass;
47429
47462
  }
47430
47463
  };
47464
+ var WalletManager = _WalletManager;
47465
+ _vaults = new WeakMap();
47466
+ _passphrase = new WeakMap();
47467
+ _isLocked = new WeakMap();
47468
+ _serializeVaults = new WeakSet();
47469
+ serializeVaults_fn = function(vaults) {
47470
+ return vaults.map(({ title, type: type3, vault }) => ({
47471
+ title,
47472
+ type: type3,
47473
+ data: vault.serialize()
47474
+ }));
47475
+ };
47476
+ _deserializeVaults = new WeakSet();
47477
+ deserializeVaults_fn = function(vaults) {
47478
+ return vaults.map(({ title, type: type3, data: vaultConfig }) => {
47479
+ const VaultClass = this.getVaultClass(type3);
47480
+ return {
47481
+ title,
47482
+ type: type3,
47483
+ vault: new VaultClass(vaultConfig)
47484
+ };
47485
+ });
47486
+ };
47487
+ /**
47488
+ * Vaults
47489
+ *
47490
+ * Vaults are responsible to store secret keys and return an `Wallet` instance,
47491
+ * to interact with the network.
47492
+ *
47493
+ * Each vault has access to its own state
47494
+ *
47495
+ */
47496
+ __publicField(WalletManager, "Vaults", [MnemonicVault, PrivateKeyVault]);
47431
47497
 
47432
47498
  // src/wallet-manager/types.ts
47433
47499
  var Vault = class {
47434
- static type;
47435
47500
  constructor(_options) {
47436
47501
  throw new FuelError(ErrorCode.NOT_IMPLEMENTED, "Not implemented.");
47437
47502
  }
@@ -47451,6 +47516,7 @@ ${MessageCoinFragmentFragmentDoc}`;
47451
47516
  throw new FuelError(ErrorCode.NOT_IMPLEMENTED, "Not implemented.");
47452
47517
  }
47453
47518
  };
47519
+ __publicField(Vault, "type");
47454
47520
  var StorageAbstract = class {
47455
47521
  };
47456
47522
 
@@ -47522,7 +47588,7 @@ ${MessageCoinFragmentFragmentDoc}`;
47522
47588
  };
47523
47589
 
47524
47590
  // src/predicate/predicate.ts
47525
- var Predicate = class _Predicate extends Account {
47591
+ var Predicate = class extends Account {
47526
47592
  bytes;
47527
47593
  predicateDataBytes = Uint8Array.from([]);
47528
47594
  predicateData = [];
@@ -47543,7 +47609,7 @@ ${MessageCoinFragmentFragmentDoc}`;
47543
47609
  inputData,
47544
47610
  configurableConstants
47545
47611
  }) {
47546
- const { predicateBytes, predicateInterface } = _Predicate.processPredicateData(
47612
+ const { predicateBytes, predicateInterface } = Predicate.processPredicateData(
47547
47613
  bytecode,
47548
47614
  abi,
47549
47615
  configurableConstants
@@ -47639,7 +47705,7 @@ ${MessageCoinFragmentFragmentDoc}`;
47639
47705
  }
47640
47706
  }
47641
47707
  if (configurableConstants && Object.keys(configurableConstants).length) {
47642
- predicateBytes = _Predicate.setConfigurableConstants(
47708
+ predicateBytes = Predicate.setConfigurableConstants(
47643
47709
  predicateBytes,
47644
47710
  configurableConstants,
47645
47711
  abiInterface
@@ -48016,9 +48082,7 @@ ${MessageCoinFragmentFragmentDoc}`;
48016
48082
  var HAS_CONNECTOR_TIMEOUT = 2e3;
48017
48083
  var PING_CACHE_TIME = 5e3;
48018
48084
  var { warn } = console;
48019
- var Fuel = class _Fuel extends FuelConnector {
48020
- static STORAGE_KEY = "fuel-current-connector";
48021
- static defaultConfig = {};
48085
+ var _Fuel = class extends FuelConnector {
48022
48086
  _storage = null;
48023
48087
  _connectors = [];
48024
48088
  _targetObject = null;
@@ -48343,6 +48407,9 @@ ${MessageCoinFragmentFragmentDoc}`;
48343
48407
  await this.clean();
48344
48408
  }
48345
48409
  };
48410
+ var Fuel = _Fuel;
48411
+ __publicField(Fuel, "STORAGE_KEY", "fuel-current-connector");
48412
+ __publicField(Fuel, "defaultConfig", {});
48346
48413
  })();
48347
48414
  /*! Bundled license information:
48348
48415