@fuel-ts/account 0.0.0-rc-2322-20240517062704 → 0.0.0-rc-2272-20240517113706

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

package/dist/configs.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export declare const FUEL_NETWORK_URL: string;
2
- export declare const FUEL_BETA_5_NETWORK_URL: string;
2
+ export declare const FUEL_TESTNET_NETWORK_URL: string;
3
3
  //# sourceMappingURL=configs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../src/configs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAE,MAGS,CAAC;AAEzC,eAAO,MAAM,uBAAuB,EAAE,MAA8C,CAAC"}
1
+ {"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../src/configs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAE,MAGS,CAAC;AAEzC,eAAO,MAAM,wBAAwB,EAAE,MAAiD,CAAC"}
@@ -2,6 +2,6 @@
2
2
  (() => {
3
3
  // src/configs.ts
4
4
  var FUEL_NETWORK_URL = typeof process !== "undefined" ? process?.env?.FUEL_NETWORK_URL || "http://127.0.0.1:4000/v1/graphql" : "http://127.0.0.1:4000/v1/graphql";
5
- var FUEL_BETA_5_NETWORK_URL = "https://beta-5.fuel.network/graphql";
5
+ var FUEL_TESTNET_NETWORK_URL = "https://devnet.fuel.network/v1/graphql";
6
6
  })();
7
7
  //# sourceMappingURL=configs.global.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/configs.ts"],"sourcesContent":["export const FUEL_NETWORK_URL: string =\n typeof process !== 'undefined'\n ? process?.env?.FUEL_NETWORK_URL || 'http://127.0.0.1:4000/v1/graphql'\n : 'http://127.0.0.1:4000/v1/graphql';\n\nexport const FUEL_BETA_5_NETWORK_URL: string = 'https://beta-5.fuel.network/graphql';\n"],"mappings":";;;AAAO,MAAM,mBACX,OAAO,YAAY,cACf,SAAS,KAAK,oBAAoB,qCAClC;AAEC,MAAM,0BAAkC;","names":[]}
1
+ {"version":3,"sources":["../src/configs.ts"],"sourcesContent":["export const FUEL_NETWORK_URL: string =\n typeof process !== 'undefined'\n ? process?.env?.FUEL_NETWORK_URL || 'http://127.0.0.1:4000/v1/graphql'\n : 'http://127.0.0.1:4000/v1/graphql';\n\nexport const FUEL_TESTNET_NETWORK_URL: string = 'https://devnet.fuel.network/v1/graphql';\n"],"mappings":";;;AAAO,MAAM,mBACX,OAAO,YAAY,cACf,SAAS,KAAK,oBAAoB,qCAClC;AAEC,MAAM,2BAAmC;","names":[]}
package/dist/configs.js CHANGED
@@ -20,15 +20,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/configs.ts
21
21
  var configs_exports = {};
22
22
  __export(configs_exports, {
23
- FUEL_BETA_5_NETWORK_URL: () => FUEL_BETA_5_NETWORK_URL,
24
- FUEL_NETWORK_URL: () => FUEL_NETWORK_URL
23
+ FUEL_NETWORK_URL: () => FUEL_NETWORK_URL,
24
+ FUEL_TESTNET_NETWORK_URL: () => FUEL_TESTNET_NETWORK_URL
25
25
  });
26
26
  module.exports = __toCommonJS(configs_exports);
27
27
  var FUEL_NETWORK_URL = typeof process !== "undefined" ? process?.env?.FUEL_NETWORK_URL || "http://127.0.0.1:4000/v1/graphql" : "http://127.0.0.1:4000/v1/graphql";
28
- var FUEL_BETA_5_NETWORK_URL = "https://beta-5.fuel.network/graphql";
28
+ var FUEL_TESTNET_NETWORK_URL = "https://devnet.fuel.network/v1/graphql";
29
29
  // Annotate the CommonJS export names for ESM import in node:
30
30
  0 && (module.exports = {
31
- FUEL_BETA_5_NETWORK_URL,
32
- FUEL_NETWORK_URL
31
+ FUEL_NETWORK_URL,
32
+ FUEL_TESTNET_NETWORK_URL
33
33
  });
34
34
  //# sourceMappingURL=configs.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/configs.ts"],"sourcesContent":["export const FUEL_NETWORK_URL: string =\n typeof process !== 'undefined'\n ? process?.env?.FUEL_NETWORK_URL || 'http://127.0.0.1:4000/v1/graphql'\n : 'http://127.0.0.1:4000/v1/graphql';\n\nexport const FUEL_BETA_5_NETWORK_URL: string = 'https://beta-5.fuel.network/graphql';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,mBACX,OAAO,YAAY,cACf,SAAS,KAAK,oBAAoB,qCAClC;AAEC,IAAM,0BAAkC;","names":[]}
