@fleet-sdk/common 0.1.0-alpha.16 → 0.1.0-alpha.18
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.
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +19 -0
- package/dist/cjs/types/boxes.d.ts +21 -0
- package/dist/cjs/types/boxes.js +3 -0
- package/dist/cjs/types/common.d.ts +18 -0
- package/dist/cjs/types/common.js +15 -0
- package/dist/cjs/types/contextExtension.d.ts +4 -0
- package/dist/cjs/types/contextExtension.js +3 -0
- package/dist/cjs/types/index.d.ts +8 -0
- package/dist/cjs/types/index.js +25 -0
- package/dist/cjs/types/inputs.d.ts +37 -0
- package/dist/cjs/types/inputs.js +3 -0
- package/dist/cjs/types/proverResult.d.ts +6 -0
- package/dist/cjs/types/proverResult.js +3 -0
- package/dist/cjs/types/registers.d.ts +9 -0
- package/dist/cjs/types/registers.js +3 -0
- package/dist/cjs/types/token.d.ts +18 -0
- package/dist/cjs/types/token.js +3 -0
- package/dist/cjs/types/transactions.d.ts +22 -0
- package/dist/cjs/types/transactions.js +3 -0
- package/dist/cjs/utils/arrayUtils.d.ts +21 -0
- package/dist/cjs/utils/arrayUtils.js +114 -0
- package/dist/cjs/utils/bigIntLiterals.d.ts +7 -0
- package/dist/cjs/utils/bigIntLiterals.js +12 -0
- package/dist/cjs/utils/bigIntUtils.d.ts +33 -0
- package/dist/cjs/utils/bigIntUtils.js +95 -0
- package/dist/cjs/utils/boxUtils.d.ts +17 -0
- package/dist/cjs/utils/boxUtils.js +53 -0
- package/dist/cjs/utils/index.d.ts +6 -0
- package/dist/cjs/utils/index.js +23 -0
- package/dist/cjs/utils/objectUtils.d.ts +3 -0
- package/dist/cjs/utils/objectUtils.js +23 -0
- package/dist/cjs/utils/stringUtils.d.ts +1 -0
- package/dist/cjs/utils/stringUtils.js +12 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/types/boxes.d.ts +21 -0
- package/dist/esm/types/boxes.js +2 -0
- package/dist/esm/types/common.d.ts +18 -0
- package/dist/esm/types/common.js +12 -0
- package/dist/esm/types/contextExtension.d.ts +4 -0
- package/dist/esm/types/contextExtension.js +2 -0
- package/dist/esm/types/index.d.ts +8 -0
- package/dist/esm/types/index.js +9 -0
- package/dist/esm/types/inputs.d.ts +37 -0
- package/dist/esm/types/inputs.js +2 -0
- package/dist/esm/types/proverResult.d.ts +6 -0
- package/dist/esm/types/proverResult.js +2 -0
- package/dist/esm/types/registers.d.ts +9 -0
- package/dist/esm/types/registers.js +2 -0
- package/dist/esm/types/token.d.ts +18 -0
- package/dist/esm/types/token.js +2 -0
- package/dist/esm/types/transactions.d.ts +22 -0
- package/dist/esm/types/transactions.js +2 -0
- package/dist/esm/utils/arrayUtils.d.ts +21 -0
- package/dist/esm/utils/arrayUtils.js +101 -0
- package/dist/esm/utils/bigIntLiterals.d.ts +7 -0
- package/dist/esm/utils/bigIntLiterals.js +9 -0
- package/dist/esm/utils/bigIntUtils.d.ts +33 -0
- package/dist/esm/utils/bigIntUtils.js +88 -0
- package/dist/esm/utils/boxUtils.d.ts +17 -0
- package/dist/esm/utils/boxUtils.js +48 -0
- package/dist/esm/utils/index.d.ts +6 -0
- package/dist/esm/utils/index.js +7 -0
- package/dist/esm/utils/objectUtils.d.ts +3 -0
- package/dist/esm/utils/objectUtils.js +17 -0
- package/dist/esm/utils/stringUtils.d.ts +1 -0
- package/dist/esm/utils/stringUtils.js +8 -0
- package/dist/tsconfig.esm.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/src/utils/bigIntUtils.ts +52 -21
@@ -0,0 +1,7 @@
|
|
1
|
+
export * from "./arrayUtils";
|
2
|
+
export * from "./bigIntLiterals";
|
3
|
+
export * from "./bigIntUtils";
|
4
|
+
export * from "./boxUtils";
|
5
|
+
export * from "./objectUtils";
|
6
|
+
export * from "./stringUtils";
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLGVBQWUsQ0FBQyJ9
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export function removeUndefined(value) {
|
2
|
+
const result = {};
|
3
|
+
for (const key in value) {
|
4
|
+
const val = value[key];
|
5
|
+
if (!isUndefined(val)) {
|
6
|
+
result[key] = val;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
return result;
|
10
|
+
}
|
11
|
+
export function isUndefined(value) {
|
12
|
+
return value === undefined || value === null || Number.isNaN(value);
|
13
|
+
}
|
14
|
+
export function isDefined(value) {
|
15
|
+
return !isUndefined(value);
|
16
|
+
}
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2JqZWN0VXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvb2JqZWN0VXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxVQUFVLGVBQWUsQ0FBQyxLQUE4QjtJQUM1RCxNQUFNLE1BQU0sR0FBNEIsRUFBRSxDQUFDO0lBQzNDLEtBQUssTUFBTSxHQUFHLElBQUksS0FBSyxFQUFFO1FBQ3ZCLE1BQU0sR0FBRyxHQUFHLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUN2QixJQUFJLENBQUMsV0FBVyxDQUFDLEdBQUcsQ0FBQyxFQUFFO1lBQ3JCLE1BQU0sQ0FBQyxHQUFHLENBQUMsR0FBRyxHQUFHLENBQUM7U0FDbkI7S0FDRjtJQUVELE9BQU8sTUFBTSxDQUFDO0FBQ2hCLENBQUM7QUFFRCxNQUFNLFVBQVUsV0FBVyxDQUFDLEtBQWM7SUFDeEMsT0FBTyxLQUFLLEtBQUssU0FBUyxJQUFJLEtBQUssS0FBSyxJQUFJLElBQUksTUFBTSxDQUFDLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQztBQUN0RSxDQUFDO0FBRUQsTUFBTSxVQUFVLFNBQVMsQ0FBSSxLQUFvQjtJQUMvQyxPQUFPLENBQUMsV0FBVyxDQUFDLEtBQUssQ0FBQyxDQUFDO0FBQzdCLENBQUMifQ==
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function isHex(value?: string): boolean;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
const HEX_PATTERN = /^[0-9A-Fa-f]+$/s;
|
2
|
+
export function isHex(value) {
|
3
|
+
if (!value) {
|
4
|
+
return false;
|
5
|
+
}
|
6
|
+
return HEX_PATTERN.test(value);
|
7
|
+
}
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nVXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvc3RyaW5nVXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxXQUFXLEdBQUcsaUJBQWlCLENBQUM7QUFFdEMsTUFBTSxVQUFVLEtBQUssQ0FBQyxLQUFjO0lBQ2xDLElBQUksQ0FBQyxLQUFLLEVBQUU7UUFDVixPQUFPLEtBQUssQ0FBQztLQUNkO0lBRUQsT0FBTyxXQUFXLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO0FBQ2pDLENBQUMifQ==
|
@@ -0,0 +1 @@
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.esnext.intl.d.ts","../src/types/common.ts","../src/types/registers.ts","../src/types/token.ts","../src/types/contextextension.ts","../src/types/proverresult.ts","../src/types/inputs.ts","../src/types/transactions.ts","../src/types/boxes.ts","../src/types/index.ts","../src/utils/arrayutils.ts","../src/utils/bigintliterals.ts","../src/utils/objectutils.ts","../src/utils/bigintutils.ts","../src/utils/boxutils.ts","../src/utils/stringutils.ts","../src/utils/index.ts","../src/index.ts","../src/utils/arrayutils.spec.ts","../src/utils/bigintutils.spec.ts","../src/utils/boxutils.spec.ts","../src/utils/objectutils.spec.ts","../src/utils/stringutils.spec.ts","../../../node_modules/.pnpm/@jest+expect-utils@29.3.1/node_modules/@jest/expect-utils/build/index.d.ts","../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts","../../../node_modules/.pnpm/@sinclair+typebox@0.24.51/node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/.pnpm/@jest+schemas@29.0.0/node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/.pnpm/pretty-format@29.3.1/node_modules/pretty-format/build/index.d.ts","../../../node_modules/.pnpm/jest-diff@29.3.1/node_modules/jest-diff/build/index.d.ts","../../../node_modules/.pnpm/jest-matcher-utils@29.3.1/node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/.pnpm/expect@29.3.1/node_modules/expect/build/index.d.ts","../../../node_modules/.pnpm/@types+jest@29.2.4/node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"e6eb57127a88a1f47a090ea0d6eacb4add29585857766ca65e53c71748acabaa","signature":"409de3512ac9133c99cf60ba87574b274619cef8a2cf370f213df48a039f1f69"},{"version":"b53341d7f6759d4a71578b2b7b497cceb2067d30ce031077a53c7fbdf1c375a6","signature":"75ae5b0486480ecdd33f86d756a3b6e7ef031505c14e030db42767e2da94d2a5"},{"version":"da8234901cbbdb15e72fa7c784089d6f34933d06871644ad90b5d67677726150","signature":"f197f943080469d48bcdac894b9a3671f6023b2d32b80156933af9ac58c13e3e"},{"version":"5bc21ee688c468d2503d0b8b3f2149c3de69f1818d1c385087d5057c064ca1f0","signature":"4c4bbdf363b8c4fed07cc3352b35a1cde26382d211d4654c72ba181aa270cf59"},{"version":"6ab3c39dde7ce12a2adc326ca241fb0fbf3aa5a1f369fbb63567c427a3867a42","signature":"ae5eba2a89183c03f7eba90838551b554564d8b3662b488ef1fc687c140fdaff"},{"version":"b55e4426e4faba28e922e130987177322a56fef71d55aff1666d503bed4e3a0e","signature":"fa635db5e53e8cceb6a0213f76aaaf2aec216cbf03f7840084a588cca32f3788"},{"version":"4fa91db1c7b75f2b82d050456701cd1bb7e111a5ea179833b29d945c1e96fc94","signature":"b562ba9065e410a6e15c29f5e4b7acb27fc7bac627cbe1a505ddfbbf1988a7cf"},{"version":"c240ab2119396480f0695f9af58c5d582e9cfb805d529c62864d9958f351398a","signature":"fae24fc56928c639017975415a21b2bea80bde889f73d379df6c1bff0b1bd0ee"},"39a8f730d15f94bdb4c44e5983357b9929c48ee822a730f0d128081b18fa1f1a",{"version":"b7524dd8265921da33611c00bec88f26934791ee7a8c3438f9245b9823757d1e","signature":"70ecf74b114240cfd8ad87d7d06c5ae2e9760ec59f5ae3af60e73763df5a7f48"},{"version":"ff83b5fe5859d25d5dd48d708de34268bfaa104158944519a0848284511c18bd","signature":"fbe85429303b8be3faf1b5788e9aa3655af08ee7a133fd6b55fb4b59ff0567b9"},{"version":"3c330b33dd477bd9e4672990dbc131062a3786f5ce0418098862ac078617747f","signature":"4cda8519af7f6bf1092d1a842ddab99216573a69d74b1ac204bf34bd3e899b20"},{"version":"754bad66ec92037825b8feafea63fddab50aa38b038835205fdd864cc3aa9b66","signature":"c933e0fbaa1a940e566d0902f05358c5c688fd51e9738e608cedcd46a3b87cca"},{"version":"15073c1df5755328a85ca371e190292bdcb2f470751313f322c9c0437400acae","signature":"cb3aaebb13987dd729866b6dbddd731418ea3d2eb865c078aa5e6eba009f325b"},{"version":"72b2f2fc8244e0327b9e561d14853af21111cc609797ae0ae452e0b1591ece83","signature":"5f9d521614065c2f784e739fe8a650c42627c60c3d1de7c03563fe50fa6fdcbb"},"36e9d06a2abed82f602b58ccb794c1d34ed9895d75c1bdc437b9dda8564f88ea","362b3156d0612172d8c87d6180a56086c5efbe91c91e8fd489bafa1116246a44",{"version":"6a1017e4d3a5ee22f67c7ab250ad0c6ab8622726ebcabf1d79f4e4d97fea9e4c","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"8216681c5ae308619cb43e3ccf4f16936f68ff7322ba24d1c1dd8ee82590f8a2","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"0e87b6adf9737ea41d2078d072c8257fdcaf851d9e146f4f8e53a437b67475cf","signature":"9584f743c8c8b9b3cb367eac0f86fa60c5fe3c9359ee0bcd39786cfedbd5a2b5"},{"version":"fb27447d65d36b72220bfa297280f921e4467b170d10247a909b60493fad6942","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"8689b1b7db9122e1bb3ce845c573a9eb75a579e48ff7be5392ad3dbad5e368d0","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"a7321c0e96eecb19dcbf178493836474cef21ee3f9345384ce9d74e4be31228d","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","3054ef91b855e005b9c4681399e9d64d2a7b07a22d539314d794f09e53b876a7","427ce5854885cfc34387e09de05c1d5c1acf94c2143e1693f1d9ff54880573e7","bed2c4f96fab3348be4a34d88dcb12578c1b2475b07c6acd369e99e227718d81","e3ba509d3dce019b3190ceb2f3fc88e2610ab717122dabd91a9efaa37804040d","9ac9b7b349a96ff204f4172183cca1672cc402e1ee7277bfcdec96c000b7d818","ac127e4c6f2b5220b293cc9d2e64ba49781225b792a51cda50f3db8eafba550c",{"version":"0c3b45b6a42c0074fadd59c5d370592ca48c89a706d903452565ca89b1b2c164","affectsGlobalScope":true}],"options":{"declaration":true,"esModuleInterop":true,"inlineSourceMap":true,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"outDir":"./esm","rootDir":"../src","strict":true,"target":99},"fileIdsList":[[80],[82,85],[78,84],[82],[79,83],[81],[64,71],[56,57,58,62],[56],[56,57,58,59,60,61,62,63],[56,57,58,59,60,62,63],[56,59],[56,61,63],[65],[64],[68],[64,65,66,67],[64,68,69],[64,66,67,68],[65,66,67,68,69,70],[67],[70]],"referencedMap":[[81,1],[86,2],[85,3],[83,4],[84,5],[82,6],[72,7],[63,8],[59,9],[64,10],[61,11],[60,12],[57,9],[62,13],[73,14],[65,15],[74,16],[68,17],[75,18],[69,19],[71,20],[76,21],[77,22]],"exportedModulesMap":[[81,1],[86,2],[85,3],[83,4],[84,5],[82,6],[72,7],[63,8],[59,9],[64,10],[61,11],[60,12],[57,9],[62,13],[65,15],[68,15],[75,15],[69,15],[71,20]],"semanticDiagnosticsPerFile":[78,81,80,86,79,85,83,84,82,11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,53,54,1,10,55,72,63,56,59,64,61,60,57,58,62,73,65,66,74,68,75,69,71,76,67,77,70]},"version":"4.9.4"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.4/node_modules/typescript/lib/lib.esnext.intl.d.ts","../src/types/common.ts","../src/types/registers.ts","../src/types/token.ts","../src/types/contextextension.ts","../src/types/proverresult.ts","../src/types/inputs.ts","../src/types/transactions.ts","../src/types/boxes.ts","../src/types/index.ts","../src/utils/arrayutils.ts","../src/utils/bigintliterals.ts","../src/utils/objectutils.ts","../src/utils/bigintutils.ts","../src/utils/boxutils.ts","../src/utils/stringutils.ts","../src/utils/index.ts","../src/index.ts","../src/utils/arrayutils.spec.ts","../src/utils/bigintutils.spec.ts","../src/utils/boxutils.spec.ts","../src/utils/objectutils.spec.ts","../src/utils/stringutils.spec.ts","../../../node_modules/.pnpm/@jest+expect-utils@29.3.1/node_modules/@jest/expect-utils/build/index.d.ts","../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts","../../../node_modules/.pnpm/@sinclair+typebox@0.24.51/node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/.pnpm/@jest+schemas@29.0.0/node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/.pnpm/pretty-format@29.3.1/node_modules/pretty-format/build/index.d.ts","../../../node_modules/.pnpm/jest-diff@29.3.1/node_modules/jest-diff/build/index.d.ts","../../../node_modules/.pnpm/jest-matcher-utils@29.3.1/node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/.pnpm/expect@29.3.1/node_modules/expect/build/index.d.ts","../../../node_modules/.pnpm/@types+jest@29.2.4/node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"e6eb57127a88a1f47a090ea0d6eacb4add29585857766ca65e53c71748acabaa","signature":"409de3512ac9133c99cf60ba87574b274619cef8a2cf370f213df48a039f1f69"},{"version":"b53341d7f6759d4a71578b2b7b497cceb2067d30ce031077a53c7fbdf1c375a6","signature":"75ae5b0486480ecdd33f86d756a3b6e7ef031505c14e030db42767e2da94d2a5"},{"version":"da8234901cbbdb15e72fa7c784089d6f34933d06871644ad90b5d67677726150","signature":"f197f943080469d48bcdac894b9a3671f6023b2d32b80156933af9ac58c13e3e"},{"version":"5bc21ee688c468d2503d0b8b3f2149c3de69f1818d1c385087d5057c064ca1f0","signature":"4c4bbdf363b8c4fed07cc3352b35a1cde26382d211d4654c72ba181aa270cf59"},{"version":"6ab3c39dde7ce12a2adc326ca241fb0fbf3aa5a1f369fbb63567c427a3867a42","signature":"ae5eba2a89183c03f7eba90838551b554564d8b3662b488ef1fc687c140fdaff"},{"version":"b55e4426e4faba28e922e130987177322a56fef71d55aff1666d503bed4e3a0e","signature":"fa635db5e53e8cceb6a0213f76aaaf2aec216cbf03f7840084a588cca32f3788"},{"version":"4fa91db1c7b75f2b82d050456701cd1bb7e111a5ea179833b29d945c1e96fc94","signature":"b562ba9065e410a6e15c29f5e4b7acb27fc7bac627cbe1a505ddfbbf1988a7cf"},{"version":"c240ab2119396480f0695f9af58c5d582e9cfb805d529c62864d9958f351398a","signature":"fae24fc56928c639017975415a21b2bea80bde889f73d379df6c1bff0b1bd0ee"},"39a8f730d15f94bdb4c44e5983357b9929c48ee822a730f0d128081b18fa1f1a",{"version":"b7524dd8265921da33611c00bec88f26934791ee7a8c3438f9245b9823757d1e","signature":"70ecf74b114240cfd8ad87d7d06c5ae2e9760ec59f5ae3af60e73763df5a7f48"},{"version":"ff83b5fe5859d25d5dd48d708de34268bfaa104158944519a0848284511c18bd","signature":"fbe85429303b8be3faf1b5788e9aa3655af08ee7a133fd6b55fb4b59ff0567b9"},{"version":"3c330b33dd477bd9e4672990dbc131062a3786f5ce0418098862ac078617747f","signature":"4cda8519af7f6bf1092d1a842ddab99216573a69d74b1ac204bf34bd3e899b20"},{"version":"754bad66ec92037825b8feafea63fddab50aa38b038835205fdd864cc3aa9b66","signature":"c933e0fbaa1a940e566d0902f05358c5c688fd51e9738e608cedcd46a3b87cca"},{"version":"15073c1df5755328a85ca371e190292bdcb2f470751313f322c9c0437400acae","signature":"cb3aaebb13987dd729866b6dbddd731418ea3d2eb865c078aa5e6eba009f325b"},{"version":"72b2f2fc8244e0327b9e561d14853af21111cc609797ae0ae452e0b1591ece83","signature":"5f9d521614065c2f784e739fe8a650c42627c60c3d1de7c03563fe50fa6fdcbb"},"36e9d06a2abed82f602b58ccb794c1d34ed9895d75c1bdc437b9dda8564f88ea","362b3156d0612172d8c87d6180a56086c5efbe91c91e8fd489bafa1116246a44",{"version":"6a1017e4d3a5ee22f67c7ab250ad0c6ab8622726ebcabf1d79f4e4d97fea9e4c","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"8216681c5ae308619cb43e3ccf4f16936f68ff7322ba24d1c1dd8ee82590f8a2","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"0e87b6adf9737ea41d2078d072c8257fdcaf851d9e146f4f8e53a437b67475cf","signature":"9584f743c8c8b9b3cb367eac0f86fa60c5fe3c9359ee0bcd39786cfedbd5a2b5"},{"version":"fb27447d65d36b72220bfa297280f921e4467b170d10247a909b60493fad6942","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"8689b1b7db9122e1bb3ce845c573a9eb75a579e48ff7be5392ad3dbad5e368d0","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"a7321c0e96eecb19dcbf178493836474cef21ee3f9345384ce9d74e4be31228d","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","3054ef91b855e005b9c4681399e9d64d2a7b07a22d539314d794f09e53b876a7","427ce5854885cfc34387e09de05c1d5c1acf94c2143e1693f1d9ff54880573e7","bed2c4f96fab3348be4a34d88dcb12578c1b2475b07c6acd369e99e227718d81","e3ba509d3dce019b3190ceb2f3fc88e2610ab717122dabd91a9efaa37804040d","9ac9b7b349a96ff204f4172183cca1672cc402e1ee7277bfcdec96c000b7d818","ac127e4c6f2b5220b293cc9d2e64ba49781225b792a51cda50f3db8eafba550c",{"version":"0c3b45b6a42c0074fadd59c5d370592ca48c89a706d903452565ca89b1b2c164","affectsGlobalScope":true}],"options":{"declaration":true,"esModuleInterop":true,"inlineSourceMap":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"outDir":"./cjs","rootDir":"../src","strict":true,"target":99},"fileIdsList":[[80],[82,85],[78,84],[82],[79,83],[81],[64,71],[56,57,58,62],[56],[56,57,58,59,60,61,62,63],[56,57,58,59,60,62,63],[56,59],[56,61,63],[65],[64],[68],[64,65,66,67],[64,68,69],[64,66,67,68],[65,66,67,68,69,70],[67],[70]],"referencedMap":[[81,1],[86,2],[85,3],[83,4],[84,5],[82,6],[72,7],[63,8],[59,9],[64,10],[61,11],[60,12],[57,9],[62,13],[73,14],[65,15],[74,16],[68,17],[75,18],[69,19],[71,20],[76,21],[77,22]],"exportedModulesMap":[[81,1],[86,2],[85,3],[83,4],[84,5],[82,6],[72,7],[63,8],[59,9],[64,10],[61,11],[60,12],[57,9],[62,13],[65,15],[68,15],[75,15],[69,15],[71,20]],"semanticDiagnosticsPerFile":[78,81,80,86,79,85,83,84,82,11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,53,54,1,10,55,72,63,56,59,64,61,60,57,58,62,73,65,66,74,68,75,69,71,76,67,77,70]},"version":"4.9.4"}
|
package/package.json
CHANGED
package/src/utils/bigIntUtils.ts
CHANGED
@@ -9,7 +9,7 @@ export function ensureBigInt(number: NumberLike): bigint {
|
|
9
9
|
return typeof number === "bigint" ? number : BigInt(number);
|
10
10
|
}
|
11
11
|
|
12
|
-
type
|
12
|
+
type ParsingOptions = {
|
13
13
|
/**
|
14
14
|
* Number of decimals.
|
15
15
|
*/
|
@@ -22,35 +22,46 @@ type BigIntParseOptions = {
|
|
22
22
|
decimalMark?: string;
|
23
23
|
};
|
24
24
|
|
25
|
-
export function
|
26
|
-
if (!
|
25
|
+
export function undecimalize(decimalStr: string, options?: ParsingOptions | number): bigint {
|
26
|
+
if (!decimalStr) {
|
27
27
|
return _0n;
|
28
28
|
}
|
29
29
|
|
30
|
-
|
30
|
+
options = typeof options == "number" ? { decimals: options } : options;
|
31
|
+
if (isUndefined(options)) {
|
32
|
+
options = {};
|
33
|
+
}
|
34
|
+
|
35
|
+
options.decimals = options.decimals || 0;
|
36
|
+
options.decimalMark = options.decimalMark || ".";
|
37
|
+
|
38
|
+
const fragments = decimalStr.split(options.decimalMark);
|
31
39
|
if (fragments.length > 2) {
|
32
40
|
throw new Error("Invalid numeric string.");
|
33
41
|
}
|
34
42
|
|
35
43
|
let [integer, decimal] = fragments;
|
36
|
-
integer =
|
37
|
-
const decimals = options?.decimals || 0;
|
44
|
+
integer = _removeLeadingZeros(integer);
|
38
45
|
const negative = integer.startsWith("-") ? "-" : "";
|
39
46
|
|
40
47
|
if (!decimal) {
|
41
|
-
decimal = "0".repeat(decimals);
|
42
|
-
} else if (decimal.length < decimals) {
|
43
|
-
decimal = decimal.padEnd(decimals, "0");
|
48
|
+
decimal = "0".repeat(options.decimals);
|
49
|
+
} else if (decimal.length < options.decimals) {
|
50
|
+
decimal = decimal.padEnd(options.decimals, "0");
|
44
51
|
}
|
45
52
|
|
46
|
-
return BigInt(negative + (integer + decimal)
|
53
|
+
return BigInt(negative + _stripNonDigits(integer + decimal));
|
54
|
+
}
|
55
|
+
|
56
|
+
function _stripNonDigits(value: string): string {
|
57
|
+
return value.replace(/\D/g, "");
|
47
58
|
}
|
48
59
|
|
49
|
-
type
|
60
|
+
type FormattingOptions = {
|
50
61
|
/**
|
51
62
|
* Number of decimals.
|
52
63
|
*/
|
53
|
-
decimals
|
64
|
+
decimals: number;
|
54
65
|
|
55
66
|
/**
|
56
67
|
* Thousand mark char.
|
@@ -64,27 +75,39 @@ type BigIntFormatOptions = {
|
|
64
75
|
decimalMark?: string;
|
65
76
|
};
|
66
77
|
|
67
|
-
export function
|
78
|
+
export function decimalize(value: Amount, options?: FormattingOptions | number): string {
|
68
79
|
value = ensureBigInt(value);
|
69
80
|
if (!options) {
|
70
81
|
return value.toString();
|
71
82
|
}
|
72
83
|
|
73
|
-
|
74
|
-
|
84
|
+
options = typeof options == "number" ? { decimals: options } : options;
|
85
|
+
options.decimals = options.decimals || 0;
|
86
|
+
options.decimalMark = options.decimalMark || ".";
|
87
|
+
|
88
|
+
const pow = _10n ** BigInt(options.decimals);
|
75
89
|
const integer = value / pow;
|
76
90
|
const decimal = value - integer * pow;
|
77
|
-
|
78
|
-
|
91
|
+
|
92
|
+
return _buildFormattedDecimal(integer.toString(10), decimal.toString(10), options);
|
93
|
+
}
|
94
|
+
|
95
|
+
function _buildFormattedDecimal(
|
96
|
+
integer: string,
|
97
|
+
decimal: string,
|
98
|
+
options: FormattingOptions
|
99
|
+
): string {
|
100
|
+
const integerPart = _addThousandMarks(integer, options.thousandMark);
|
101
|
+
const decimalPart = _stripTrailingZeros(decimal.padStart(options.decimals, "0"));
|
79
102
|
|
80
103
|
if (decimalPart) {
|
81
|
-
return `${integerPart}${options.decimalMark
|
104
|
+
return `${integerPart}${options.decimalMark}${decimalPart}`;
|
82
105
|
} else {
|
83
106
|
return integerPart;
|
84
107
|
}
|
85
108
|
}
|
86
109
|
|
87
|
-
function
|
110
|
+
function _addThousandMarks(value: string, mark?: string): string {
|
88
111
|
if (!mark) {
|
89
112
|
return value;
|
90
113
|
}
|
@@ -92,11 +115,19 @@ function addThousandMarks(value: string, mark?: string): string {
|
|
92
115
|
return value.replace(/\B(?=(\d{3})+(?!\d))/g, mark);
|
93
116
|
}
|
94
117
|
|
95
|
-
function
|
118
|
+
function _stripTrailingZeros(value: string): string {
|
119
|
+
if (!value.endsWith("0")) {
|
120
|
+
return value;
|
121
|
+
}
|
122
|
+
|
96
123
|
return value.replace(/\.?0+$/, "");
|
97
124
|
}
|
98
125
|
|
99
|
-
function
|
126
|
+
function _removeLeadingZeros(value: string): string {
|
127
|
+
if (!value.startsWith("0")) {
|
128
|
+
return value;
|
129
|
+
}
|
130
|
+
|
100
131
|
return value.replace(/^0+\.?/, "");
|
101
132
|
}
|
102
133
|
|