@bitgo-beta/deser-lib 1.0.1-beta.6 → 1.0.1-beta.600

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/CHANGELOG.md CHANGED
@@ -3,6 +3,58 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.7.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/deser-lib@1.7.0...@bitgo/deser-lib@1.7.1) (2025-01-28)
7
+
8
+ **Note:** Version bump only for package @bitgo/deser-lib
9
+
10
+ # 1.7.0 (2024-09-10)
11
+
12
+ ### Bug Fixes
13
+
14
+ - **deser-lib:** add .npmignore to deser-lib ([8572427](https://github.com/BitGo/BitGoJS/commit/857242748d28c1d27c85578091d902701ce6f41e))
15
+ - **deser-lib:** add deser-lib path to tsconfig.packages ([0e5ef65](https://github.com/BitGo/BitGoJS/commit/0e5ef654b78214b7cc6086ce05c305d4d7425d64))
16
+ - **deser-lib:** use cbor.encode instead of cbor.encodeCanonical ([5209222](https://github.com/BitGo/BitGoJS/commit/5209222b8667d2e843cf5257f9a59b9b0fa39a5d))
17
+
18
+ ### Features
19
+
20
+ - bump typescript to 4.9 ([6675058](https://github.com/BitGo/BitGoJS/commit/667505862b79d24e3f625e7306d949acf07691bf))
21
+ - **deser-lib:** add serialization/deserialization module ([95c0308](https://github.com/BitGo/BitGoJS/commit/95c03088faa890604880dae770c4a720850f9275))
22
+ - **deser-lib:** support escaped strings ([95cd394](https://github.com/BitGo/BitGoJS/commit/95cd39476895b2fd3e766683eb5e7129c200d516))
23
+
24
+ # 1.5.0 (2024-01-30)
25
+
26
+ ### Bug Fixes
27
+
28
+ - **deser-lib:** add .npmignore to deser-lib ([8572427](https://github.com/BitGo/BitGoJS/commit/857242748d28c1d27c85578091d902701ce6f41e))
29
+ - **deser-lib:** add deser-lib path to tsconfig.packages ([0e5ef65](https://github.com/BitGo/BitGoJS/commit/0e5ef654b78214b7cc6086ce05c305d4d7425d64))
30
+
31
+ ### Features
32
+
33
+ - **deser-lib:** add serialization/deserialization module ([95c0308](https://github.com/BitGo/BitGoJS/commit/95c03088faa890604880dae770c4a720850f9275))
34
+ - **deser-lib:** support escaped strings ([95cd394](https://github.com/BitGo/BitGoJS/commit/95cd39476895b2fd3e766683eb5e7129c200d516))
35
+
36
+ # 1.4.0 (2024-01-26)
37
+
38
+ ### Bug Fixes
39
+
40
+ - **deser-lib:** add deser-lib path to tsconfig.packages ([0e5ef65](https://github.com/BitGo/BitGoJS/commit/0e5ef654b78214b7cc6086ce05c305d4d7425d64))
41
+
42
+ ### Features
43
+
44
+ - **deser-lib:** add serialization/deserialization module ([95c0308](https://github.com/BitGo/BitGoJS/commit/95c03088faa890604880dae770c4a720850f9275))
45
+ - **deser-lib:** support escaped strings ([95cd394](https://github.com/BitGo/BitGoJS/commit/95cd39476895b2fd3e766683eb5e7129c200d516))
46
+
47
+ # 1.3.0 (2024-01-26)
48
+
49
+ ### Bug Fixes
50
+
51
+ - **deser-lib:** add deser-lib path to tsconfig.packages ([0e5ef65](https://github.com/BitGo/BitGoJS/commit/0e5ef654b78214b7cc6086ce05c305d4d7425d64))
52
+
53
+ ### Features
54
+
55
+ - **deser-lib:** add serialization/deserialization module ([95c0308](https://github.com/BitGo/BitGoJS/commit/95c03088faa890604880dae770c4a720850f9275))
56
+ - **deser-lib:** support escaped strings ([95cd394](https://github.com/BitGo/BitGoJS/commit/95cd39476895b2fd3e766683eb5e7129c200d516))
57
+
6
58
  # 1.2.0 (2024-01-25)
7
59
 
8
60
  ### Features
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@bitgo-beta/deser-lib",
3
+ "version": "1.0.1-beta.600",
4
+ "description": "BitGo serialization and deseralization library",
5
+ "main": "./dist/src/index.js",
6
+ "types": "./dist/src/index.d.ts",
7
+ "scripts": {
8
+ "test": "yarn unit-test",
9
+ "unit-test": "nyc -- mocha --recursive test",
10
+ "build": "yarn tsc --build --incremental --verbose .",
11
+ "fmt": "prettier --write .",
12
+ "check-fmt": "prettier --check .",
13
+ "clean": "rm -r ./dist",
14
+ "lint": "eslint --quiet .",
15
+ "prepare": "npm run build"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/BitGo/BitGoJS.git",
20
+ "directory": "modules/deser-lib"
21
+ },
22
+ "author": "BitGo SDK Team <sdkteam@bitgo.com>",
23
+ "license": "MIT",
24
+ "bugs": {
25
+ "url": "https://github.com/bitgo/bitgojs/issues"
26
+ },
27
+ "homepage": "https://github.com/bitgo/bitgojs#readme",
28
+ "nyc": {
29
+ "extension": [
30
+ ".ts"
31
+ ]
32
+ },
33
+ "lint-staged": {
34
+ "*.{js,ts}": [
35
+ "yarn prettier --write",
36
+ "yarn eslint --fix"
37
+ ]
38
+ },
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "dependencies": {
43
+ "cbor": "^9.0.1"
44
+ },
45
+ "gitHead": "ccde4d863f615885cbecb9cb7fdba01936ff9f85"
46
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Transform value into its canonical, serializable form.
3
+ * @param value - Value to transform.
4
+ * @returns Canonical, serializable form of value.
5
+ */
6
+ export declare function transform<T>(value: T): T | Buffer;
7
+ /**
8
+ * Untransform value into its human readable form.
9
+ * @param value - Value to untransform.
10
+ * @returns Untransformed, human readable form of value.
11
+ */
12
+ export declare function untransform<T>(value: T): T | string;
13
+ /**
14
+ * Serialize a value.
15
+ * @param value - Value to serialize.
16
+ * @returns Buffer representing serialized value.
17
+ */
18
+ export declare function serialize<T>(value: T): Buffer;
19
+ /**
20
+ * Deserialize a value.
21
+ * @param value - Buffer to deserialize.
22
+ * @returns Deserialized value.
23
+ */
24
+ export declare function deserialize(value: Buffer): unknown;
25
+ //# sourceMappingURL=cbor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cbor.d.ts","sourceRoot":"","sources":["../../src/cbor.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM,CAyBjD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM,CAiBnD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAE7C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAElD"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transform = transform;
4
+ exports.untransform = untransform;
5
+ exports.serialize = serialize;
6
+ exports.deserialize = deserialize;
7
+ const cbor_1 = require("cbor");
8
+ /**
9
+ * Transform value into its canonical, serializable form.
10
+ * @param value - Value to transform.
11
+ * @returns Canonical, serializable form of value.
12
+ */
13
+ function transform(value) {
14
+ if (value === null || value === undefined) {
15
+ return value;
16
+ }
17
+ if (typeof value === 'string') {
18
+ // Transform hex strings to buffers.
19
+ if (value.startsWith('0x')) {
20
+ if (!value.match(/^0x([0-9a-fA-F]{2})*$/)) {
21
+ throw new Error('0x prefixed string contains non-hex characters.');
22
+ }
23
+ return Buffer.from(value.slice(2), 'hex');
24
+ }
25
+ else if (value.startsWith('\\0x')) {
26
+ return value.slice(1);
27
+ }
28
+ }
29
+ else if (value instanceof Array) {
30
+ value = [...value];
31
+ return value.map(transform);
32
+ }
33
+ else if (value instanceof Object) {
34
+ const properties = Object.getOwnPropertyNames(value);
35
+ return properties.reduce((acc, name) => {
36
+ acc[name] = transform(value[name]);
37
+ return acc;
38
+ }, {});
39
+ }
40
+ return value;
41
+ }
42
+ /**
43
+ * Untransform value into its human readable form.
44
+ * @param value - Value to untransform.
45
+ * @returns Untransformed, human readable form of value.
46
+ */
47
+ function untransform(value) {
48
+ if (Buffer.isBuffer(value)) {
49
+ return '0x' + value.toString('hex');
50
+ }
51
+ else if (typeof value === 'string') {
52
+ if (value.startsWith('0x')) {
53
+ return '\\' + value;
54
+ }
55
+ }
56
+ else if (value instanceof Array) {
57
+ return value.map(untransform);
58
+ }
59
+ else if (value instanceof Object) {
60
+ const properties = Object.getOwnPropertyNames(value);
61
+ return properties.reduce((acc, name) => {
62
+ acc[name] = untransform(value[name]);
63
+ return acc;
64
+ }, {});
65
+ }
66
+ return value;
67
+ }
68
+ /**
69
+ * Serialize a value.
70
+ * @param value - Value to serialize.
71
+ * @returns Buffer representing serialized value.
72
+ */
73
+ function serialize(value) {
74
+ return (0, cbor_1.encode)(transform(value));
75
+ }
76
+ /**
77
+ * Deserialize a value.
78
+ * @param value - Buffer to deserialize.
79
+ * @returns Deserialized value.
80
+ */
81
+ function deserialize(value) {
82
+ return untransform((0, cbor_1.decodeFirstSync)(value));
83
+ }
84
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2Jvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jYm9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBT0EsOEJBeUJDO0FBT0Qsa0NBaUJDO0FBT0QsOEJBRUM7QUFPRCxrQ0FFQztBQTFFRCwrQkFBK0M7QUFFL0M7Ozs7R0FJRztBQUNILFNBQWdCLFNBQVMsQ0FBSSxLQUFRO0lBQ25DLElBQUksS0FBSyxLQUFLLElBQUksSUFBSSxLQUFLLEtBQUssU0FBUyxFQUFFLENBQUM7UUFDMUMsT0FBTyxLQUFLLENBQUM7SUFDZixDQUFDO0lBQ0QsSUFBSSxPQUFPLEtBQUssS0FBSyxRQUFRLEVBQUUsQ0FBQztRQUM5QixvQ0FBb0M7UUFDcEMsSUFBSSxLQUFLLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUM7WUFDM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1ZmZlcik6IHVua25vd24ge1xuICByZXR1cm4gdW50cmFuc2Zvcm0oZGVjb2RlRmlyc3RTeW5jKHZhbHVlKSk7XG59XG4iXX0=
@@ -0,0 +1,2 @@
1
+ export * as Cbor from './cbor';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Cbor = void 0;
4
+ exports.Cbor = require("./cbor");
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUNBQStCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogYXMgQ2JvciBmcm9tICcuL2Nib3InO1xuIl19
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/nofilter/types/index.d.ts","../node_modules/cbor/types/vendor/binary-parse-stream/index.d.ts","../node_modules/cbor/types/lib/tagged.d.ts","../node_modules/cbor/types/lib/decoder.d.ts","../node_modules/cbor/types/lib/commented.d.ts","../node_modules/cbor/types/lib/diagnose.d.ts","../node_modules/cbor/types/lib/encoder.d.ts","../node_modules/cbor/types/lib/simple.d.ts","../node_modules/cbor/types/lib/map.d.ts","../node_modules/cbor/types/lib/objectRecorder.d.ts","../node_modules/cbor/types/lib/sharedValueEncoder.d.ts","../node_modules/cbor/types/lib/cbor.d.ts","../src/cbor.ts","../src/index.ts","../package.json","../../../node_modules/@types/archy/index.d.ts","../../../node_modules/@types/bn.js/index.d.ts","../../../node_modules/base-x/src/index.d.ts","../../../node_modules/@types/bs58/index.d.ts","../../../node_modules/keyv/src/index.d.ts","../../../node_modules/@types/http-cache-semantics/index.d.ts","../../../node_modules/@types/responselike/index.d.ts","../../../node_modules/@types/cacheable-request/index.d.ts","../../../node_modules/@types/connect/index.d.ts","../../../node_modules/@types/conventional-commits-parser/index.d.ts","../../../node_modules/@types/cookiejar/index.d.ts","../../../node_modules/@types/create-hmac/index.d.ts","../../../node_modules/@types/ms/index.d.ts","../../../node_modules/@types/debug/index.d.ts","../../../node_modules/@types/eccrypto/index.d.ts","../../../node_modules/@types/elliptic/index.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/eslint/use-at-your-own-risk.d.ts","../../../node_modules/@types/eslint/index.d.ts","../../../node_modules/@types/eslint-scope/index.d.ts","../../../node_modules/@types/ethereumjs-util/index.d.ts","../../../node_modules/@types/eventsource/dom-monkeypatch.d.ts","../../../node_modules/@types/eventsource/index.d.ts","../../../node_modules/@types/expect/index.d.ts","../../../node_modules/@types/fs-extra/index.d.ts","../../../node_modules/@types/html-minifier-terser/index.d.ts","../../../node_modules/@types/jasmine/index.d.ts","../../../node_modules/@types/json5/index.d.ts","../../../node_modules/@types/keccak/index.d.ts","../../../node_modules/@types/keyv/index.d.ts","../../../node_modules/@types/linkify-it/build/index.cjs.d.ts","../../../node_modules/@types/linkify-it/index.d.ts","../../../node_modules/@types/lodash/common/common.d.ts","../../../node_modules/@types/lodash/common/array.d.ts","../../../node_modules/@types/lodash/common/collection.d.ts","../../../node_modules/@types/lodash/common/date.d.ts","../../../node_modules/@types/lodash/common/function.d.ts","../../../node_modules/@types/lodash/common/lang.d.ts","../../../node_modules/@types/lodash/common/math.d.ts","../../../node_modules/@types/lodash/common/number.d.ts","../../../node_modules/@types/lodash/common/object.d.ts","../../../node_modules/@types/lodash/common/seq.d.ts","../../../node_modules/@types/lodash/common/string.d.ts","../../../node_modules/@types/lodash/common/util.d.ts","../../../node_modules/@types/lodash/index.d.ts","../../../node_modules/@types/long/index.d.ts","../../../node_modules/@types/mdurl/build/index.cjs.d.ts","../../../node_modules/@types/mdurl/index.d.ts","../../../node_modules/@types/markdown-it/dist/index.cjs.d.ts","../../../node_modules/@types/markdown-it/index.d.ts","../../../node_modules/@types/mime-types/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/minimist/index.d.ts","../../../node_modules/@types/mocha/index.d.ts","../../../node_modules/@types/normalize-package-data/index.d.ts","../../../node_modules/@types/parse-json/index.d.ts","../../../node_modules/@types/pbkdf2/index.d.ts","../../../node_modules/@types/qrcode/index.d.ts","../../../node_modules/@types/raf/index.d.ts","../../../node_modules/@types/randombytes/index.d.ts","../../../node_modules/@types/secp256k1/index.d.ts","../../../node_modules/@types/semver/classes/semver.d.ts","../../../node_modules/@types/semver/functions/parse.d.ts","../../../node_modules/@types/semver/functions/valid.d.ts","../../../node_modules/@types/semver/functions/clean.d.ts","../../../node_modules/@types/semver/functions/inc.d.ts","../../../node_modules/@types/semver/functions/diff.d.ts","../../../node_modules/@types/semver/functions/major.d.ts","../../../node_modules/@types/semver/functions/minor.d.ts","../../../node_modules/@types/semver/functions/patch.d.ts","../../../node_modules/@types/semver/functions/prerelease.d.ts","../../../node_modules/@types/semver/functions/compare.d.ts","../../../node_modules/@types/semver/functions/rcompare.d.ts","../../../node_modules/@types/semver/functions/compare-loose.d.ts","../../../node_modules/@types/semver/functions/compare-build.d.ts","../../../node_modules/@types/semver/functions/sort.d.ts","../../../node_modules/@types/semver/functions/rsort.d.ts","../../../node_modules/@types/semver/functions/gt.d.ts","../../../node_modules/@types/semver/functions/lt.d.ts","../../../node_modules/@types/semver/functions/eq.d.ts","../../../node_modules/@types/semver/functions/neq.d.ts","../../../node_modules/@types/semver/functions/gte.d.ts","../../../node_modules/@types/semver/functions/lte.d.ts","../../../node_modules/@types/semver/functions/cmp.d.ts","../../../node_modules/@types/semver/functions/coerce.d.ts","../../../node_modules/@types/semver/classes/comparator.d.ts","../../../node_modules/@types/semver/classes/range.d.ts","../../../node_modules/@types/semver/functions/satisfies.d.ts","../../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../../node_modules/@types/semver/ranges/min-version.d.ts","../../../node_modules/@types/semver/ranges/valid.d.ts","../../../node_modules/@types/semver/ranges/outside.d.ts","../../../node_modules/@types/semver/ranges/gtr.d.ts","../../../node_modules/@types/semver/ranges/ltr.d.ts","../../../node_modules/@types/semver/ranges/intersects.d.ts","../../../node_modules/@types/semver/ranges/simplify.d.ts","../../../node_modules/@types/semver/ranges/subset.d.ts","../../../node_modules/@types/semver/internals/identifiers.d.ts","../../../node_modules/@types/semver/index.d.ts","../../../node_modules/@types/sha.js/index.d.ts","../../../node_modules/@types/sinon/ts3.1/index.d.ts","../../../node_modules/@types/sjcl/index.d.ts","../../../node_modules/@types/superagent/index.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/@types/trusted-types/index.d.ts","../../../node_modules/@types/urijs/dom-monkeypatch.d.ts","../../../node_modules/@types/urijs/index.d.ts","../../../node_modules/@types/utf8/index.d.ts","../../../node_modules/@types/uuid/index.d.ts","../../../node_modules/@types/ws/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts","../../../node_modules/bignumber.js/bignumber.d.ts","../../../types/bignumber.js/index.d.ts","../../../types/express/index.d.ts","../../../node_modules/should/should.d.ts","../../../types/should-sinon/index.d.ts"],"fileIdsList":[[52,95,147,148,149,150,151,152,153,155],[52,95,126,144,145,148],[52,95,126,144,145,146,147],[52,95,126,148],[52,95,126,144,145],[52,95],[52,95,151,154],[52,95,126,145],[52,95,156],[52,95,157],[52,95,144],[52,95,144,162],[52,95,107,110,137,144,164,165,166],[52,95,110,144],[52,95,126,144],[52,95,100,144],[52,95,172],[52,95,161],[52,95,176,179],[52,95,176,177,178],[52,95,179],[52,95,144,161],[52,95,182],[52,95,108,144],[52,95,107,144],[52,95,191],[52,95,193,195,196,197,198,199,200,201,202,203,204,205],[52,95,193,194,196,197,198,199,200,201,202,203,204,205],[52,95,194,195,196,197,198,199,200,201,202,203,204,205],[52,95,193,194,195,197,198,199,200,201,202,203,204,205],[52,95,193,194,195,196,198,199,200,201,202,203,204,205],[52,95,193,194,195,196,197,199,200,201,202,203,204,205],[52,95,193,194,195,196,197,198,200,201,202,203,204,205],[52,95,193,194,195,196,197,198,199,201,202,203,204,205],[52,95,193,194,195,196,197,198,199,200,202,203,204,205],[52,95,193,194,195,196,197,198,199,200,201,203,204,205],[52,95,193,194,195,196,197,198,199,200,201,202,204,205],[52,95,193,194,195,196,197,198,199,200,201,202,203,205],[52,95,193,194,195,196,197,198,199,200,201,202,203,204],[52,95,192,208],[52,95,209],[52,95,207],[52,92,95],[52,94,95],[95],[52,95,100,129],[52,95,96,101,107,108,115,126,137],[52,95,96,97,107,115],[47,48,49,52,95],[52,95,98,138],[52,95,99,100,108,116],[52,95,100,126,134],[52,95,101,103,107,115],[52,94,95,102],[52,95,103,104],[52,95,107],[52,95,105,107],[52,94,95,107],[52,95,107,108,109,126,137],[52,95,107,108,109,122,126,129],[52,90,95,142],[52,95,103,107,110,115,126,137],[52,95,107,108,110,111,115,126,134,137],[52,95,110,112,126,134,137],[50,51,52,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143],[52,95,107,113],[52,95,114,137,142],[52,95,103,107,115,126],[52,95,116],[52,95,117],[52,94,95,118],[52,92,93,94,95,96,97,98,99,100,101,102,103,104,105,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143],[52,95,120],[52,95,121],[52,95,107,122,123],[52,95,122,124,138,140],[52,95,107,126,127,129],[52,95,128,129],[52,95,126,127],[52,95,129],[52,95,130],[52,92,95,126],[52,95,107,132,133],[52,95,132,133],[52,95,100,115,126,134],[52,95,135],[52,95,115,136],[52,95,110,121,137],[52,95,100,138],[52,95,126,139],[52,95,114,140],[52,95,141],[52,95,100,107,109,118,126,137,140,142],[52,95,126,143],[52,95,110,126,144],[52,95,222,261],[52,95,222,246,261],[52,95,261],[52,95,222],[52,95,222,247,261],[52,95,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260],[52,95,247,261],[52,95,108,110,126,144,170],[52,95,266],[52,95,268],[52,95,107,110,112,115,126,134,137,143,144],[52,95,273],[52,62,66,95,137],[52,62,95,126,137],[52,57,95],[52,59,62,95,134,137],[52,95,115,134],[52,57,95,144],[52,59,62,95,115,137],[52,54,55,58,61,95,107,126,137],[52,62,69,95],[52,54,60,95],[52,62,83,84,95],[52,58,62,95,129,137,144],[52,83,95,144],[52,56,57,95,144],[52,62,95],[52,56,57,58,59,60,61,62,63,64,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,95],[52,62,77,95],[52,62,69,70,95],[52,60,62,70,71,95],[52,61,95],[52,54,57,62,95],[52,62,66,70,71,95],[52,66,95],[52,60,62,65,95,137],[52,54,59,62,69,95],[52,95,126],[52,57,62,83,95,142,144],[52,95,275,276],[52,95,278]],"fileInfos":[{"version":"e41c290ef7dd7dab3493e6cbe5909e0148edf4a8dad0271be08edec368a0f7b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"4fd3f3422b2d2a3dfd5cdd0f387b3a8ec45f006c6ea896a4cb41264c2100bb2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"62bb211266ee48b2d0edf0d8d1b191f0c24fc379a82bd4c1692a082c540bc6b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"f1e2a172204962276504466a6393426d2ca9c54894b1ad0a6c9dad867a65f876","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b80c6175da9de59bace50a72c2d68490d4ab5b07016ff5367bc7ba33cf2f219","affectsGlobalScope":true,"impliedFormat":1},{"version":"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"08faa97886e71757779428dd4c69a545c32c85fd629d1116d42710b32c6378bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b042aa5d277ad6963e2837179fd2f8fbb01968ac67115b0833c0244e93d1d50","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","impliedFormat":1},{"version":"23cfd70b42094e54cc3c5dab996d81b97e2b6f38ccb24ead85454b8ddfe2fc4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e58c4c18a031cbb17abec7a4ad0bd5ae9fc70c1f4ba1e7fb921ad87c504aca","impliedFormat":1},{"version":"a3e8bafb2af8e850c644f4be7f5156cf7d23b7bfdc3b786bd4d10ed40329649c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4b87f767c7bc841511113c876a6b8bf1fd0cb0b718c888ad84478b372ec486b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d04e3640dd9eb67f7f1e5bd3d0bf96c784666f7aefc8ac1537af6f2d38d4c29","impliedFormat":1},{"version":"3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","impliedFormat":1},{"version":"5a369483ac4cfbdf0331c248deeb36140e6907db5e1daed241546b4a2055f82c","impliedFormat":1},{"version":"e8f5b5cc36615c17d330eaf8eebbc0d6bdd942c25991f96ef122f246f4ff722f","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ada07543808f3b967624645a8e1ccd446f8b01ade47842acf1328aec899fed0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a37b8d00d03f0381d2db2fe31b0571dc9d7cc0f4b87ca103cc3cd2277690ba0","impliedFormat":1},{"version":"71adf5dbc59568663d252a46179e71e4d544c053978bfc526d11543a3f716f42","impliedFormat":1},{"version":"38bf8ff1b403c861e9052c9ea651cb4f38c1ecc084a34d79f8acc6d6477a7321","impliedFormat":1},{"version":"93bd413918fa921c8729cef45302b24d8b6c7855d72d5bf82d3972595ae8dcbf","impliedFormat":1},{"version":"4ff41188773cbf465807dd2f7059c7494cbee5115608efc297383832a1150c43","impliedFormat":1},{"version":"dccdf1677e531e33f8ac961a68bc537418c9a414797c1ea7e91307501cdc3f5e","impliedFormat":1},{"version":"e184c4b8918ef56c8c9e68bd79f3f3780e2d0d75bf2b8a41da1509a40c2deb46","affectsGlobalScope":true,"impliedFormat":1},{"version":"d206b4baf4ddcc15d9d69a9a2f4999a72a2c6adeaa8af20fa7a9960816287555","impliedFormat":1},{"version":"93f437e1398a4f06a984f441f7fa7a9f0535c04399619b5c22e0b87bdee182cb","impliedFormat":1},{"version":"afbe24ab0d74694372baa632ecb28bb375be53f3be53f9b07ecd7fc994907de5","impliedFormat":1},{"version":"70731d10d5311bd4cf710ef7f6539b62660f4b0bfdbb3f9fbe1d25fe6366a7fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b19db3600a17af69d4f33d08cc7076a7d19fb65bb36e442cac58929ec7c9482","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"137c2894e8f3e9672d401cc0a305dc7b1db7c69511cf6d3970fb53302f9eae09","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"ba1f814c22fd970255ddd60d61fb7e00c28271c933ab5d5cc19cd3ca66b8f57c","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"295f068af94245ee9d780555351bef98adfd58f8baf0b9dadbc31a489b881f8b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1851a3b4db78664f83901bb9cac9e45e03a37bb5933cc5bf37e10bb7e91ab4eb","impliedFormat":1},{"version":"09d479208911ac3ac6a7c2fe86217fc1abe6c4f04e2d52e4890e500699eeab32","affectsGlobalScope":true,"impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"4f029899f9bae07e225c43aef893590541b2b43267383bf5e32e3a884d219ed5","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"5b566927cad2ed2139655d55d690ffa87df378b956e7fe1c96024c4d9f75c4cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"bce947017cb7a2deebcc4f5ba04cead891ce6ad1602a4438ae45ed9aa1f39104","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3dffd70e6375b872f0b4e152de4ae682d762c61a24881ecc5eb9f04c5caf76f","impliedFormat":1},{"version":"e2c72c065a36bc9ab2a00ac6a6f51e71501619a72c0609defd304d46610487a4","impliedFormat":1},{"version":"d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","impliedFormat":1},{"version":"616075a6ac578cf5a013ee12964188b4412823796ce0b202c6f1d2e4ca8480d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"e8a979b8af001c9fc2e774e7809d233c8ca955a28756f52ee5dee88ccb0611d2","impliedFormat":1},{"version":"cac793cc47c29e26e4ac3601dcb00b4435ebed26203485790e44f2ad8b6ad847","impliedFormat":1},{"version":"a5193be78a634ab211a471d41295c21d5f54675a97330b9a1720b8e41887cc10","impliedFormat":1},{"version":"83c1ba8b6d747485ff09206e7c5d7532f3b44a8bfcb002e48f50f5f051ea9a4a","impliedFormat":1},{"version":"43b31498c95a593f3f7168b16ff68ea04e2e6c84f0fd68202e356286c79040f9","impliedFormat":1},{"version":"f76f38c4ccedb027993c1077a86faf5e385a0010a1471e9936ff161834149918","impliedFormat":1},{"version":"72ae38e969e3e8fb7631f9b8c4974bd18af9b6cd075d11c354a6c41538ff3f86","impliedFormat":1},{"version":"b78b543da8c56fd11295b7154b6b17478797cf4fd2a236729d2701d166d91f00","impliedFormat":1},{"version":"98f9f2089fcc21cf8be6bc6d4c0c20b5f6933a7fe36f57b01c4951eb0482bca9","impliedFormat":1},{"version":"1006c614527de8832eb5f8c6de68ca910b0bac25d931cfb459884b52fc2b9aea","impliedFormat":1},{"version":"d19103d893cfada4d66b3947d20d14d9e1431d3ba16a66d87985a5668aae2160","impliedFormat":1},{"version":"172035de856c114189c089c5bcec0dc47716ee562946ac8d4e10a96cd54b16c9","impliedFormat":1},{"version":"7c559565fe235c8452dc846365e1bd06ad0ebca510a3c4949d89a05d472e204e","impliedFormat":1},{"version":"9d87d7b67c0ad1cc456e0bed96faab74d68cd16443521dbee249c94d7093bc43","impliedFormat":1},{"version":"241cc85ea3f9e92f75aa7e189a1f531c6a5d39e235da6ad9837759f436550d2d","signature":"e4d983cdae8a2c584e96806aab041ed7073311ee4c912f0e792ac3d13c971fcc"},"d3e650b5e80f003e83a9b959b92a61d494a898703b95d8adb4d418a8e73ae843",{"version":"66b94d3c269483e4014206cb930eebb5738714dcf25537467132f6ccf0f82ac1","signature":"49f562f1b8637be95fa72606652bdca732095d1249a5432e42b52b6cfbdf1a1b"},{"version":"c31294ba7381e921caa30d4408fa7637053d9cb3456a750f276fd8a9bb0e42d8","impliedFormat":1},{"version":"ef9ba722fb39e39833a2dc9da7d81ffc0888d72817cd591bf4df176a15071388","impliedFormat":1},{"version":"e91751abb2372a36a90869d36f6ad5d5e69a84c5513ca99d236554e4dd8b9aa1","impliedFormat":1},{"version":"721e7b8ccbcdb0599123bcc94b18ca247bc329cda0a4028703cf5610b4c3f90a","impliedFormat":1},{"version":"42baf4ca38c38deaf411ea73f37bc39ff56c6e5c761a968b64ac1b25c92b5cd8","impliedFormat":1},{"version":"d7dbe0ad36bdca8a6ecf143422a48e72cc8927bab7b23a1a2485c2f78a7022c6","impliedFormat":1},{"version":"8718fa41d7cf4aa91de4e8f164c90f88e0bf343aa92a1b9b725a9c675c64e16b","impliedFormat":1},{"version":"f992cd6cc0bcbaa4e6c810468c90f2d8595f8c6c3cf050c806397d3de8585562","impliedFormat":1},{"version":"104c67f0da1bdf0d94865419247e20eded83ce7f9911a1aa75fc675c077ca66e","impliedFormat":1},{"version":"f96f3c445afc7d65d4790386e37c5b57f095f285cc89b8315b209fe0c81837c1","impliedFormat":1},{"version":"0dc6940ff35d845686a118ee7384713a84024d60ef26f25a2f87992ec7ddbd64","impliedFormat":1},{"version":"5385a7d591ae122fa744b647909ed60c065fc74715f2d350325aefb20af7381f","impliedFormat":1},{"version":"fb893a0dfc3c9fb0f9ca93d0648694dd95f33cbad2c0f2c629f842981dfd4e2e","impliedFormat":1},{"version":"3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","impliedFormat":1},{"version":"c0017998521cb9c4844bbc2b522ed2c257aa04e4582967fd6168fcd86cc13ab4","impliedFormat":1},{"version":"bc9d7f2a012412c294f4eb0fc856e063112a3666957a190542b62662391810b2","impliedFormat":1},{"version":"e2b48abff5a8adc6bb1cd13a702b9ef05e6045a98e7cfa95a8779b53b6d0e69d","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"a4a39b5714adfcadd3bbea6698ca2e942606d833bde62ad5fb6ec55f5e438ff8","impliedFormat":1},{"version":"bbc1d029093135d7d9bfa4b38cbf8761db505026cc458b5e9c8b74f4000e5e75","impliedFormat":1},{"version":"1f68ab0e055994eb337b67aa87d2a15e0200951e9664959b3866ee6f6b11a0fe","impliedFormat":1},{"version":"085d4c9f010e6f363961dd1939a851d029b97994f705d79f2a72a0c88a5c4bc5","impliedFormat":1},{"version":"0b812af1c8e8062774c99f008bea098f290db21fd3b4efb0c539356e722e9f6a","affectsGlobalScope":true,"impliedFormat":1},{"version":"c6bb7e4c7e80685ad60e2b286ee7eea9fffb05d48e24e52dbbb67d7214596e33","impliedFormat":1},{"version":"975f84de013567851d216d78a3a86736bb330cae11fdc907b222dffa148b31d2","impliedFormat":1},{"version":"ed19da84b7dbf00952ad0b98ce5c194f1903bcf7c94d8103e8e0d63b271543ae","impliedFormat":1},{"version":"ee65fe452abe1309389c5f50710f24114e08a302d40708101c4aa950a2a7d044","impliedFormat":1},{"version":"0fc30665ed9340743e9a9fee26b4bf59f71280315a7b13a0c37f59c07ddab2d9","affectsGlobalScope":true,"impliedFormat":1},{"version":"96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","impliedFormat":1},{"version":"97ae3671a3bbeb2930529ce86becf5a2c2b3198cb936ed521d92faad85fee9ac","impliedFormat":1},{"version":"fec943fdb3275eb6e006b35e04a8e2e99e9adf3f4b969ddf15315ac7575a93e4","impliedFormat":1},{"version":"742f21debb3937c3839a63245648238555bdab1ea095d43fd10c88a64029bf76","impliedFormat":1},{"version":"7cfdf3b9a5ba934a058bfc9390c074104dc7223b7e3c16fd5335206d789bc3d3","impliedFormat":1},{"version":"7220461ab7f6d600b313ce621346c315c3a0ebc65b5c6f268488c5c55b68d319","impliedFormat":1},{"version":"f90d4c1ae3af9afb35920b984ba3e41bdd43f0dc7bae890b89fbd52b978f0cac","impliedFormat":1},{"version":"fcf79300e5257a23ed3bacaa6861d7c645139c6f7ece134d15e6669447e5e6db","impliedFormat":1},{"version":"187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","impliedFormat":1},{"version":"aa2c18a1b5a086bbcaae10a4efba409cc95ba7287d8cf8f2591b53704fea3dea","impliedFormat":1},{"version":"b88749bdb18fc1398370e33aa72bc4f88274118f4960e61ce26605f9b33c5ba2","impliedFormat":1},{"version":"0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","impliedFormat":1},{"version":"00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","impliedFormat":1},{"version":"a873c50d3e47c21aa09fbe1e2023d9a44efb07cc0cb8c72f418bf301b0771fd3","impliedFormat":1},{"version":"7c14ccd2eaa82619fffc1bfa877eb68a012e9fb723d07ee98db451fadb618906","impliedFormat":1},{"version":"49c36529ee09ea9ce19525af5bb84985ea8e782cb7ee8c493d9e36d027a3d019","impliedFormat":1},{"version":"df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","impliedFormat":1},{"version":"4f6a12044ee6f458db11964153830abbc499e73d065c51c329ec97407f4b13dd","impliedFormat":1},{"version":"0e60e0cbf2283adfd5a15430ae548cd2f662d581b5da6ecd98220203e7067c70","impliedFormat":1},{"version":"0944f27ebff4b20646b71e7e3faaaae50a6debd40bc63e225de1320dd15c5795","impliedFormat":1},{"version":"5d30565583300c9256072a013ac0318cc603ff769b4c5cafc222394ea93963e1","impliedFormat":1},{"version":"8a7219b41d3c1c93f3f3b779146f313efade2404eeece88dcd366df7e2364977","impliedFormat":1},{"version":"a109c4289d59d9019cfe1eeab506fe57817ee549499b02a83a7e9d3bdf662d63","impliedFormat":1},{"version":"169cc96316cacf8b489aaab4ac6bcef7b33e8779a8902bce57c737b4aa372d16","impliedFormat":1},{"version":"8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","impliedFormat":1},{"version":"fbca5ffaebf282ec3cdac47b0d1d4a138a8b0bb32105251a38acb235087d3318","impliedFormat":1},{"version":"3f6d6465811321abc30a1e5f667feed63e5b3917b3d6c8d6645daf96c75f97ba","affectsGlobalScope":true,"impliedFormat":1},{"version":"22293bd6fa12747929f8dfca3ec1684a3fe08638aa18023dd286ab337e88a592","impliedFormat":1},{"version":"916be7d770b0ae0406be9486ac12eb9825f21514961dd050594c4b250617d5a8","impliedFormat":1},{"version":"254d9fb8c872d73d34594be8a200fd7311dbfa10a4116bfc465fba408052f2b3","impliedFormat":1},{"version":"e7500c5c071db4d1e20e87166be266f489dd632b738e885b221e6efa6c8efe89","impliedFormat":1},{"version":"4cf58cd73f135e59d2268b4b792623bd8cc7ea887d96498f2a64d550beb930bb","impliedFormat":1},{"version":"cc6bdeb756593c9c914204f158057b328ed53c898f176a0706a8dafcc108b49e","impliedFormat":1},{"version":"d8f7109e14f20eb735225a62fd3f8366da1a8349e90331cdad57f4b04caf6c5a","impliedFormat":1},{"version":"cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","impliedFormat":1},{"version":"9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","impliedFormat":1},{"version":"c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","impliedFormat":1},{"version":"8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","impliedFormat":1},{"version":"86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","impliedFormat":1},{"version":"42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","impliedFormat":1},{"version":"ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","impliedFormat":1},{"version":"83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","impliedFormat":1},{"version":"1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","impliedFormat":1},{"version":"0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","impliedFormat":1},{"version":"cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","impliedFormat":1},{"version":"c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","impliedFormat":1},{"version":"f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","impliedFormat":1},{"version":"0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","impliedFormat":1},{"version":"7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","impliedFormat":1},{"version":"bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","impliedFormat":1},{"version":"52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","impliedFormat":1},{"version":"770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","impliedFormat":1},{"version":"d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","impliedFormat":1},{"version":"799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","impliedFormat":1},{"version":"2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","impliedFormat":1},{"version":"9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","impliedFormat":1},{"version":"397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","impliedFormat":1},{"version":"a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","impliedFormat":1},{"version":"a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","impliedFormat":1},{"version":"c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","impliedFormat":1},{"version":"4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","impliedFormat":1},{"version":"f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","impliedFormat":1},{"version":"cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","impliedFormat":1},{"version":"b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","impliedFormat":1},{"version":"c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","impliedFormat":1},{"version":"14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","impliedFormat":1},{"version":"a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","impliedFormat":1},{"version":"f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","impliedFormat":1},{"version":"3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","impliedFormat":1},{"version":"662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","impliedFormat":1},{"version":"c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","impliedFormat":1},{"version":"2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","impliedFormat":1},{"version":"34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","impliedFormat":1},{"version":"844ab83672160ca57a2a2ea46da4c64200d8c18d4ebb2087819649cad099ff0e","impliedFormat":1},{"version":"2bc8dc34e17c2289dec4615104ee29c874bf5e5224e199e376fdd502bb83ef9a","impliedFormat":1},{"version":"168435ab3390620aebf1aa0001b380983582d0849755eeb17f2c501d1fc57587","impliedFormat":1},{"version":"bf405bf5f16c35b3b2f0956602e4305d2b799a80ccbe384ff7cbfdd742cfc688","impliedFormat":1},{"version":"31c502014e5ba046d5cb060136929b73fd53f0f989aa37b2b0424644cb0d93ef","impliedFormat":1},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"2c3b8be03577c98530ef9cb1a76e2c812636a871f367e9edf4c5f3ce702b77f8","affectsGlobalScope":true,"impliedFormat":1},{"version":"c3924759a92cd75c7b9d36bc3aa7614e31c81df4a1dd8fc4289a9eeb56c596e0","affectsGlobalScope":true,"impliedFormat":1},{"version":"88c95849c807dcd491e15d624f27bc5e5680590bfb87d0278612aaee2d6214f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a80d576cb7beda26af64d1e0a23e382c9986fae214de994870f4cd7b4e0ea1","impliedFormat":1},{"version":"fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e","impliedFormat":1},{"version":"1ba59c8bbeed2cb75b239bb12041582fa3e8ef32f8d0bd0ec802e38442d3f317","impliedFormat":1},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"b7b0003c5404c9cae2d7caf5d6b469b190cea06cce7815ba0e479a4457875290","impliedFormat":1},{"version":"e9b48596baefe465d46567a4beccd564035024a154d99f54c7fed02380707333","impliedFormat":1},"1cf13a0e412ccde6ac154f59ad8e7c04ec603951a090c7799e107e5aff594c5c",{"version":"70f0ddc58f8b7283e1cffa39863938ab694e14fb3dcf0cac4d78b2d002f91255","affectsGlobalScope":true},{"version":"79da89e1b61cecf107f52a0c2578f31528bc0accdc73bec7325f468a5706a559","affectsGlobalScope":true,"impliedFormat":1},"4de163cf9037509faf9276540c717c0879309ee4e385b5ccfe6de54868d50de1"],"root":[[157,159]],"options":{"composite":true,"declaration":true,"declarationMap":true,"inlineSourceMap":true,"inlineSources":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitThis":true,"outDir":"./","rootDir":"..","skipLibCheck":true,"strictBindCallApply":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":7},"referencedMap":[[156,1],[149,2],[148,3],[150,4],[151,5],[153,6],[154,6],[155,7],[152,6],[147,6],[146,8],[159,6],[157,9],[158,10],[160,6],[161,11],[163,12],[167,13],[168,14],[169,15],[170,6],[171,16],[173,17],[174,11],[175,18],[180,19],[179,20],[178,21],[176,6],[181,22],[182,6],[183,23],[184,6],[185,24],[186,6],[165,6],[187,6],[177,6],[188,6],[189,15],[190,25],[191,6],[192,26],[194,27],[195,28],[193,29],[196,30],[197,31],[198,32],[199,33],[200,34],[201,35],[202,36],[203,37],[204,38],[205,39],[206,6],[209,40],[210,41],[207,6],[208,42],[211,6],[212,6],[213,6],[214,6],[172,6],[92,43],[93,43],[94,44],[52,45],[95,46],[96,47],[97,48],[47,6],[50,49],[48,6],[49,6],[98,50],[99,51],[100,52],[101,53],[102,54],[103,55],[104,55],[106,56],[105,57],[107,58],[108,59],[109,60],[91,61],[51,6],[110,62],[111,63],[112,64],[144,65],[113,66],[114,67],[115,68],[116,69],[117,70],[118,71],[119,72],[120,73],[121,74],[122,75],[123,75],[124,76],[125,6],[126,77],[128,78],[127,79],[129,80],[130,81],[131,82],[132,83],[133,84],[134,85],[135,86],[136,87],[137,88],[138,89],[139,90],[140,91],[141,92],[142,93],[143,94],[215,6],[216,6],[217,11],[218,15],[219,6],[220,16],[166,95],[221,11],[246,96],[247,97],[222,98],[225,98],[244,96],[245,96],[235,96],[234,99],[232,96],[227,96],[240,96],[238,96],[242,96],[226,96],[239,96],[243,96],[228,96],[229,96],[241,96],[223,96],[230,96],[231,96],[233,96],[237,96],[248,100],[236,96],[224,96],[261,101],[260,6],[255,100],[257,102],[256,100],[249,100],[250,100],[252,100],[254,100],[258,102],[259,102],[251,102],[253,102],[262,16],[263,6],[264,6],[265,103],[267,104],[266,6],[268,6],[269,105],[270,6],[271,6],[272,106],[273,6],[274,107],[162,11],[275,6],[53,6],[164,56],[145,15],[278,6],[45,6],[46,6],[8,6],[10,6],[9,6],[2,6],[11,6],[12,6],[13,6],[14,6],[15,6],[16,6],[17,6],[18,6],[3,6],[19,6],[20,6],[4,6],[21,6],[25,6],[22,6],[23,6],[24,6],[26,6],[27,6],[28,6],[5,6],[29,6],[30,6],[31,6],[32,6],[6,6],[36,6],[33,6],[34,6],[35,6],[37,6],[7,6],[38,6],[43,6],[44,6],[39,6],[40,6],[41,6],[42,6],[1,6],[69,108],[79,109],[68,108],[89,110],[60,111],[59,112],[88,11],[82,113],[87,114],[62,115],[76,116],[61,117],[85,118],[57,119],[56,11],[86,120],[58,121],[63,122],[64,6],[67,122],[54,6],[90,123],[80,124],[71,125],[72,126],[74,127],[70,128],[73,129],[83,11],[65,130],[66,131],[75,132],[55,133],[78,124],[77,122],[81,6],[84,134],[276,135],[277,6],[279,136]],"latestChangedDtsFile":"./src/index.d.ts","version":"5.7.2"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo-beta/deser-lib",
3
- "version": "1.0.1-beta.6",
3
+ "version": "1.0.1-beta.600",
4
4
  "description": "BitGo serialization and deseralization library",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
@@ -42,5 +42,5 @@
42
42
  "dependencies": {
43
43
  "cbor": "^9.0.1"
44
44
  },
45
- "gitHead": "dd5ec4a888d93519876bd534a0d57c99c5579f76"
45
+ "gitHead": "ccde4d863f615885cbecb9cb7fdba01936ff9f85"
46
46
  }
package/.prettierignore DELETED
@@ -1,2 +0,0 @@
1
- .nyc_output/
2
- dist/
package/.prettierrc.yml DELETED
@@ -1,3 +0,0 @@
1
- printWidth: 120
2
- singleQuote: true
3
- trailingComma: 'es5'
package/src/cbor.ts DELETED
@@ -1,216 +0,0 @@
1
- import { decodeFirstSync, encodeCanonical } from 'cbor';
2
-
3
- /**
4
- * Return a string describing value as a type.
5
- * @param value - Any javascript value to type.
6
- * @returns String describing value type.
7
- */
8
- function getType(value: unknown): string {
9
- if (value === null || value === undefined) {
10
- return 'null';
11
- }
12
- if (value instanceof Array) {
13
- const types = value.map(getType);
14
- if (!types.slice(1).every((value) => value === types[0])) {
15
- throw new Error('Array elements are not of the same type');
16
- }
17
- return JSON.stringify([types[0]]);
18
- }
19
- if (value instanceof Object) {
20
- const properties = Object.getOwnPropertyNames(value);
21
- properties.sort();
22
- return JSON.stringify(
23
- properties.reduce((acc, name) => {
24
- acc[name] = getType(value[name]);
25
- return acc;
26
- }, {})
27
- );
28
- }
29
- if (typeof value === 'string') {
30
- if (value.startsWith('0x')) {
31
- return 'bytes';
32
- }
33
- return 'string';
34
- }
35
- return JSON.stringify(typeof value);
36
- }
37
-
38
- /**
39
- * Compare two buffers for sorting.
40
- * @param a - left buffer to compare to right buffer.
41
- * @param b - right buffer to compare to left buffer.
42
- * @returns Negative if a < b, positive if b > a, 0 if equal.
43
- */
44
- function bufferCompare(a: Buffer, b: Buffer): number {
45
- let i = 0;
46
- while (i < a.length && i < b.length && a[i] == b[i]) {
47
- i++;
48
- }
49
- if (i === a.length && i === b.length) {
50
- return 0;
51
- }
52
- if (i === a.length || i === b.length) {
53
- return a.length - b.length;
54
- }
55
- return a[i] - b[i];
56
- }
57
-
58
- /** A sortable array element. */
59
- type Sortable = {
60
- weight: number;
61
- value?: unknown;
62
- };
63
-
64
- /**
65
- * Type check for sortable array element.
66
- * @param value - Value to type check.
67
- * @returns True if value is a sortable array element.
68
- */
69
- function isSortable(value: unknown): value is Sortable {
70
- return value instanceof Object && 'weight' in value && typeof (value as Sortable).weight === 'number';
71
- }
72
-
73
- /**
74
- * Convert number to base 256 and return as a big-endian Buffer.
75
- * @param value - Value to convert.
76
- * @returns Buffer representation of the number.
77
- */
78
- function numberToBufferBE(value: number): Buffer {
79
- // Normalize value so that negative numbers aren't compared higher
80
- // than positive numbers when accounting for two's complement.
81
- value += Math.pow(2, 52);
82
- const byteCount = Math.floor((value.toString(2).length + 7) / 8);
83
- const buffer = Buffer.alloc(byteCount);
84
- let i = 0;
85
- while (value) {
86
- buffer[i++] = value % 256;
87
- value = Math.floor(value / 256);
88
- }
89
- return buffer.reverse();
90
- }
91
-
92
- /**
93
- * Compare two array elements for sorting.
94
- * @param a - left element to compare to right element.
95
- * @param b - right element to compare to left element.
96
- * @returns Negative if a < b, positive if b > a, 0 if equal.
97
- */
98
- function elementCompare(a: unknown, b: unknown): number {
99
- if (!isSortable(a) || !isSortable(b)) {
100
- throw new Error('Array elements must be sortable');
101
- }
102
- if (a.weight === b.weight) {
103
- if (a.value === undefined && b.value === undefined) {
104
- throw new Error('Array elements must be sortable');
105
- }
106
- const aVal = transform(a.value);
107
- const bVal = transform(b.value);
108
- if (
109
- (!Buffer.isBuffer(aVal) && typeof aVal !== 'string' && typeof aVal !== 'number') ||
110
- (!Buffer.isBuffer(bVal) && typeof bVal !== 'string' && typeof bVal !== 'number')
111
- ) {
112
- throw new Error('Array element value cannot be compared');
113
- }
114
- let aBuf, bBuf;
115
- if (typeof aVal === 'number') {
116
- aBuf = numberToBufferBE(aVal);
117
- } else {
118
- aBuf = Buffer.from(aVal);
119
- }
120
- if (typeof bVal === 'number') {
121
- bBuf = numberToBufferBE(bVal);
122
- } else {
123
- bBuf = Buffer.from(bVal);
124
- }
125
- return bufferCompare(aBuf, bBuf);
126
- }
127
- return a.weight - b.weight;
128
- }
129
-
130
- /**
131
- * Transform value into its canonical, serializable form.
132
- * @param value - Value to transform.
133
- * @returns Canonical, serializable form of value.
134
- */
135
- export function transform<T>(value: T): T | Buffer {
136
- if (value === null || value === undefined) {
137
- return value;
138
- }
139
- if (typeof value === 'string') {
140
- // Transform hex strings to buffers.
141
- if (value.startsWith('0x')) {
142
- if (!value.match(/^0x([0-9a-fA-F]{2})*$/)) {
143
- throw new Error('0x prefixed string contains non-hex characters.');
144
- }
145
- return Buffer.from(value.slice(2), 'hex');
146
- } else if (value.startsWith('\\0x')) {
147
- return value.slice(1) as unknown as T;
148
- }
149
- } else if (value instanceof Array) {
150
- // Enforce array elements are same type.
151
- getType(value);
152
- value = [...value] as unknown as T;
153
- (value as unknown as Array<unknown>).sort(elementCompare);
154
- return (value as unknown as Array<unknown>).map(transform) as unknown as T;
155
- } else if (value instanceof Object) {
156
- const properties = Object.getOwnPropertyNames(value);
157
- properties.sort();
158
- return properties.reduce((acc, name) => {
159
- acc[name] = transform(value[name]);
160
- return acc;
161
- }, {}) as unknown as T;
162
- }
163
- return value;
164
- }
165
-
166
- /**
167
- * Untransform value into its human readable form.
168
- * @param value - Value to untransform.
169
- * @returns Untransformed, human readable form of value.
170
- */
171
- export function untransform<T>(value: T): T | string {
172
- if (Buffer.isBuffer(value)) {
173
- return '0x' + value.toString('hex');
174
- } else if (typeof value === 'string') {
175
- if (value.startsWith('0x')) {
176
- return '\\' + value;
177
- }
178
- } else if (value instanceof Array && value.length > 1) {
179
- for (let i = 1; i < value.length; i++) {
180
- if (value[i - 1].weight > value[i].weight) {
181
- throw new Error('Array elements are not in canonical order');
182
- }
183
- }
184
- return value.map(untransform) as unknown as T;
185
- } else if (value instanceof Object) {
186
- const properties = Object.getOwnPropertyNames(value);
187
- for (let i = 1; i < properties.length; i++) {
188
- if (properties[i - 1].localeCompare(properties[i]) > 0) {
189
- throw new Error('Object properties are not in caonical order');
190
- }
191
- }
192
- return properties.reduce((acc, name) => {
193
- acc[name] = untransform(value[name]);
194
- return acc;
195
- }, {}) as unknown as T;
196
- }
197
- return value;
198
- }
199
-
200
- /**
201
- * Serialize a value.
202
- * @param value - Value to serialize.
203
- * @returns Buffer representing serialized value.
204
- */
205
- export function serialize<T>(value: T): Buffer {
206
- return encodeCanonical(transform(value));
207
- }
208
-
209
- /**
210
- * Deserialize a value.
211
- * @param value - Buffer to deserialize.
212
- * @returns Deserialized value.
213
- */
214
- export function deserialize(value: Buffer): unknown {
215
- return untransform(decodeFirstSync(value));
216
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * as Cbor from './cbor';
@@ -1,96 +0,0 @@
1
- [
2
- {
3
- "deserialized": {
4
- "keys": [
5
- {
6
- "key": "0x010203",
7
- "weight": 0
8
- },
9
- {
10
- "key": "0x040506",
11
- "weight": 1
12
- }
13
- ]
14
- },
15
- "serialized": "a1646b65797382a2636b6579430102036677656967687400a2636b6579430405066677656967687401"
16
- },
17
- {
18
- "deserialized": {
19
- "a": "0xffffffff",
20
- "b": "0x00000000",
21
- "c": "0xffffffff",
22
- "d": [
23
- {
24
- "weight": 0
25
- },
26
- {
27
- "weight": 1
28
- },
29
- {
30
- "weight": 2
31
- },
32
- {
33
- "weight": 3
34
- }
35
- ]
36
- },
37
- "serialized": "a4616144ffffffff61624400000000616344ffffffff616484a16677656967687400a16677656967687401a16677656967687402a16677656967687403"
38
- },
39
- {
40
- "deserialized": {
41
- "a": [
42
- {
43
- "value": "a",
44
- "weight": 0
45
- },
46
- {
47
- "value": "b",
48
- "weight": 0
49
- },
50
- {
51
- "value": "c",
52
- "weight": 0
53
- }
54
- ]
55
- },
56
- "serialized": "a1616183a26576616c756561616677656967687400a26576616c756561626677656967687400a26576616c756561636677656967687400"
57
- },
58
- {
59
- "deserialized": {
60
- "a": [
61
- {
62
- "value": "0x0a",
63
- "weight": 0
64
- },
65
- {
66
- "value": "0x0b",
67
- "weight": 0
68
- },
69
- {
70
- "value": "0x0c",
71
- "weight": 0
72
- }
73
- ]
74
- },
75
- "serialized": "a1616183a26576616c7565410a6677656967687400a26576616c7565410b6677656967687400a26576616c7565410c6677656967687400"
76
- },
77
- {
78
- "deserialized": {
79
- "a": [
80
- {
81
- "value": 1,
82
- "weight": 0
83
- },
84
- {
85
- "value": 2,
86
- "weight": 0
87
- },
88
- {
89
- "value": 3,
90
- "weight": 0
91
- }
92
- ]
93
- },
94
- "serialized": "a1616183a26576616c7565016677656967687400a26576616c7565026677656967687400a26576616c7565036677656967687400"
95
- }
96
- ]
@@ -1,326 +0,0 @@
1
- import { Cbor } from '../..';
2
- import * as cborFixtures from '../cbor/fixtures.json';
3
-
4
- describe('deser-lib', function () {
5
- describe('cbor', function () {
6
- describe('transform', function () {
7
- it('orders object properties canonically', function () {
8
- const res = Cbor.transform({ b: 'second', a: 'first' }) as any;
9
- const properties = Object.getOwnPropertyNames(res);
10
- properties[0].should.equal('a');
11
- properties[1].should.equal('b');
12
- res.a.should.equal('first');
13
- res.b.should.equal('second');
14
- });
15
-
16
- describe('canonical ordering', function () {
17
- it('orders by weight', function () {
18
- const res = Cbor.transform([
19
- { weight: 2, value: null },
20
- { weight: 1, value: null },
21
- ]) as any;
22
- res[0].weight.should.equal(1);
23
- res[1].weight.should.equal(2);
24
- });
25
-
26
- it('groups equal elements', function () {
27
- const res = Cbor.transform([
28
- {
29
- weight: 2,
30
- value: 'b',
31
- },
32
- {
33
- weight: 1,
34
- value: 'a',
35
- },
36
- {
37
- weight: 3,
38
- value: 'c',
39
- },
40
- {
41
- weight: 2,
42
- value: 'b',
43
- },
44
- ]) as any;
45
- res[0].weight.should.equal(1);
46
- res[1].weight.should.equal(2);
47
- res[2].weight.should.equal(2);
48
- res[3].weight.should.equal(3);
49
- });
50
-
51
- it('orders number values', function () {
52
- const res = Cbor.transform([
53
- { weight: 1, value: 2 },
54
- { weight: 1, value: 1 },
55
- ]) as any;
56
- res[0].value.should.equal(1);
57
- res[1].value.should.equal(2);
58
- });
59
-
60
- it('orders string values', function () {
61
- const res = Cbor.transform([
62
- { weight: 1, value: 'ab' },
63
- { weight: 1, value: 'aa' },
64
- ]) as any;
65
- res[0].value.should.equal('aa');
66
- res[1].value.should.equal('ab');
67
- });
68
-
69
- it('orders byte values', function () {
70
- const res = Cbor.transform([
71
- { weight: 1, value: '0x0b' },
72
- { weight: 1, value: '0x0a' },
73
- ]) as any;
74
- res[0].value.equals(Buffer.from([0x0a])).should.equal(true);
75
- res[1].value.equals(Buffer.from([0x0b])).should.equal(true);
76
- });
77
-
78
- it('orders string values of different lengths', function () {
79
- const res = Cbor.transform([
80
- { weight: 1, value: 'ab' },
81
- { weight: 1, value: 'a' },
82
- ]) as any;
83
- res[0].value.should.equal('a');
84
- res[1].value.should.equal('ab');
85
- });
86
-
87
- it('throws for elements without weight', function () {
88
- (() => Cbor.transform([{}, {}])).should.throw();
89
- });
90
-
91
- it('throws for elements without value', function () {
92
- (() => Cbor.transform([{ weight: 1 }, { weight: 1 }])).should.throw();
93
- });
94
-
95
- it('throws for values that cannot be compared', function () {
96
- (() =>
97
- Cbor.transform([
98
- { weight: 1, value: {} },
99
- { weight: 1, value: 1 },
100
- ])).should.throw();
101
- (() =>
102
- Cbor.transform([
103
- { weight: 1, value: undefined },
104
- { weight: 1, value: null },
105
- ])).should.throw();
106
- });
107
-
108
- it('throws for elements of mixed type', function () {
109
- (() =>
110
- Cbor.transform([
111
- { weight: 0, value: '0' },
112
- { weight: 0, value: 0 },
113
- ])).should.throw();
114
- });
115
- });
116
-
117
- it('preserves null values', function () {
118
- const res = Cbor.transform({ value: null }) as any;
119
- res.should.have.property('value').which.is.null();
120
- });
121
-
122
- it('replaces prefixed hex strings with Buffers', function () {
123
- const hex = '00010203';
124
- const res = Cbor.transform({ value: '0x' + hex }) as any;
125
- Buffer.isBuffer(res.value).should.equal(true);
126
- res.value.equals(Buffer.from(hex, 'hex')).should.equal(true);
127
- });
128
-
129
- it('preserves non-prefixed hex strings', function () {
130
- const string = '00010203';
131
- const res = Cbor.transform({ value: string }) as any;
132
- res.value.should.equal(string);
133
- });
134
-
135
- it('preserves escaped strings', function () {
136
- const string = '0xPrefixedString';
137
- const res = Cbor.transform({ value: '\\' + string }) as any;
138
- res.value.should.equal(string);
139
- });
140
-
141
- it('transforms object recursively', function () {
142
- const res = Cbor.transform({ value: { b: 'second', a: 'first' } }) as any;
143
- const properties = Object.getOwnPropertyNames(res.value);
144
- properties[0].should.equal('a');
145
- properties[1].should.equal('b');
146
- res.value.a.should.equal('first');
147
- res.value.b.should.equal('second');
148
- });
149
-
150
- it('transforms array recursively', function () {
151
- const res = Cbor.transform([{ weight: 0, value: { b: 'second', a: 'first' } }]) as any;
152
- const properties = Object.getOwnPropertyNames(res[0].value);
153
- properties[0].should.equal('a');
154
- properties[1].should.equal('b');
155
- res[0].value.a.should.equal('first');
156
- res[0].value.b.should.equal('second');
157
- });
158
-
159
- it('throws for invalid hex strings', function () {
160
- (() => Cbor.transform('0x0g')).should.throw();
161
- });
162
- });
163
-
164
- describe('untransform', function () {
165
- it('untransforms object', function () {
166
- const res = Cbor.untransform({ a: 'first', b: 'second' }) as any;
167
- const properties = Object.getOwnPropertyNames(res);
168
- properties[0].should.equal('a');
169
- properties[1].should.equal('b');
170
- res.a.should.equal('first');
171
- res.b.should.equal('second');
172
- });
173
-
174
- it('enforces canonical object property order', function () {
175
- (() => Cbor.untransform({ b: 'second', a: 'first' })).should.throw();
176
- });
177
-
178
- it('enforces canonical array element order', function () {
179
- (() => Cbor.untransform([{ weight: 2 }, { weight: 1 }])).should.throw();
180
- });
181
-
182
- it('replaces Buffers with prefixed hex strings', function () {
183
- const hex = '00010203';
184
- const res = Cbor.untransform({ value: Buffer.from(hex, 'hex') }) as any;
185
- res.value.should.equal('0x' + hex);
186
- });
187
-
188
- it('preserves non-prefixed hex strings', function () {
189
- const string = '00010203';
190
- const res = Cbor.untransform({ value: string }) as any;
191
- res.value.should.equal(string);
192
- });
193
-
194
- it('escapes prefixed string', function () {
195
- const string = '0xPrefixedString';
196
- const res = Cbor.untransform({ value: string }) as any;
197
- res.value.should.equal('\\' + string);
198
- });
199
-
200
- it('untransforms object recursively', function () {
201
- const hex = '00010203';
202
- const res = Cbor.untransform({ value: { value: Buffer.from(hex, 'hex') } }) as any;
203
- res.value.value.should.equal('0x' + hex);
204
- });
205
-
206
- it('untransforms array recursively', function () {
207
- const hex = '00010203';
208
- const res = Cbor.untransform([{ value: Buffer.from(hex, 'hex'), weight: 0 }]) as any;
209
- res[0].value.should.equal('0x' + hex);
210
- });
211
- });
212
-
213
- describe('fixtures', function () {
214
- xit('creates test vectors', function () {
215
- const { writeFileSync } = require('fs');
216
- const deserialized = [
217
- {
218
- keys: [
219
- {
220
- key: '0x010203',
221
- weight: 0,
222
- },
223
- {
224
- key: '0x040506',
225
- weight: 1,
226
- },
227
- ],
228
- },
229
- {
230
- a: '0xffffffff',
231
- b: '0x00000000',
232
- c: '0xffffffff',
233
- d: [
234
- {
235
- weight: 0,
236
- },
237
- {
238
- weight: 1,
239
- },
240
- {
241
- weight: 2,
242
- },
243
- {
244
- weight: 3,
245
- },
246
- ],
247
- },
248
- {
249
- a: [
250
- {
251
- value: 'a',
252
- weight: 0,
253
- },
254
- {
255
- value: 'b',
256
- weight: 0,
257
- },
258
- {
259
- value: 'c',
260
- weight: 0,
261
- },
262
- ],
263
- },
264
- {
265
- a: [
266
- {
267
- weight: 0,
268
- value: '0x0a',
269
- },
270
- {
271
- weight: 0,
272
- value: '0x0b',
273
- },
274
- {
275
- weight: 0,
276
- value: '0x0c',
277
- },
278
- ],
279
- },
280
- {
281
- a: [
282
- {
283
- weight: 0,
284
- value: 1,
285
- },
286
- {
287
- weight: 0,
288
- value: 2,
289
- },
290
- {
291
- weight: 0,
292
- value: 3,
293
- },
294
- ],
295
- },
296
- ];
297
- const serialized = deserialized.map((x) => Cbor.serialize(x).toString('hex'));
298
- writeFileSync(
299
- 'test/cbor/fixtures.json',
300
- JSON.stringify(
301
- deserialized.map((deserialized, i) => ({
302
- deserialized: Cbor.untransform(Cbor.transform(deserialized)),
303
- serialized: serialized[i],
304
- })),
305
- null,
306
- 2
307
- )
308
- );
309
- });
310
-
311
- for (let i = 0; i < cborFixtures.length; i++) {
312
- it(`deserializes vector[${i}]`, function () {
313
- const { deserialized, serialized } = cborFixtures[i];
314
- Cbor.serialize(deserialized).equals(Buffer.from(serialized, 'hex')).should.equal(true);
315
- });
316
- }
317
-
318
- for (let i = 0; i < cborFixtures.length; i++) {
319
- it(`serializes vector[${i}]`, function () {
320
- const { deserialized, serialized } = cborFixtures[i];
321
- JSON.stringify(Cbor.deserialize(Buffer.from(serialized, 'hex'))).should.equal(JSON.stringify(deserialized));
322
- });
323
- }
324
- });
325
- });
326
- });
package/tsconfig.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "."
6
- },
7
- "include": ["src/**/*", "package.json"]
8
- }