1
+ {"version":3,"sources":["../src/configs.ts"],"sourcesContent":["export const FUEL_NETWORK_URL: string =\n typeof process !== 'undefined'\n ? process?.env?.FUEL_NETWORK_URL || 'http://127.0.0.1:4000/v1/graphql'\n : 'http://127.0.0.1:4000/v1/graphql';\n\nexport const FUEL_TESTNET_NETWORK_URL: string = 'https://devnet.fuel.network/v1/graphql';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,mBACX,OAAO,YAAY,cACf,SAAS,KAAK,oBAAoB,qCAClC;AAEC,IAAM,2BAAmC;","names":[]}
package/dist/configs.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  // src/configs.ts
2
2
  var FUEL_NETWORK_URL = typeof process !== "undefined" ? process?.env?.FUEL_NETWORK_URL || "http://127.0.0.1:4000/v1/graphql" : "http://127.0.0.1:4000/v1/graphql";
3
- var FUEL_BETA_5_NETWORK_URL = "https://beta-5.fuel.network/graphql";
3
+ var FUEL_TESTNET_NETWORK_URL = "https://devnet.fuel.network/v1/graphql";
4
4
  export {
5
- FUEL_BETA_5_NETWORK_URL,
6
- FUEL_NETWORK_URL
5
+ FUEL_NETWORK_URL,
6
+ FUEL_TESTNET_NETWORK_URL
7
7
  };
8
8
  //# sourceMappingURL=configs.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/configs.ts"],"sourcesContent":["export const FUEL_NETWORK_URL: string =\n typeof process !== 'undefined'\n ? process?.env?.FUEL_NETWORK_URL || 'http://127.0.0.1:4000/v1/graphql'\n : 'http://127.0.0.1:4000/v1/graphql';\n\nexport const FUEL_BETA_5_NETWORK_URL: string = 'https://beta-5.fuel.network/graphql';\n"],"mappings":";AAAO,IAAM,mBACX,OAAO,YAAY,cACf,SAAS,KAAK,oBAAoB,qCAClC;AAEC,IAAM,0BAAkC;","names":[]}
1
+ {"version":3,"sources":["../src/configs.ts"],"sourcesContent":["export const FUEL_NETWORK_URL: string =\n typeof process !== 'undefined'\n ? process?.env?.FUEL_NETWORK_URL || 'http://127.0.0.1:4000/v1/graphql'\n : 'http://127.0.0.1:4000/v1/graphql';\n\nexport const FUEL_TESTNET_NETWORK_URL: string = 'https://devnet.fuel.network/v1/graphql';\n"],"mappings":";AAAO,IAAM,mBACX,OAAO,YAAY,cACf,SAAS,KAAK,oBAAoB,qCAClC;AAEC,IAAM,2BAAmC;","names":[]}
@@ -29472,7 +29472,7 @@ spurious results.`);
29472
29472
  return {
29473
29473
  FORC: "0.58.0",
29474
29474
  FUEL_CORE: "0.26.0",
29475
- FUELS: "0.86.0"
29475
+ FUELS: "0.87.0"
29476
29476
  };
29477
29477
  }
29478
29478
  function parseVersion(version) {
@@ -30970,16 +30970,34 @@ This unreleased fuel-core build may include features and updates not yet support
30970
30970
  WORD_SIZE + // Predicate size
30971
30971
  WORD_SIZE + // Predicate data size
30972
30972
  WORD_SIZE;
30973
+ var isUint8Array = (value) => value instanceof Uint8Array;
30974
+ var hasNestedOption = (coders) => {
30975
+ const array = Array.isArray(coders) ? coders : Object.values(coders);
30976
+ for (const node of array) {
30977
+ if (node.type === OPTION_CODER_TYPE) {
30978
+ return true;
30979
+ }
30980
+ if ("coder" in node && node.coder.type === OPTION_CODER_TYPE) {
30981
+ return true;
30982
+ }
30983
+ if ("coders" in node) {
30984
+ const child = hasNestedOption(node.coders);
30985
+ if (child) {
30986
+ return true;
30987
+ }
30988
+ }
30989
+ }
30990
+ return false;
30991
+ };
30973
30992
  var ArrayCoder = class extends Coder {
30974
30993
  coder;
30975
30994
  length;
30976
30995
  #hasNestedOption;
30977
30996
  constructor(coder, length) {
30978
- const hasNestedOption = coder.type === OPTION_CODER_TYPE;
30979
30997
  super("array", `[${coder.type}; ${length}]`, length * coder.encodedLength);
30980
30998
  this.coder = coder;
30981
30999
  this.length = length;
30982
- this.#hasNestedOption = hasNestedOption;
31000
+ this.#hasNestedOption = hasNestedOption([coder]);
30983
31001
  }
30984
31002
  encode(value) {
30985
31003
  if (!Array.isArray(value)) {
@@ -31159,7 +31177,6 @@ This unreleased fuel-core build may include features and updates not yet support
31159
31177
  #encodedValueSize;
31160
31178
  #hasNestedOption;
31161
31179
  constructor(name, coders) {
31162
- const hasNestedOption = Object.values(coders).some((coder) => coder.type === OPTION_CODER_TYPE);
31163
31180
  const caseIndexCoder = new BigNumberCoder("u64");
31164
31181
  const encodedValueSize = Object.values(coders).reduce(
31165
31182
  (max, coder) => Math.max(max, coder.encodedLength),
@@ -31170,7 +31187,7 @@ This unreleased fuel-core build may include features and updates not yet support
31170
31187
  this.coders = coders;
31171
31188
  this.#caseIndexCoder = caseIndexCoder;
31172
31189
  this.#encodedValueSize = encodedValueSize;
31173
- this.#hasNestedOption = hasNestedOption;
31190
+ this.#hasNestedOption = hasNestedOption(coders);
31174
31191
  }
31175
31192
  #encodeNativeEnum(value) {
31176
31193
  const valueCoder = this.coders[value];
@@ -31391,7 +31408,6 @@ This unreleased fuel-core build may include features and updates not yet support
31391
31408
  coders;
31392
31409
  #hasNestedOption;
31393
31410
  constructor(name, coders) {
31394
- const hasNestedOption = Object.values(coders).some((coder) => coder.type === OPTION_CODER_TYPE);
31395
31411
  const encodedLength = Object.values(coders).reduce(
31396
31412
  (acc, coder) => acc + coder.encodedLength,
31397
31413
  0
@@ -31399,7 +31415,7 @@ This unreleased fuel-core build may include features and updates not yet support
31399
31415
  super("struct", `struct ${name}`, encodedLength);
31400
31416
  this.name = name;
31401
31417
  this.coders = coders;
31402
- this.#hasNestedOption = hasNestedOption;
31418
+ this.#hasNestedOption = hasNestedOption(coders);
31403
31419
  }
31404
31420
  encode(value) {
31405
31421
  return concatBytes2(
@@ -31435,11 +31451,10 @@ This unreleased fuel-core build may include features and updates not yet support
31435
31451
  coders;
31436
31452
  #hasNestedOption;
31437
31453
  constructor(coders) {
31438
- const hasNestedOption = coders.some((coder) => coder.type === OPTION_CODER_TYPE);
31439
31454
  const encodedLength = coders.reduce((acc, coder) => acc + coder.encodedLength, 0);
31440
31455
  super("tuple", `(${coders.map((coder) => coder.type).join(", ")})`, encodedLength);
31441
31456
  this.coders = coders;
31442
- this.#hasNestedOption = hasNestedOption;
31457
+ this.#hasNestedOption = hasNestedOption(coders);
31443
31458
  }
31444
31459
  encode(value) {
31445
31460
  if (this.coders.length !== value.length) {
@@ -31460,14 +31475,13 @@ This unreleased fuel-core build may include features and updates not yet support
31460
31475
  return [decodedValue, newOffset];
31461
31476
  }
31462
31477
  };
31463
- var isUint8Array = (value) => value instanceof Uint8Array;
31464
31478
  var VecCoder = class extends Coder {
31465
31479
  coder;
31466
31480
  #hasNestedOption;
31467
31481
  constructor(coder) {
31468
31482
  super("struct", `struct Vec`, coder.encodedLength + WORD_SIZE);
31469
31483
  this.coder = coder;
31470
- this.#hasNestedOption = coder.type === OPTION_CODER_TYPE;
31484
+ this.#hasNestedOption = hasNestedOption([coder]);
31471
31485
  }
31472
31486
  encode(value) {
31473
31487
  if (!Array.isArray(value) && !isUint8Array(value)) {
@@ -41598,7 +41612,7 @@ Supported fuel-core version: ${supportedVersion}.`
41598
41612
  return CHAIN_IDS.eth.sepolia;
41599
41613
  }
41600
41614
  if (networkType === "fuel") {
41601
- return CHAIN_IDS.fuel.beta5;
41615
+ return CHAIN_IDS.fuel.devnet;
41602
41616
  }
41603
41617
  return void 0;
41604
41618
  };