@fuel-ts/account 0.0.0-rc-2143-20240514195947 → 0.0.0-rc-2143-20240514211533

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.

@@ -7772,38 +7772,6 @@ var english = [
7772
7772
  var import_errors18 = require("@fuel-ts/errors");
7773
7773
  var import_hasher4 = require("@fuel-ts/hasher");
7774
7774
  var import_utils32 = require("@fuel-ts/utils");
7775
- function toUtf8Bytes(stri) {
7776
- const str = stri.normalize("NFKD");
7777
- const result = [];
7778
- for (let i = 0; i < str.length; i += 1) {
7779
- const c = str.charCodeAt(i);
7780
- if (c < 128) {
7781
- result.push(c);
7782
- } else if (c < 2048) {
7783
- result.push(c >> 6 | 192);
7784
- result.push(c & 63 | 128);
7785
- } else if ((c & 64512) === 55296) {
7786
- i += 1;
7787
- const c2 = str.charCodeAt(i);
7788
- if (i >= str.length || (c2 & 64512) !== 56320) {
7789
- throw new import_errors18.FuelError(
7790
- import_errors18.ErrorCode.INVALID_INPUT_PARAMETERS,
7791
- "Invalid UTF-8 in the input string."
7792
- );
7793
- }
7794
- const pair = 65536 + ((c & 1023) << 10) + (c2 & 1023);
7795
- result.push(pair >> 18 | 240);
7796
- result.push(pair >> 12 & 63 | 128);
7797
- result.push(pair >> 6 & 63 | 128);
7798
- result.push(pair & 63 | 128);
7799
- } else {
7800
- result.push(c >> 12 | 224);
7801
- result.push(c >> 6 & 63 | 128);
7802
- result.push(c & 63 | 128);
7803
- }
7804
- }
7805
- return Uint8Array.from(result);
7806
- }
7807
7775
  function getLowerMask(bits) {
7808
7776
  return (1 << bits) - 1;
7809
7777
  }
@@ -7876,7 +7844,7 @@ function mnemonicWordsToEntropy(words, wordlist) {
7876
7844
  }
7877
7845
 
7878
7846
  // src/mnemonic/mnemonic.ts
7879
- var MasterSecret = toUtf8Bytes("Bitcoin seed");
7847
+ var MasterSecret = (0, import_utils33.toUtf8Bytes)("Bitcoin seed");
7880
7848
  var MainnetPRV = "0x0488ade4";
7881
7849
  var TestnetPRV = "0x04358394";
7882
7850
  var MNEMONIC_SIZES = [12, 15, 18, 21, 24];
@@ -7960,8 +7928,8 @@ var Mnemonic = class {
7960
7928
  */
7961
7929
  static mnemonicToSeed(phrase, passphrase = "") {
7962
7930
  assertMnemonic(getWords(phrase));
7963
- const phraseBytes = toUtf8Bytes(getPhrase(phrase));
7964
- const salt = toUtf8Bytes(`mnemonic${passphrase}`);
7931
+ const phraseBytes = (0, import_utils33.toUtf8Bytes)(getPhrase(phrase));
7932
+ const salt = (0, import_utils33.toUtf8Bytes)(`mnemonic${passphrase}`);
7965
7933
  return (0, import_crypto4.pbkdf2)(phraseBytes, salt, 2048, 64, "sha512");
7966
7934
  }
7967
7935
  /**