@bitgo-beta/deser-lib 1.0.1-beta.4 → 1.0.1-beta.400

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,61 @@
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.0 (2024-09-10)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **deser-lib:** add .npmignore to deser-lib ([8572427](https://github.com/BitGo/BitGoJS/commit/857242748d28c1d27c85578091d902701ce6f41e))
11
+ - **deser-lib:** add deser-lib path to tsconfig.packages ([0e5ef65](https://github.com/BitGo/BitGoJS/commit/0e5ef654b78214b7cc6086ce05c305d4d7425d64))
12
+ - **deser-lib:** use cbor.encode instead of cbor.encodeCanonical ([5209222](https://github.com/BitGo/BitGoJS/commit/5209222b8667d2e843cf5257f9a59b9b0fa39a5d))
13
+
14
+ ### Features
15
+
16
+ - bump typescript to 4.9 ([6675058](https://github.com/BitGo/BitGoJS/commit/667505862b79d24e3f625e7306d949acf07691bf))
17
+ - **deser-lib:** add serialization/deserialization module ([95c0308](https://github.com/BitGo/BitGoJS/commit/95c03088faa890604880dae770c4a720850f9275))
18
+ - **deser-lib:** support escaped strings ([95cd394](https://github.com/BitGo/BitGoJS/commit/95cd39476895b2fd3e766683eb5e7129c200d516))
19
+
20
+ # 1.5.0 (2024-01-30)
21
+
22
+ ### Bug Fixes
23
+
24
+ - **deser-lib:** add .npmignore to deser-lib ([8572427](https://github.com/BitGo/BitGoJS/commit/857242748d28c1d27c85578091d902701ce6f41e))
25
+ - **deser-lib:** add deser-lib path to tsconfig.packages ([0e5ef65](https://github.com/BitGo/BitGoJS/commit/0e5ef654b78214b7cc6086ce05c305d4d7425d64))
26
+
27
+ ### Features
28
+
29
+ - **deser-lib:** add serialization/deserialization module ([95c0308](https://github.com/BitGo/BitGoJS/commit/95c03088faa890604880dae770c4a720850f9275))
30
+ - **deser-lib:** support escaped strings ([95cd394](https://github.com/BitGo/BitGoJS/commit/95cd39476895b2fd3e766683eb5e7129c200d516))
31
+
32
+ # 1.4.0 (2024-01-26)
33
+
34
+ ### Bug Fixes
35
+
36
+ - **deser-lib:** add deser-lib path to tsconfig.packages ([0e5ef65](https://github.com/BitGo/BitGoJS/commit/0e5ef654b78214b7cc6086ce05c305d4d7425d64))
37
+
38
+ ### Features
39
+
40
+ - **deser-lib:** add serialization/deserialization module ([95c0308](https://github.com/BitGo/BitGoJS/commit/95c03088faa890604880dae770c4a720850f9275))
41
+ - **deser-lib:** support escaped strings ([95cd394](https://github.com/BitGo/BitGoJS/commit/95cd39476895b2fd3e766683eb5e7129c200d516))
42
+
43
+ # 1.3.0 (2024-01-26)
44
+
45
+ ### Bug Fixes
46
+
47
+ - **deser-lib:** add deser-lib path to tsconfig.packages ([0e5ef65](https://github.com/BitGo/BitGoJS/commit/0e5ef654b78214b7cc6086ce05c305d4d7425d64))
48
+
49
+ ### Features
50
+
51
+ - **deser-lib:** add serialization/deserialization module ([95c0308](https://github.com/BitGo/BitGoJS/commit/95c03088faa890604880dae770c4a720850f9275))
52
+ - **deser-lib:** support escaped strings ([95cd394](https://github.com/BitGo/BitGoJS/commit/95cd39476895b2fd3e766683eb5e7129c200d516))
53
+
54
+ # 1.2.0 (2024-01-25)
55
+
56
+ ### Features
57
+
58
+ - **deser-lib:** add serialization/deserialization module ([95c0308](https://github.com/BitGo/BitGoJS/commit/95c03088faa890604880dae770c4a720850f9275))
59
+ - **deser-lib:** support escaped strings ([95cd394](https://github.com/BitGo/BitGoJS/commit/95cd39476895b2fd3e766683eb5e7129c200d516))
60
+
6
61
  # 1.1.0 (2024-01-22)
7
62
 
8
63
  ### Features
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
1
  # Deser Lib
2
2
 
3
- This library will be used to centralize all the serialization and de-serialization schemes used in the bitgojs modules.
3
+ This library will be used to centralize all the serialization and de-serialization schemes used in the BitGoJS modules.
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@bitgo-beta/deser-lib",
3
+ "version": "1.0.1-beta.400",
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": "29e4fa18cfa9b5c1afe4ec19a107df673e883fa6"
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":"AAiIA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM,CA6BjD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM,CA2BnD;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,212 @@
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
+ * Return a string describing value as a type.
10
+ * @param value - Any javascript value to type.
11
+ * @returns String describing value type.
12
+ */
13
+ function getType(value) {
14
+ if (value === null || value === undefined) {
15
+ return 'null';
16
+ }
17
+ if (value instanceof Array) {
18
+ const types = value.map(getType);
19
+ if (!types.slice(1).every((value) => value === types[0])) {
20
+ throw new Error('Array elements are not of the same type');
21
+ }
22
+ return JSON.stringify([types[0]]);
23
+ }
24
+ if (value instanceof Object) {
25
+ const properties = Object.getOwnPropertyNames(value);
26
+ properties.sort();
27
+ return JSON.stringify(properties.reduce((acc, name) => {
28
+ acc[name] = getType(value[name]);
29
+ return acc;
30
+ }, {}));
31
+ }
32
+ if (typeof value === 'string') {
33
+ if (value.startsWith('0x')) {
34
+ return 'bytes';
35
+ }
36
+ return 'string';
37
+ }
38
+ return JSON.stringify(typeof value);
39
+ }
40
+ /**
41
+ * Compare two buffers for sorting.
42
+ * @param a - left buffer to compare to right buffer.
43
+ * @param b - right buffer to compare to left buffer.
44
+ * @returns Negative if a < b, positive if b > a, 0 if equal.
45
+ */
46
+ function bufferCompare(a, b) {
47
+ let i = 0;
48
+ while (i < a.length && i < b.length && a[i] == b[i]) {
49
+ i++;
50
+ }
51
+ if (i === a.length && i === b.length) {
52
+ return 0;
53
+ }
54
+ if (i === a.length || i === b.length) {
55
+ return a.length - b.length;
56
+ }
57
+ return a[i] - b[i];
58
+ }
59
+ /**
60
+ * Type check for sortable array element.
61
+ * @param value - Value to type check.
62
+ * @returns True if value is a sortable array element.
63
+ */
64
+ function isSortable(value) {
65
+ return value instanceof Object && 'weight' in value && typeof value.weight === 'number';
66
+ }
67
+ /**
68
+ * Convert number to base 256 and return as a big-endian Buffer.
69
+ * @param value - Value to convert.
70
+ * @returns Buffer representation of the number.
71
+ */
72
+ function numberToBufferBE(value) {
73
+ // Normalize value so that negative numbers aren't compared higher
74
+ // than positive numbers when accounting for two's complement.
75
+ value += Math.pow(2, 52);
76
+ const byteCount = Math.floor((value.toString(2).length + 7) / 8);
77
+ const buffer = Buffer.alloc(byteCount);
78
+ let i = 0;
79
+ while (value) {
80
+ buffer[i++] = value % 256;
81
+ value = Math.floor(value / 256);
82
+ }
83
+ return buffer.reverse();
84
+ }
85
+ /**
86
+ * Compare two array elements for sorting.
87
+ * @param a - left element to compare to right element.
88
+ * @param b - right element to compare to left element.
89
+ * @returns Negative if a < b, positive if b > a, 0 if equal.
90
+ */
91
+ function elementCompare(a, b) {
92
+ if (!isSortable(a) || !isSortable(b)) {
93
+ throw new Error('Array elements must be sortable');
94
+ }
95
+ if (a.weight === b.weight) {
96
+ if (a.value === undefined && b.value === undefined) {
97
+ throw new Error('Array elements must be sortable');
98
+ }
99
+ const aVal = transform(a.value);
100
+ const bVal = transform(b.value);
101
+ if ((!Buffer.isBuffer(aVal) && typeof aVal !== 'string' && typeof aVal !== 'number') ||
102
+ (!Buffer.isBuffer(bVal) && typeof bVal !== 'string' && typeof bVal !== 'number')) {
103
+ throw new Error('Array element value cannot be compared');
104
+ }
105
+ let aBuf, bBuf;
106
+ if (typeof aVal === 'number') {
107
+ aBuf = numberToBufferBE(aVal);
108
+ }
109
+ else {
110
+ aBuf = Buffer.from(aVal);
111
+ }
112
+ if (typeof bVal === 'number') {
113
+ bBuf = numberToBufferBE(bVal);
114
+ }
115
+ else {
116
+ bBuf = Buffer.from(bVal);
117
+ }
118
+ return bufferCompare(aBuf, bBuf);
119
+ }
120
+ return a.weight - b.weight;
121
+ }
122
+ /**
123
+ * Transform value into its canonical, serializable form.
124
+ * @param value - Value to transform.
125
+ * @returns Canonical, serializable form of value.
126
+ */
127
+ function transform(value) {
128
+ if (value === null || value === undefined) {
129
+ return value;
130
+ }
131
+ if (typeof value === 'string') {
132
+ // Transform hex strings to buffers.
133
+ if (value.startsWith('0x')) {
134
+ if (!value.match(/^0x([0-9a-fA-F]{2})*$/)) {
135
+ throw new Error('0x prefixed string contains non-hex characters.');
136
+ }
137
+ return Buffer.from(value.slice(2), 'hex');
138
+ }
139
+ else if (value.startsWith('\\0x')) {
140
+ return value.slice(1);
141
+ }
142
+ }
143
+ else if (value instanceof Array) {
144
+ // Enforce array elements are same type.
145
+ getType(value);
146
+ value = [...value];
147
+ value.sort(elementCompare);
148
+ return value.map(transform);
149
+ }
150
+ else if (value instanceof Object) {
151
+ const properties = Object.getOwnPropertyNames(value);
152
+ properties.sort();
153
+ return properties.reduce((acc, name) => {
154
+ acc[name] = transform(value[name]);
155
+ return acc;
156
+ }, {});
157
+ }
158
+ return value;
159
+ }
160
+ /**
161
+ * Untransform value into its human readable form.
162
+ * @param value - Value to untransform.
163
+ * @returns Untransformed, human readable form of value.
164
+ */
165
+ function untransform(value) {
166
+ if (Buffer.isBuffer(value)) {
167
+ return '0x' + value.toString('hex');
168
+ }
169
+ else if (typeof value === 'string') {
170
+ if (value.startsWith('0x')) {
171
+ return '\\' + value;
172
+ }
173
+ }
174
+ else if (value instanceof Array && value.length > 1) {
175
+ for (let i = 1; i < value.length; i++) {
176
+ if (value[i - 1].weight > value[i].weight) {
177
+ throw new Error('Array elements are not in canonical order');
178
+ }
179
+ }
180
+ return value.map(untransform);
181
+ }
182
+ else if (value instanceof Object) {
183
+ const properties = Object.getOwnPropertyNames(value);
184
+ for (let i = 1; i < properties.length; i++) {
185
+ if (properties[i - 1].localeCompare(properties[i]) > 0) {
186
+ throw new Error('Object properties are not in canonical order');
187
+ }
188
+ }
189
+ return properties.reduce((acc, name) => {
190
+ acc[name] = untransform(value[name]);
191
+ return acc;
192
+ }, {});
193
+ }
194
+ return value;
195
+ }
196
+ /**
197
+ * Serialize a value.
198
+ * @param value - Value to serialize.
199
+ * @returns Buffer representing serialized value.
200
+ */
201
+ function serialize(value) {
202
+ return (0, cbor_1.encode)(transform(value));
203
+ }
204
+ /**
205
+ * Deserialize a value.
206
+ * @param value - Buffer to deserialize.
207
+ * @returns Deserialized value.
208
+ */
209
+ function deserialize(value) {
210
+ return untransform((0, cbor_1.decodeFirstSync)(value));
211
+ }
212
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2Jvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jYm9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBc0lBLDhCQTZCQztBQU9ELGtDQTJCQztBQU9ELDhCQUVDO0FBT0Qsa0NBRUM7QUF2TkQsK0JBQStDO0FBRS9DOzs7O0dBSUc7QUFDSCxTQUFTLE9BQU8sQ0FBQyxLQUFjO0lBQzdCLElBQUksS0FBSyxLQUFLLElBQUksSUFBSSxLQUFLLEtBQUssU0FBUyxFQUFFLENBQUM7UUFDMUMsT0FBTyxNQUFNLENBQ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
+ {"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/bluebird/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/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],[52,95,156],[52,95,157],[52,95,144],[52,95,144,163],[52,95,107,110,137,144,165,166,167],[52,95,110,144],[52,95,126,144],[52,95,100,144],[52,95,173],[52,95,162],[52,95,177,180],[52,95,177,178,179],[52,95,180],[52,95,144,162],[52,95,183],[52,95,108,144],[52,95,107,144],[52,95,192],[52,95,194,196,197,198,199,200,201,202,203,204,205,206],[52,95,194,195,197,198,199,200,201,202,203,204,205,206],[52,95,195,196,197,198,199,200,201,202,203,204,205,206],[52,95,194,195,196,198,199,200,201,202,203,204,205,206],[52,95,194,195,196,197,199,200,201,202,203,204,205,206],[52,95,194,195,196,197,198,200,201,202,203,204,205,206],[52,95,194,195,196,197,198,199,201,202,203,204,205,206],[52,95,194,195,196,197,198,199,200,202,203,204,205,206],[52,95,194,195,196,197,198,199,200,201,203,204,205,206],[52,95,194,195,196,197,198,199,200,201,202,204,205,206],[52,95,194,195,196,197,198,199,200,201,202,203,205,206],[52,95,194,195,196,197,198,199,200,201,202,203,204,206],[52,95,194,195,196,197,198,199,200,201,202,203,204,205],[52,95,193,209],[52,95,210],[52,95,208],[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,128,129],[52,95,126,128],[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,223,262],[52,95,223,247,262],[52,95,262],[52,95,223],[52,95,223,248,262],[52,95,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,261],[52,95,248,262],[52,95,108,110,126,144,171],[52,95,267],[52,95,107,110,112,126,134,137,143,144],[52,95,272],[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,151,154],[52,95,126,145],[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,274,275],[52,95,277]],"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":"0fd06258805d26c72f5997e07a23155d322d5f05387adb3744a791fe6a0b042d","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":"ca6d304b929748ea15c33f28c1f159df18a94470b424ab78c52d68d40a41e1e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"a72ffc815104fb5c075106ebca459b2d55d07862a773768fce89efc621b3964b","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","impliedFormat":1},{"version":"d674383111e06b6741c4ad2db962131b5b0fa4d0294b998566c635e86195a453","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e58c4c18a031cbb17abec7a4ad0bd5ae9fc70c1f4ba1e7fb921ad87c504aca","impliedFormat":1},{"version":"a3e8bafb2af8e850c644f4be7f5156cf7d23b7bfdc3b786bd4d10ed40329649c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"f77d9188e41291acf14f476e931972460a303e1952538f9546e7b370cb8d0d20","affectsGlobalScope":true,"impliedFormat":1},{"version":"b0c0d1d13be149f790a75b381b413490f98558649428bb916fd2d71a3f47a134","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":"4d7da7075068195f8f127f41c61e304cdca5aafb1be2d0f4fb67c6b4c3e98d50","affectsGlobalScope":true,"impliedFormat":1},{"version":"a4bdde4e601e9554a844e1e0d0ccfa05e183ef9d82ab3ac25f17c1709033d360","impliedFormat":1},{"version":"ad23fd126ff06e72728dd7bfc84326a8ca8cec2b9d2dac0193d42a777df0e7d8","impliedFormat":1},{"version":"9dd9f50652a176469e85fb65aa081d2e7eb807e2c476f378233de4f1f6604962","impliedFormat":1},{"version":"93bd413918fa921c8729cef45302b24d8b6c7855d72d5bf82d3972595ae8dcbf","impliedFormat":1},{"version":"4ff41188773cbf465807dd2f7059c7494cbee5115608efc297383832a1150c43","impliedFormat":1},{"version":"dccdf1677e531e33f8ac961a68bc537418c9a414797c1ea7e91307501cdc3f5e","impliedFormat":1},{"version":"7edec695cdb707c7146ac34c44ca364469c7ea504344b3206c686e79f61b61a2","affectsGlobalScope":true,"impliedFormat":1},{"version":"d206b4baf4ddcc15d9d69a9a2f4999a72a2c6adeaa8af20fa7a9960816287555","impliedFormat":1},{"version":"93f437e1398a4f06a984f441f7fa7a9f0535c04399619b5c22e0b87bdee182cb","impliedFormat":1},{"version":"afbe24ab0d74694372baa632ecb28bb375be53f3be53f9b07ecd7fc994907de5","impliedFormat":1},{"version":"70731d10d5311bd4cf710ef7f6539b62660f4b0bfdbb3f9fbe1d25fe6366a7fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"a20f1e119615bf7632729fd89b6c0b5ffdc2df3b512d6304146294528e3ebe19","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":"235bfb54b4869c26f7e98e3d1f68dbfc85acf4cf5c38a4444a006fbf74a8a43d","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"bb715efb4857eb94539eafb420352105a0cff40746837c5140bf6b035dd220ba","affectsGlobalScope":true,"impliedFormat":1},{"version":"1851a3b4db78664f83901bb9cac9e45e03a37bb5933cc5bf37e10bb7e91ab4eb","impliedFormat":1},{"version":"fdedf82878e4c744bc2a1c1e802ae407d63474da51f14a54babe039018e53d8f","affectsGlobalScope":true,"impliedFormat":1},{"version":"08353b04a3501d84fc8d7b49de99f6c1cc26026e6d9d697a18315f3bfe92ed03","affectsGlobalScope":true,"impliedFormat":1},{"version":"578d8bb6dcb2a1c03c4c3f8eb71abc9677e1a5c788b7f24848e3138ce17f3400","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":"efeedd8bbc5c0d53e760d8b120a010470722982e6ae14de8d1bcff66ebc2ae71","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":"ab36210ada4e9fd1622604bb9b33206b2bbc18b498b612c542b2fd479abdab37","signature":"e4d983cdae8a2c584e96806aab041ed7073311ee4c912f0e792ac3d13c971fcc"},"d3e650b5e80f003e83a9b959b92a61d494a898703b95d8adb4d418a8e73ae843",{"version":"6278a87d8198e25ef3697693072458b1b66c1edc9c69a2151b851740c6624ed7","signature":"49f562f1b8637be95fa72606652bdca732095d1249a5432e42b52b6cfbdf1a1b"},{"version":"c31294ba7381e921caa30d4408fa7637053d9cb3456a750f276fd8a9bb0e42d8","impliedFormat":1},{"version":"ee3a39a0de7a80b8f3637977bdba57bfc48c87877aac70011ddc391c5a91ab5c","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":"68cc8d6fcc2f270d7108f02f3ebc59480a54615be3e09a47e14527f349e9d53e","impliedFormat":1},{"version":"3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","impliedFormat":1},{"version":"c0017998521cb9c4844bbc2b522ed2c257aa04e4582967fd6168fcd86cc13ab4","impliedFormat":1},{"version":"bc9d7f2a012412c294f4eb0fc856e063112a3666957a190542b62662391810b2","impliedFormat":1},{"version":"785b9d575b49124ce01b46f5b9402157c7611e6532effa562ac6aebec0074dfc","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":"ceeb65c57fe2a1300994f095b5e5c7c5eae440e9ce116d32a3b46184ab1630ec","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":"bdf0ed7d9ebae6175a5d1b4ec4065d07f8099379370a804b1faff05004dc387d","impliedFormat":1},{"version":"7c14ccd2eaa82619fffc1bfa877eb68a012e9fb723d07ee98db451fadb618906","impliedFormat":1},{"version":"288d992cd0d35fd4bb5a0f23df62114b8bfbc53e55b96a4ad00dde7e6fb72e31","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":"7d8ddf0f021c53099e34ee831a06c394d50371816caa98684812f089b4c6b3d4","impliedFormat":1},{"version":"2bc8dc34e17c2289dec4615104ee29c874bf5e5224e199e376fdd502bb83ef9a","impliedFormat":1},{"version":"168435ab3390620aebf1aa0001b380983582d0849755eeb17f2c501d1fc57587","impliedFormat":1},{"version":"bf405bf5f16c35b3b2f0956602e4305d2b799a80ccbe384ff7cbfdd742cfc688","impliedFormat":1},{"version":"31c502014e5ba046d5cb060136929b73fd53f0f989aa37b2b0424644cb0d93ef","impliedFormat":1},{"version":"c3924759a92cd75c7b9d36bc3aa7614e31c81df4a1dd8fc4289a9eeb56c596e0","affectsGlobalScope":true,"impliedFormat":1},{"version":"88c95849c807dcd491e15d624f27bc5e5680590bfb87d0278612aaee2d6214f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a80d576cb7beda26af64d1e0a23e382c9986fae214de994870f4cd7b4e0ea1","impliedFormat":1},{"version":"fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e","impliedFormat":1},{"version":"eb15edfcef078300657e1d5d678e1944b3518c2dd8f26792fdba2fe29f73d32b","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":[[159,1],[157,2],[158,3],[160,1],[161,1],[162,4],[164,5],[168,6],[169,7],[170,8],[171,1],[172,9],[174,10],[175,4],[176,11],[181,12],[180,13],[179,14],[177,1],[182,15],[183,1],[184,16],[185,1],[186,17],[187,1],[166,1],[188,1],[178,1],[189,1],[190,8],[191,18],[192,1],[193,19],[195,20],[196,21],[194,22],[197,23],[198,24],[199,25],[200,26],[201,27],[202,28],[203,29],[204,30],[205,31],[206,32],[207,1],[210,33],[211,34],[208,1],[209,35],[212,1],[213,1],[214,1],[215,1],[173,1],[92,36],[93,36],[94,37],[52,38],[95,39],[96,40],[97,41],[47,1],[50,42],[48,1],[49,1],[98,43],[99,44],[100,45],[101,46],[102,47],[103,48],[104,48],[106,49],[105,50],[107,51],[108,52],[109,53],[91,54],[51,1],[110,55],[111,56],[112,57],[144,58],[113,59],[114,60],[115,61],[116,62],[117,63],[118,64],[119,65],[120,66],[121,67],[122,68],[123,68],[124,69],[125,1],[126,70],[128,71],[127,72],[129,73],[130,74],[131,75],[132,76],[133,77],[134,78],[135,79],[136,80],[137,81],[138,82],[139,83],[140,84],[141,85],[142,86],[143,87],[216,1],[217,1],[218,4],[219,8],[220,1],[221,9],[167,88],[222,4],[247,89],[248,90],[223,91],[226,91],[245,89],[246,89],[236,89],[235,92],[233,89],[228,89],[241,89],[239,89],[243,89],[227,89],[240,89],[244,89],[229,89],[230,89],[242,89],[224,89],[231,89],[232,89],[234,89],[238,89],[249,93],[237,89],[225,89],[262,94],[261,1],[256,93],[258,95],[257,93],[250,93],[251,93],[253,93],[255,93],[259,95],[260,95],[252,95],[254,95],[263,9],[264,1],[265,1],[266,96],[267,1],[268,97],[269,1],[270,1],[271,98],[272,1],[273,99],[163,4],[274,1],[53,1],[156,100],[149,101],[148,102],[150,103],[151,104],[153,1],[154,1],[155,105],[152,1],[147,1],[146,106],[165,49],[145,8],[277,1],[45,1],[46,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[19,1],[20,1],[4,1],[21,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[36,1],[33,1],[34,1],[35,1],[37,1],[7,1],[38,1],[43,1],[44,1],[39,1],[40,1],[41,1],[42,1],[1,1],[69,107],[79,108],[68,107],[89,109],[60,110],[59,111],[88,4],[82,112],[87,113],[62,114],[76,115],[61,116],[85,117],[57,118],[56,4],[86,119],[58,120],[63,121],[64,1],[67,121],[54,1],[90,122],[80,123],[71,124],[72,125],[74,126],[70,127],[73,128],[83,4],[65,129],[66,130],[75,131],[55,132],[78,123],[77,121],[81,1],[84,133],[275,134],[276,1],[278,135]],"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.4",
3
+ "version": "1.0.1-beta.400",
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": "7da98057bcca6e561fec113af3d3f0735411d8f2"
45
+ "gitHead": "29e4fa18cfa9b5c1afe4ec19a107df673e883fa6"
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
- }