@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.
- package/dist/index.global.js +231 -456
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +3 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -33
- package/dist/index.mjs.map +1 -1
- package/dist/mnemonic/mnemonic.d.ts.map +1 -1
- package/dist/mnemonic/utils.d.ts +0 -1
- package/dist/mnemonic/utils.d.ts.map +1 -1
- package/dist/test-utils.global.js +229 -454
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +3 -35
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +1 -33
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +15 -15
package/dist/test-utils.mjs
CHANGED
@@ -5708,7 +5708,7 @@ import { arrayify as arrayify18, hexlify as hexlify17, concat as concat5, dataSl
|
|
5708
5708
|
import { randomBytes as randomBytes4, pbkdf2, computeHmac } from "@fuel-ts/crypto";
|
5709
5709
|
import { ErrorCode as ErrorCode18, FuelError as FuelError18 } from "@fuel-ts/errors";
|
5710
5710
|
import { sha256 as sha2563 } from "@fuel-ts/hasher";
|
5711
|
-
import { arrayify as arrayify17, hexlify as hexlify16, concat as concat4, dataSlice, encodeBase58 } from "@fuel-ts/utils";
|
5711
|
+
import { arrayify as arrayify17, hexlify as hexlify16, concat as concat4, dataSlice, encodeBase58, toUtf8Bytes } from "@fuel-ts/utils";
|
5712
5712
|
|
5713
5713
|
// src/wordlists/words/english.ts
|
5714
5714
|
var english = [
|
@@ -7766,38 +7766,6 @@ var english = [
|
|
7766
7766
|
import { ErrorCode as ErrorCode17, FuelError as FuelError17 } from "@fuel-ts/errors";
|
7767
7767
|
import { sha256 as sha2562 } from "@fuel-ts/hasher";
|
7768
7768
|
import { arrayify as arrayify16 } from "@fuel-ts/utils";
|
7769
|
-
function toUtf8Bytes(stri) {
|
7770
|
-
const str = stri.normalize("NFKD");
|
7771
|
-
const result = [];
|
7772
|
-
for (let i = 0; i < str.length; i += 1) {
|
7773
|
-
const c = str.charCodeAt(i);
|
7774
|
-
if (c < 128) {
|
7775
|
-
result.push(c);
|
7776
|
-
} else if (c < 2048) {
|
7777
|
-
result.push(c >> 6 | 192);
|
7778
|
-
result.push(c & 63 | 128);
|
7779
|
-
} else if ((c & 64512) === 55296) {
|
7780
|
-
i += 1;
|
7781
|
-
const c2 = str.charCodeAt(i);
|
7782
|
-
if (i >= str.length || (c2 & 64512) !== 56320) {
|
7783
|
-
throw new FuelError17(
|
7784
|
-
ErrorCode17.INVALID_INPUT_PARAMETERS,
|
7785
|
-
"Invalid UTF-8 in the input string."
|
7786
|
-
);
|
7787
|
-
}
|
7788
|
-
const pair = 65536 + ((c & 1023) << 10) + (c2 & 1023);
|
7789
|
-
result.push(pair >> 18 | 240);
|
7790
|
-
result.push(pair >> 12 & 63 | 128);
|
7791
|
-
result.push(pair >> 6 & 63 | 128);
|
7792
|
-
result.push(pair & 63 | 128);
|
7793
|
-
} else {
|
7794
|
-
result.push(c >> 12 | 224);
|
7795
|
-
result.push(c >> 6 & 63 | 128);
|
7796
|
-
result.push(c & 63 | 128);
|
7797
|
-
}
|
7798
|
-
}
|
7799
|
-
return Uint8Array.from(result);
|
7800
|
-
}
|
7801
7769
|
function getLowerMask(bits) {
|
7802
7770
|
return (1 << bits) - 1;
|
7803
7771
|
}
|