@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/index.mjs
CHANGED
@@ -6025,7 +6025,7 @@ import { arrayify as arrayify18, hexlify as hexlify17, concat as concat5, dataSl
|
|
6025
6025
|
import { randomBytes as randomBytes4, pbkdf2, computeHmac } from "@fuel-ts/crypto";
|
6026
6026
|
import { ErrorCode as ErrorCode18, FuelError as FuelError18 } from "@fuel-ts/errors";
|
6027
6027
|
import { sha256 as sha2563 } from "@fuel-ts/hasher";
|
6028
|
-
import { arrayify as arrayify17, hexlify as hexlify16, concat as concat4, dataSlice, encodeBase58 } from "@fuel-ts/utils";
|
6028
|
+
import { arrayify as arrayify17, hexlify as hexlify16, concat as concat4, dataSlice, encodeBase58, toUtf8Bytes } from "@fuel-ts/utils";
|
6029
6029
|
|
6030
6030
|
// src/wordlists/words/english.ts
|
6031
6031
|
var english = [
|
@@ -8089,38 +8089,6 @@ var Language = /* @__PURE__ */ ((Language2) => {
|
|
8089
8089
|
import { ErrorCode as ErrorCode17, FuelError as FuelError17 } from "@fuel-ts/errors";
|
8090
8090
|
import { sha256 as sha2562 } from "@fuel-ts/hasher";
|
8091
8091
|
import { arrayify as arrayify16 } from "@fuel-ts/utils";
|
8092
|
-
function toUtf8Bytes(stri) {
|
8093
|
-
const str = stri.normalize("NFKD");
|
8094
|
-
const result = [];
|
8095
|
-
for (let i = 0; i < str.length; i += 1) {
|
8096
|
-
const c = str.charCodeAt(i);
|
8097
|
-
if (c < 128) {
|
8098
|
-
result.push(c);
|
8099
|
-
} else if (c < 2048) {
|
8100
|
-
result.push(c >> 6 | 192);
|
8101
|
-
result.push(c & 63 | 128);
|
8102
|
-
} else if ((c & 64512) === 55296) {
|
8103
|
-
i += 1;
|
8104
|
-
const c2 = str.charCodeAt(i);
|
8105
|
-
if (i >= str.length || (c2 & 64512) !== 56320) {
|
8106
|
-
throw new FuelError17(
|
8107
|
-
ErrorCode17.INVALID_INPUT_PARAMETERS,
|
8108
|
-
"Invalid UTF-8 in the input string."
|
8109
|
-
);
|
8110
|
-
}
|
8111
|
-
const pair = 65536 + ((c & 1023) << 10) + (c2 & 1023);
|
8112
|
-
result.push(pair >> 18 | 240);
|
8113
|
-
result.push(pair >> 12 & 63 | 128);
|
8114
|
-
result.push(pair >> 6 & 63 | 128);
|
8115
|
-
result.push(pair & 63 | 128);
|
8116
|
-
} else {
|
8117
|
-
result.push(c >> 12 | 224);
|
8118
|
-
result.push(c >> 6 & 63 | 128);
|
8119
|
-
result.push(c & 63 | 128);
|
8120
|
-
}
|
8121
|
-
}
|
8122
|
-
return Uint8Array.from(result);
|
8123
|
-
}
|
8124
8092
|
function getLowerMask(bits) {
|
8125
8093
|
return (1 << bits) - 1;
|
8126
8094
|
}
|