@dxos/util 2.33.8-dev.6bc74570 → 2.33.8

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.
@@ -0,0 +1,41 @@
1
+ import { PublicKeyLike } from '@dxos/protocols';
2
+ /**
3
+ * humanhash: Human-readable representations of digests.
4
+ */
5
+ export declare class HumanHasher {
6
+ private readonly wordlist;
7
+ /**
8
+ * Transforms hex digests to human-readable strings.
9
+ *
10
+ * The format of these strings will look something like:
11
+ * `victor-bacon-zulu-lima`. The output is obtained by compressing the input
12
+ * digest to a fixed number of bytes, then mapping those bytes to one of 256
13
+ * words. A default wordlist is provided, but you can override this if you
14
+ * prefer.
15
+ * As long as you use the same wordlist, the output will be consistent (i.e.
16
+ * the same digest will always render the same representation).
17
+ *
18
+ * @param wordlist A list of exactly 256 words to choose from
19
+ */
20
+ constructor(wordlist?: string[]);
21
+ /**
22
+ * Humanize a given hexadecimal digest.
23
+ *
24
+ * Change the number of words output by specifying `words`. Change the
25
+ * word separator with `separator`.
26
+ *
27
+ * @param hexdigest A string of hexadecimal characters to humanize
28
+ * @param words How many words to output (more = safer)
29
+ * @param separator The string used to seperate the words
30
+ */
31
+ humanize(hexdigest: string, words?: number, separator?: string): string;
32
+ /**
33
+ * Compress a list of byte values to a fixed target length.
34
+ *
35
+ * @param bytes A list of bytes (numbers from 0-254)
36
+ * @param target The number of bytes to return / compress to
37
+ */
38
+ _compress(bytes: number[], target: number): number[];
39
+ }
40
+ export declare const humanize: (value: PublicKeyLike) => string;
41
+ //# sourceMappingURL=human-hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human-hash.d.ts","sourceRoot":"","sources":["../../src/human-hash.ts"],"names":[],"mappings":"AAIA,OAAO,EAAa,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA0C3D;;GAEG;AACH,qBAAa,WAAW;IAcT,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAbtC;;;;;;;;;;;;OAYG;gBAC2B,QAAQ,WAAmB;IAOzD;;;;;;;;;OASG;IACH,QAAQ,CAAE,SAAS,EAAE,MAAM,EAAE,KAAK,SAAI,EAAE,SAAS,SAAM;IAYvD;;;;;OAKG;IACH,SAAS,CAAE,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM;CAqB3C;AAID,eAAO,MAAM,QAAQ,UAAW,aAAa,KAAG,MAQ/C,CAAC"}
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ //
3
+ // Copyright 2021 DXOS.org
4
+ //
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.humanize = exports.HumanHasher = void 0;
7
+ const protocols_1 = require("@dxos/protocols");
8
+ // From https://github.com/SEBv15/humanhash/blob/166c1a6f70d854fe6767cdd76be1237112d4eaf1/index.js
9
+ const DEFAULT_WORDLIST = [
10
+ 'ack', 'alabama', 'alanine', 'alaska', 'alpha', 'angel', 'apart', 'april',
11
+ 'arizona', 'arkansas', 'artist', 'asparagus', 'aspen', 'august', 'autumn',
12
+ 'avocado', 'bacon', 'bakerloo', 'batman', 'beer', 'berlin', 'beryllium',
13
+ 'black', 'blossom', 'blue', 'bluebird', 'bravo', 'bulldog', 'burger',
14
+ 'butter', 'california', 'carbon', 'cardinal', 'carolina', 'carpet', 'cat',
15
+ 'ceiling', 'charlie', 'chicken', 'coffee', 'cola', 'cold', 'colorado',
16
+ 'comet', 'connecticut', 'crazy', 'cup', 'dakota', 'december', 'delaware',
17
+ 'delta', 'diet', 'don', 'double', 'early', 'earth', 'east', 'echo',
18
+ 'edward', 'eight', 'eighteen', 'eleven', 'emma', 'enemy', 'equal',
19
+ 'failed', 'fanta', 'fifteen', 'fillet', 'finch', 'fish', 'five', 'fix',
20
+ 'floor', 'florida', 'football', 'four', 'fourteen', 'foxtrot', 'freddie',
21
+ 'friend', 'fruit', 'gee', 'georgia', 'glucose', 'golf', 'green', 'grey',
22
+ 'hamper', 'happy', 'harry', 'hawaii', 'helium', 'high', 'hot', 'hotel',
23
+ 'hydrogen', 'idaho', 'illinois', 'india', 'indigo', 'ink', 'iowa',
24
+ 'island', 'item', 'jersey', 'jig', 'johnny', 'juliet', 'july', 'jupiter',
25
+ 'kansas', 'kentucky', 'kilo', 'king', 'kitten', 'lactose', 'lake', 'lamp',
26
+ 'lemon', 'leopard', 'lima', 'lion', 'lithium', 'london', 'louisiana',
27
+ 'low', 'magazine', 'magnesium', 'maine', 'mango', 'march', 'mars',
28
+ 'maryland', 'massachusetts', 'may', 'mexico', 'michigan', 'mike',
29
+ 'minnesota', 'mirror', 'mississippi', 'missouri', 'mobile', 'mockingbird',
30
+ 'monkey', 'montana', 'moon', 'mountain', 'muppet', 'music', 'nebraska',
31
+ 'neptune', 'network', 'nevada', 'nine', 'nineteen', 'nitrogen', 'north',
32
+ 'november', 'nuts', 'october', 'ohio', 'oklahoma', 'one', 'orange',
33
+ 'oranges', 'oregon', 'oscar', 'oven', 'oxygen', 'papa', 'paris', 'pasta',
34
+ 'pennsylvania', 'pip', 'pizza', 'pluto', 'potato', 'princess', 'purple',
35
+ 'quebec', 'queen', 'quiet', 'red', 'river', 'robert', 'robin', 'romeo',
36
+ 'rugby', 'sad', 'salami', 'saturn', 'september', 'seven', 'seventeen',
37
+ 'shade', 'sierra', 'single', 'sink', 'six', 'sixteen', 'skylark', 'snake',
38
+ 'social', 'sodium', 'solar', 'south', 'spaghetti', 'speaker', 'spring',
39
+ 'stairway', 'steak', 'stream', 'summer', 'sweet', 'table', 'tango', 'ten',
40
+ 'tennessee', 'tennis', 'texas', 'thirteen', 'three', 'timing', 'triple',
41
+ 'twelve', 'twenty', 'two', 'uncle', 'undress', 'uniform', 'uranus', 'utah',
42
+ 'vegan', 'venus', 'vermont', 'victor', 'video', 'violet', 'virginia',
43
+ 'washington', 'west', 'whiskey', 'white', 'william', 'winner', 'winter',
44
+ 'wisconsin', 'wolfram', 'wyoming', 'xray', 'yankee', 'yellow', 'zebra', 'zulu'
45
+ ];
46
+ /**
47
+ * humanhash: Human-readable representations of digests.
48
+ */
49
+ class HumanHasher {
50
+ /**
51
+ * Transforms hex digests to human-readable strings.
52
+ *
53
+ * The format of these strings will look something like:
54
+ * `victor-bacon-zulu-lima`. The output is obtained by compressing the input
55
+ * digest to a fixed number of bytes, then mapping those bytes to one of 256
56
+ * words. A default wordlist is provided, but you can override this if you
57
+ * prefer.
58
+ * As long as you use the same wordlist, the output will be consistent (i.e.
59
+ * the same digest will always render the same representation).
60
+ *
61
+ * @param wordlist A list of exactly 256 words to choose from
62
+ */
63
+ constructor(wordlist = DEFAULT_WORDLIST) {
64
+ this.wordlist = wordlist;
65
+ if (wordlist.length !== 256) {
66
+ throw new Error('Wordlist must have exactly 256 items');
67
+ }
68
+ this.wordlist = wordlist;
69
+ }
70
+ /**
71
+ * Humanize a given hexadecimal digest.
72
+ *
73
+ * Change the number of words output by specifying `words`. Change the
74
+ * word separator with `separator`.
75
+ *
76
+ * @param hexdigest A string of hexadecimal characters to humanize
77
+ * @param words How many words to output (more = safer)
78
+ * @param separator The string used to seperate the words
79
+ */
80
+ humanize(hexdigest, words = 4, separator = '-') {
81
+ const pairs = hexdigest.match(/(..?)/g);
82
+ if (!pairs) {
83
+ throw new Error('');
84
+ }
85
+ const bytes = pairs.map((x) => parseInt(x, 16));
86
+ const compressed = this._compress(bytes, words);
87
+ return compressed.map((x) => this.wordlist[x]).join(separator);
88
+ }
89
+ /**
90
+ * Compress a list of byte values to a fixed target length.
91
+ *
92
+ * @param bytes A list of bytes (numbers from 0-254)
93
+ * @param target The number of bytes to return / compress to
94
+ */
95
+ _compress(bytes, target) {
96
+ const length = bytes.length;
97
+ if (target > length) {
98
+ throw new Error('Fewer input bytes than requested output');
99
+ }
100
+ // Calculate the segment size (divide and round down)
101
+ const segSize = length / target >> 0;
102
+ // Split 'bytes' array into 'target' number of segments.
103
+ const segments = [];
104
+ for (let i = 0; i < segSize * target; i += segSize) {
105
+ segments.push(bytes.slice(i, i + segSize));
106
+ }
107
+ // Catch any left-over bytes in the last segment.
108
+ segments[segments.length - 1] = segments[segments.length - 1].concat(bytes.slice(target * segSize));
109
+ const checksums = segments.map((x) => x.reduce((acc, curr) => acc ^ curr));
110
+ return checksums;
111
+ }
112
+ }
113
+ exports.HumanHasher = HumanHasher;
114
+ const hasher = new HumanHasher();
115
+ const humanize = (value) => {
116
+ if (value instanceof Buffer || value instanceof Uint8Array) {
117
+ value = protocols_1.PublicKey.stringify(value);
118
+ }
119
+ else if (value instanceof protocols_1.PublicKey) {
120
+ value = value.toHex();
121
+ }
122
+ return hasher.humanize(value);
123
+ };
124
+ exports.humanize = humanize;
125
+ //# sourceMappingURL=human-hash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human-hash.js","sourceRoot":"","sources":["../../src/human-hash.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=human-hash.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human-hash.test.d.ts","sourceRoot":"","sources":["../../src/human-hash.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ //
3
+ // Copyright 2020 DXOS.org
4
+ //
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ // DXOS testing browser.
7
+ const crypto_1 = require("@dxos/crypto");
8
+ const protocols_1 = require("@dxos/protocols");
9
+ const human_hash_1 = require("./human-hash");
10
+ test('Hashing', () => {
11
+ const { publicKey, secretKey } = (0, crypto_1.createKeyPair)();
12
+ expect((0, human_hash_1.humanize)(publicKey)).not.toEqual((0, human_hash_1.humanize)(secretKey));
13
+ expect((0, human_hash_1.humanize)(publicKey)).toEqual((0, human_hash_1.humanize)(protocols_1.PublicKey.from(publicKey)));
14
+ expect((0, human_hash_1.humanize)((0, crypto_1.createId)())).toBeDefined();
15
+ });
16
+ //# sourceMappingURL=human-hash.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human-hash.test.js","sourceRoot":"","sources":["../../src/human-hash.test.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,wBAAwB;AAExB,yCAAuD;AACvD,+CAA4C;AAE5C,6CAAwC;AAExC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE;IACnB,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAA,sBAAa,GAAE,CAAC;IAEjD,MAAM,CAAC,IAAA,qBAAQ,EAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAA,qBAAQ,EAAC,SAAS,CAAC,CAAC,CAAC;IAC7D,MAAM,CAAC,IAAA,qBAAQ,EAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,IAAA,qBAAQ,EAAC,qBAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACzE,MAAM,CAAC,IAAA,qBAAQ,EAAC,IAAA,iBAAQ,GAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AAC7C,CAAC,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './complex';
2
+ export * from './human-hash';
2
3
  export * from './json';
3
4
  export * from './map';
4
5
  export * from './range';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC"}
package/dist/src/index.js CHANGED
@@ -18,6 +18,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
20
  __exportStar(require("./complex"), exports);
21
+ __exportStar(require("./human-hash"), exports);
21
22
  __exportStar(require("./json"), exports);
22
23
  __exportStar(require("./map"), exports);
23
24
  __exportStar(require("./range"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,4CAA0B;AAC1B,yCAAuB;AACvB,wCAAsB;AACtB,0CAAwB;AACxB,0CAAwB;AACxB,8CAA4B;AAC5B,iDAA+B;AAC/B,+CAA6B;AAC7B,+CAA6B;AAC7B,yDAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,4CAA0B;AAC1B,+CAA6B;AAC7B,yCAAuB;AACvB,wCAAsB;AACtB,0CAAwB;AACxB,0CAAwB;AACxB,8CAA4B;AAC5B,iDAA+B;AAC/B,+CAA6B;AAC7B,+CAA6B;AAC7B,yDAAuC"}
@@ -1 +1 @@
1
- {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/json.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,wBAAgB,YAAY,CAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAqBrE"}
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/json.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,wBAAgB,YAAY,CAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAqBrE"}
package/dist/src/json.js CHANGED
@@ -5,8 +5,8 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.jsonReplacer = void 0;
7
7
  const util_1 = require("util");
8
- const crypto_1 = require("@dxos/crypto");
9
8
  const protocols_1 = require("@dxos/protocols");
9
+ const human_hash_1 = require("./human-hash");
10
10
  /**
11
11
  * JSON.stringify replacer.
12
12
  */
@@ -18,7 +18,7 @@ function jsonReplacer(key, value) {
18
18
  if (value !== null && typeof value === 'object' && value.type === 'Buffer' && Array.isArray(value.data)) {
19
19
  if (value.data.length === 32) {
20
20
  const key = Buffer.from(value.data);
21
- return `[${(0, crypto_1.humanize)(key)}]:[${protocols_1.PublicKey.stringify(key)}]`;
21
+ return `[${(0, human_hash_1.humanize)(key)}]:[${protocols_1.PublicKey.stringify(key)}]`;
22
22
  }
23
23
  else {
24
24
  return Buffer.from(value.data).toString('hex');
@@ -1 +1 @@
1
- {"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/json.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,+BAA+B;AAE/B,yCAAwC;AACxC,+CAA4C;AAE5C;;GAEG;AACH,SAAgB,YAAY,CAAa,GAAW,EAAE,KAAU;IAC9D,uEAAuE;IACvE,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,cAAO,CAAC,MAAM,CAAC,KAAK,UAAU,EAAE;QAC9F,OAAO,KAAK,CAAC,cAAO,CAAC,MAAM,CAAC,EAAE,CAAC;KAChC;IAED,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;QACvG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,EAAE,EAAE;YAC5B,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpC,OAAO,IAAI,IAAA,iBAAQ,EAAC,GAAG,CAAC,MAAM,qBAAS,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC;SAC3D;aAAM;YACL,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SAChD;KACF;IAED,wBAAwB;IACxB,mCAAmC;IACnC,8BAA8B;IAC9B,gBAAgB;IAChB,OAAO,KAAK,CAAC;IACb,SAAS;AACX,CAAC;AArBD,oCAqBC"}
1
+ {"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/json.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,+BAA+B;AAE/B,+CAA4C;AAE5C,6CAAwC;AAExC;;GAEG;AACH,SAAgB,YAAY,CAAa,GAAW,EAAE,KAAU;IAC9D,uEAAuE;IACvE,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,cAAO,CAAC,MAAM,CAAC,KAAK,UAAU,EAAE;QAC9F,OAAO,KAAK,CAAC,cAAO,CAAC,MAAM,CAAC,EAAE,CAAC;KAChC;IAED,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;QACvG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,EAAE,EAAE;YAC5B,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpC,OAAO,IAAI,IAAA,qBAAQ,EAAC,GAAG,CAAC,MAAM,qBAAS,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC;SAC3D;aAAM;YACL,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SAChD;KACF;IAED,wBAAwB;IACxB,mCAAmC;IACnC,8BAA8B;IAC9B,gBAAgB;IAChB,OAAO,KAAK,CAAC;IACb,SAAS;AACX,CAAC;AArBD,oCAqBC"}
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es5.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2016.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.esnext.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../protocols/dist/src/proto/gen/google/protobuf.d.ts","../../protocols/dist/src/proto/gen/dxos/credentials.d.ts","../../protocols/dist/src/proto/gen/dxos/halo/keys.d.ts","../../protocols/dist/src/proto/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert/strict.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/async_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/buffer.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/child_process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/cluster.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/console.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/constants.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/crypto.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dgram.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/diagnostics_channel.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/domain.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http2.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/https.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/inspector.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/module.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/net.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/os.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/path.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/perf_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/punycode.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/querystring.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/readline.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/repl.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/consumers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/web.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/string_decoder.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tls.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/trace_events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tty.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/url.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/util.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/v8.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/vm.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/wasi.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/worker_threads.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/zlib.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.global.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/index.d.ts","../../protocols/dist/src/public-key.d.ts","../../protocols/dist/src/index.d.ts","../../debug/dist/src/assert.d.ts","../../debug/dist/src/console.d.ts","../../debug/dist/src/error-handler.d.ts","../../debug/dist/src/error-stream.d.ts","../../debug/dist/src/errors/dxos-error.d.ts","../../debug/dist/src/errors/errors.d.ts","../../debug/dist/src/errors/index.d.ts","../../debug/dist/src/fail.d.ts","../../debug/dist/src/log-method.d.ts","../../debug/dist/src/logging.d.ts","../../debug/dist/src/raise.d.ts","../../debug/dist/src/stack-trace.d.ts","../../debug/dist/src/strings.d.ts","../../debug/dist/src/throw.d.ts","../../debug/dist/src/throw-unhandled-rejection.d.ts","../../debug/dist/src/timeout-warning.d.ts","../../debug/dist/src/index.d.ts","../src/complex.ts","../src/complex.test.ts","../../crypto/dist/src/encrypt.d.ts","../../crypto/dist/src/hash.d.ts","../../crypto/dist/src/human-hash.d.ts","../../crypto/dist/src/keys.d.ts","../../crypto/dist/src/validator.d.ts","../../crypto/dist/src/index.d.ts","../src/json.ts","../src/map.ts","../src/range.ts","../src/types.ts","../src/randomInt.ts","../src/subscription.ts","../src/uint8array.ts","../src/typeguards.ts","../src/isNotNullOrUndefined.ts","../src/index.ts","../src/map.test.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/diffLines.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/printDiffs.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+jest@26.0.24/node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","3eb679a56cab01203a1ba7edeade937f6a2a4c718513b2cd930b579807fa9359","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"ff667ee99e5a28c3dc5063a3cfd4d3436699e3fb035d4451037da7f567da542a","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"6ea9ab679ea030cf46c16a711a316078e9e02619ebaf07a7fcd16964aba88f2d","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"011267fade3e4c99b36a9d3d14734461309de6a989f5b27ac7ac98123083e31f","3134f52cda99065c8630aa4552c7509923f76af422bb5643b3bf49bfbbd0894c","7dab91e9b6f9cb074893138261f91345371bbf053099253bc47ccdc722388da3","58ada477113e6a47d967c034a83392adfcaad478688e6916a471919d8798ff53","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"aeeee3998c5a730f8689f04038d41cf4245c9edbf6ef29a698e45b36e399b8ed","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","e3b886bacdd1fbf1f72e654596c80a55c7bc1d10bdf464aaf52f45ecd243862f","c665d5c50c2573aefd98f0ffb12c5583e333ed94294ce6f144a4163a8c84f09b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"8a215750db3e2073511e07c9e293c8c40d6109e5c7368845e060bcc12adbae6f","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","945a841f9a591197154c85386bc5a1467d42d325104bb36db51bc566bbb240be","10c39ce1df102994b47d4bc0c71aa9a6aea76f4651a5ec51914431f50bc883a1",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","3fa48484c65913004d5abb5c0f917b61ea4684f32d05bb28c1ecfa5f05a9ed12","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"dd9ea469d1bfaf589c6a196275d35cb1aa14014707c2c46d920c7b921e8f5bca","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1503a452a67127e5c2da794d1c7c44344d5038373aae16c9b03ac964db159edd","6849f52499689b5b0fe0e6eaeb76f77540ee9432efcda536eb7792a776e72469","e8ba6acb214115658895eddc9eb583d7e3ce74619b50a26bafeeb0496e08cdfd","03ba2aa9d42a459ebdb546b6b9b7269691a420c3939ed41b7cf210c2f3af860a","49dada859a1e7a2ccfc38c4ee75ef4915983f033a751d0433c80b3932e4f75bc","408961bf1c33d835d9aa7f67892daf49830db17b892eab53a60b70a340e9a37a","217767768c03d9107fab244f0a1d41ee2fc9beea572b9b10d3bbfcda258fa471","4f1f99c145ff1ff5408e1cf043a4b47491e94fc1995d4db7915a5c5a46345d5f","a017d71a02e034534781e25b46b463a247f257f35927fdd22eb540648a218624","307608ba5cb4170e819ebda0ce4f2d18f102abead268a4bbcb42af67f876693a","a52dffe094fa29673bc950ed469299c1852d8cfcfa4d6cfb8a5b7d6e0ca55c3c","391b4ea9ef9bb44bb409b71f3f412cdced854a0851e903131a08b8aba4538109","72121353eb8b54ac8ecc7ec7fb647491a1b66cdd6aeff724f193221266bd068f","9e5f9b01148b742d5e7498fea6e98a177f5e4e3d796fc2a371fdded6e560fce8","84eb87ebd9a5f2e44a9059de4aa82f95ce772e7088c37c006ccc77ef41aa761f","7954a47ca41b3f1f3f6b902ea29d78d239b43f414cff58a857e75260c92fde14","58a2ca0c379c5761fd1cd6e1645cdab0325f5cf0a04cd43d5f551bb727750dcf","aeb42f4a6bd760d4bbaa7029d6470168f2ff738cf9be46b3d2500c417b9cbf59","cdb25af900a1ac76f32cb09ca4bf1f482f32df42e1ab6caaef872493d05be049","a9e293e60119009fe3098c83242507708f3b1fea7b1572b4c5560293877d3d9e",{"version":"7f7db9232355beb52d799ac71459ec6884864e60468a7f74102aebd97000e381","signature":"928947224959c3b37c11e6268624df74232d8ed85f98992a6ccc8f7a0ef50018"},{"version":"d66abedcb2dd1cc29f5b4cd5db8d642d684a76fc3e3ef1c1790745053e7ebf2a","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"0e6c82eab84a7ea274f61068f4db4ab85ce1eb64e4b630d427f47061423d6e56","aae72031068e978fc1b48ffba8a7884c5aa7ee19e0550060d6cf70a04b55afdd","fccc3ab2eb7278d4597fd8b2ae645ace954f1cb9d523acef67d876ed2b66e728","9615961aa673b2278112c29354930e61a404c956ba67564c10665d79002eef30","830b201ad1bf6541b32ecb644a7f22102f2de52c3ce298be461d19fcdc69cc86","9c7639831cb6c173b899387480d0e35438dcd7424a9cdfc211ec1f888347011d",{"version":"01856809c432ef4d1f8bc22241e9bdcb6fbee2d06cc13c11d6518a4baffd023a","signature":"f59184ab4d19f15badfe977ae1a29c6dcbd85d87a27c23eec6a0f9c103cb4abe"},{"version":"5d8dc178d835d61d8b67c3e9339423e5cc66bd33bbf216ff42231b20b36076f4","signature":"327fe0395a10f6c4c1d2d06805ca323b448c8d19f4ae762afb00047c08283164"},{"version":"9b230c64a2ca3ccd0ecf32b8f7064a5d799d653fe76ad0180043f52bc008681d","signature":"7906ac4ca3f7860207870620c388c5b2bae84455b7ae5a7f44f98a95116eb83b"},{"version":"ac3d6d5baa46370534c6aa13d6386f7bea0c7ad8c622035a77e99e2d40736fbf","signature":"ebc23fd80647c3f7353db4ee78ccdfe1eb8d77469135aace4664bbd311f0f7f8"},{"version":"906bd57d250d8664cabaece325197d02963ca0abde5f6e4d0a785aa3e55698f6","signature":"6bd2cd44d4eca8268659e47233f06b859257aa50b2c0da5c5f08ace7a6f1418d"},{"version":"f8e7b46c1c74c42a7eb1e71bf68a62ae603288985f21f69381dcee0a351aac18","signature":"f3081e3c746f97bc9be9c587543b1c7edeba352074914834e30ea68c09a521e9"},{"version":"3e9d90efc3b4d6b3bb3abffea5d8901a94126bef70ba138b4dcb5f0f9e6a09ac","signature":"c61c9d7c0c720c1377dca447ff8b90025346a3c9be56b3e02ffdbdf1eec989c6"},{"version":"9a2af5e89959ccdba1a63e749619cb29341969f9826c55538681fccee62d4b25","signature":"4ed29b0d5e2c6c60473d69438c9fc43fe4d3a678d2964255067ee03792389b97"},{"version":"9839e4781fe3173c84c8fd9e6a0dd2d73c07c814ed993af1db7503c4d5d65097","signature":"f20758d157f6e8fef38d65f6f698239d5ac686f43057b05ed80208571655f713"},{"version":"0d64dd723766c6a9155fc4358a563a485afd7176970168f965e9c2dffa449900","signature":"8e450bb982ee4ffb0c58859f17e370c56fe96740cd6469bf98adebc09d6dd681"},{"version":"c9f7a3aa9a97869d72abfdcff1fab9e4dd8eb06c6437959f1ca7c70d079899bc","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9","62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"516a426e3960379f310107635b8f3a7e8c307c6c665080b128039d9299ec4087","affectsGlobalScope":true}],"options":{"composite":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":2,"module":1,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":5},"fileIdsList":[[100,150,152],[57,100],[60,100],[61,66,100],[62,72,73,80,89,99,100],[62,63,72,80,100],[64,100],[65,66,73,81,100],[66,89,96,100],[67,69,72,80,100],[68,100],[69,70,100],[71,72,100],[72,100],[72,73,74,89,99,100],[72,73,74,89,100],[100],[75,80,89,99,100],[72,73,75,76,80,89,96,99,100],[75,77,89,96,99,100],[57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106],[72,78,100],[79,99,100],[69,72,80,89,100],[81,100],[82,100],[60,83,100],[84,98,100,104],[85,100],[86,100],[72,87,100],[87,88,100,102],[72,89,90,91,100],[89,91,100],[89,90,100],[92,100],[93,100],[72,94,95,100],[94,95,100],[66,80,96,100],[97,100],[80,98,100],[61,75,86,99,100],[66,100],[89,100,101],[100,102],[100,103],[61,66,72,74,83,89,99,100,102,104],[89,100,105],[100,146,147],[100,146,147,148,149],[100,151],[100,129,130,131,132,133],[100,107,109,131],[100,107],[100,114],[100,114,115],[100,110,111,112,113,116,117,118,119,120,121,122,123,124,125],[100,109],[56,100,108],[53,55,100],[54,100],[55,100],[100,109,127],[100,126],[100,127,135,136,137,138,139,140,141,142,143],[100,109,134],[100,136],[127,135,136,137,138,139,140,141,142,143]],"referencedMap":[[153,1],[57,2],[58,2],[60,3],[61,4],[62,5],[63,6],[64,7],[65,8],[66,9],[67,10],[68,11],[69,12],[70,12],[71,13],[72,14],[73,15],[74,16],[59,17],[106,17],[75,18],[76,19],[77,20],[107,21],[78,22],[79,23],[80,24],[81,25],[82,26],[83,27],[84,28],[85,29],[86,30],[87,31],[88,32],[89,33],[91,34],[90,35],[92,36],[93,37],[94,38],[95,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[146,17],[148,50],[150,51],[149,50],[147,17],[152,52],[151,17],[12,17],[11,17],[2,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[19,17],[20,17],[3,17],[4,17],[24,17],[21,17],[22,17],[23,17],[25,17],[26,17],[27,17],[5,17],[28,17],[29,17],[30,17],[31,17],[6,17],[32,17],[33,17],[34,17],[35,17],[7,17],[36,17],[41,17],[42,17],[37,17],[38,17],[39,17],[40,17],[8,17],[46,17],[43,17],[44,17],[45,17],[47,17],[9,17],[48,17],[49,17],[50,17],[51,17],[1,17],[10,17],[52,17],[129,17],[130,17],[131,17],[134,53],[132,54],[133,55],[110,17],[111,17],[112,14],[113,17],[114,17],[115,56],[116,57],[117,17],[126,58],[118,17],[119,17],[120,17],[121,17],[122,59],[124,17],[123,17],[125,17],[109,60],[54,61],[55,62],[53,17],[56,63],[108,55],[128,64],[127,65],[144,66],[143,17],[135,67],[145,68],[136,2],[139,17],[137,17],[140,17],[142,17],[138,17],[141,17]],"exportedModulesMap":[[153,1],[57,2],[58,2],[60,3],[61,4],[62,5],[63,6],[64,7],[65,8],[66,9],[67,10],[68,11],[69,12],[70,12],[71,13],[72,14],[73,15],[74,16],[59,17],[106,17],[75,18],[76,19],[77,20],[107,21],[78,22],[79,23],[80,24],[81,25],[82,26],[83,27],[84,28],[85,29],[86,30],[87,31],[88,32],[89,33],[91,34],[90,35],[92,36],[93,37],[94,38],[95,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[146,17],[148,50],[150,51],[149,50],[147,17],[152,52],[151,17],[12,17],[11,17],[2,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[19,17],[20,17],[3,17],[4,17],[24,17],[21,17],[22,17],[23,17],[25,17],[26,17],[27,17],[5,17],[28,17],[29,17],[30,17],[31,17],[6,17],[32,17],[33,17],[34,17],[35,17],[7,17],[36,17],[41,17],[42,17],[37,17],[38,17],[39,17],[40,17],[8,17],[46,17],[43,17],[44,17],[45,17],[47,17],[9,17],[48,17],[49,17],[50,17],[51,17],[1,17],[10,17],[52,17],[129,17],[130,17],[131,17],[134,53],[132,54],[133,55],[110,17],[111,17],[112,14],[113,17],[114,17],[115,56],[116,57],[117,17],[126,58],[118,17],[119,17],[120,17],[121,17],[122,59],[124,17],[123,17],[125,17],[109,60],[54,61],[55,62],[53,17],[56,63],[108,55],[144,69]],"semanticDiagnosticsPerFile":[153,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,59,106,75,76,77,107,78,79,80,81,82,83,84,85,86,87,88,89,91,90,92,93,94,95,96,97,98,99,100,101,102,103,104,105,146,148,150,149,147,152,151,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,36,41,42,37,38,39,40,8,46,43,44,45,47,9,48,49,50,51,1,10,52,129,130,131,134,132,133,110,111,112,113,114,115,116,117,126,118,119,120,121,122,124,123,125,109,54,55,53,56,108,128,127,144,143,135,145,136,139,137,140,142,138,141]},"version":"4.7.4"}
1
+ {"program":{"fileNames":["../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es5.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2016.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.esnext.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../protocols/dist/src/proto/gen/google/protobuf.d.ts","../../protocols/dist/src/proto/gen/dxos/credentials.d.ts","../../protocols/dist/src/proto/gen/dxos/halo/keys.d.ts","../../protocols/dist/src/proto/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert/strict.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/async_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/buffer.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/child_process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/cluster.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/console.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/constants.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/crypto.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dgram.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/diagnostics_channel.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/domain.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http2.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/https.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/inspector.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/module.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/net.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/os.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/path.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/perf_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/punycode.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/querystring.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/readline.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/repl.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/consumers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/web.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/string_decoder.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tls.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/trace_events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tty.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/url.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/util.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/v8.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/vm.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/wasi.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/worker_threads.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/zlib.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.global.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/index.d.ts","../../protocols/dist/src/public-key.d.ts","../../protocols/dist/src/timeframe.d.ts","../../protocols/dist/src/index.d.ts","../../debug/dist/src/assert.d.ts","../../debug/dist/src/console.d.ts","../../debug/dist/src/error-handler.d.ts","../../debug/dist/src/error-stream.d.ts","../../debug/dist/src/errors/dxos-error.d.ts","../../debug/dist/src/errors/errors.d.ts","../../debug/dist/src/errors/index.d.ts","../../debug/dist/src/fail.d.ts","../../debug/dist/src/log-method.d.ts","../../debug/dist/src/logging.d.ts","../../debug/dist/src/raise.d.ts","../../debug/dist/src/stack-trace.d.ts","../../debug/dist/src/strings.d.ts","../../debug/dist/src/throw.d.ts","../../debug/dist/src/throw-unhandled-rejection.d.ts","../../debug/dist/src/timeout-warning.d.ts","../../debug/dist/src/index.d.ts","../src/complex.ts","../src/complex.test.ts","../../crypto/dist/src/encrypt.d.ts","../../crypto/dist/src/hash.d.ts","../../crypto/dist/src/keys.d.ts","../../crypto/dist/src/validator.d.ts","../../crypto/dist/src/index.d.ts","../src/human-hash.ts","../src/human-hash.test.ts","../src/json.ts","../src/map.ts","../src/range.ts","../src/types.ts","../src/randomInt.ts","../src/subscription.ts","../src/uint8array.ts","../src/typeguards.ts","../src/isNotNullOrUndefined.ts","../src/index.ts","../src/map.test.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/diffLines.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/printDiffs.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+jest@26.0.24/node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","3eb679a56cab01203a1ba7edeade937f6a2a4c718513b2cd930b579807fa9359","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"ff667ee99e5a28c3dc5063a3cfd4d3436699e3fb035d4451037da7f567da542a","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"6ea9ab679ea030cf46c16a711a316078e9e02619ebaf07a7fcd16964aba88f2d","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"011267fade3e4c99b36a9d3d14734461309de6a989f5b27ac7ac98123083e31f","3134f52cda99065c8630aa4552c7509923f76af422bb5643b3bf49bfbbd0894c","7dab91e9b6f9cb074893138261f91345371bbf053099253bc47ccdc722388da3","58ada477113e6a47d967c034a83392adfcaad478688e6916a471919d8798ff53","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"aeeee3998c5a730f8689f04038d41cf4245c9edbf6ef29a698e45b36e399b8ed","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","e3b886bacdd1fbf1f72e654596c80a55c7bc1d10bdf464aaf52f45ecd243862f","c665d5c50c2573aefd98f0ffb12c5583e333ed94294ce6f144a4163a8c84f09b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"8a215750db3e2073511e07c9e293c8c40d6109e5c7368845e060bcc12adbae6f","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","945a841f9a591197154c85386bc5a1467d42d325104bb36db51bc566bbb240be","10c39ce1df102994b47d4bc0c71aa9a6aea76f4651a5ec51914431f50bc883a1",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","3fa48484c65913004d5abb5c0f917b61ea4684f32d05bb28c1ecfa5f05a9ed12","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"dd9ea469d1bfaf589c6a196275d35cb1aa14014707c2c46d920c7b921e8f5bca","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1503a452a67127e5c2da794d1c7c44344d5038373aae16c9b03ac964db159edd","6849f52499689b5b0fe0e6eaeb76f77540ee9432efcda536eb7792a776e72469","0e7a7b48229b572889a27af348f7cdb2c158c7681abd6e0c6519abd6cebd9e32","b028c23042d55cb3e800d95f01fcd5f0bf4c60f55436d8893fa7c9cc51d4f1bc","03ba2aa9d42a459ebdb546b6b9b7269691a420c3939ed41b7cf210c2f3af860a","49dada859a1e7a2ccfc38c4ee75ef4915983f033a751d0433c80b3932e4f75bc","408961bf1c33d835d9aa7f67892daf49830db17b892eab53a60b70a340e9a37a","217767768c03d9107fab244f0a1d41ee2fc9beea572b9b10d3bbfcda258fa471","4f1f99c145ff1ff5408e1cf043a4b47491e94fc1995d4db7915a5c5a46345d5f","a017d71a02e034534781e25b46b463a247f257f35927fdd22eb540648a218624","307608ba5cb4170e819ebda0ce4f2d18f102abead268a4bbcb42af67f876693a","a52dffe094fa29673bc950ed469299c1852d8cfcfa4d6cfb8a5b7d6e0ca55c3c","391b4ea9ef9bb44bb409b71f3f412cdced854a0851e903131a08b8aba4538109","72121353eb8b54ac8ecc7ec7fb647491a1b66cdd6aeff724f193221266bd068f","9e5f9b01148b742d5e7498fea6e98a177f5e4e3d796fc2a371fdded6e560fce8","84eb87ebd9a5f2e44a9059de4aa82f95ce772e7088c37c006ccc77ef41aa761f","7954a47ca41b3f1f3f6b902ea29d78d239b43f414cff58a857e75260c92fde14","58a2ca0c379c5761fd1cd6e1645cdab0325f5cf0a04cd43d5f551bb727750dcf","aeb42f4a6bd760d4bbaa7029d6470168f2ff738cf9be46b3d2500c417b9cbf59","cdb25af900a1ac76f32cb09ca4bf1f482f32df42e1ab6caaef872493d05be049","a9e293e60119009fe3098c83242507708f3b1fea7b1572b4c5560293877d3d9e",{"version":"7f7db9232355beb52d799ac71459ec6884864e60468a7f74102aebd97000e381","signature":"928947224959c3b37c11e6268624df74232d8ed85f98992a6ccc8f7a0ef50018"},{"version":"d66abedcb2dd1cc29f5b4cd5db8d642d684a76fc3e3ef1c1790745053e7ebf2a","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"0e6c82eab84a7ea274f61068f4db4ab85ce1eb64e4b630d427f47061423d6e56","aae72031068e978fc1b48ffba8a7884c5aa7ee19e0550060d6cf70a04b55afdd","db69aac3d80e17984bd82c349e1e8a24fa787c76027b7b9999bfaef7bb232410","830b201ad1bf6541b32ecb644a7f22102f2de52c3ce298be461d19fcdc69cc86","e3d0023ea179500996021375faad1793a11b18c0fcf0a8da136815f22b707d9b",{"version":"455ddbe7be303ea151b11215b43fb2b483953cfd8421ee1d4faa15e11b65575c","signature":"eb4a42ce89bafbc5bed1e69fb41b1ae345dd3d63ddcc4e10044a2c743368f154"},{"version":"d55bd12cc37d098cb0b4120a77b2c1c8dd173c91a9402814b36078a1c450ebb4","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"460c98d7560a6e812d331ebffd82f9d057137e70e5757b50c1e021a7f6c06c2c","signature":"f59184ab4d19f15badfe977ae1a29c6dcbd85d87a27c23eec6a0f9c103cb4abe"},{"version":"5d8dc178d835d61d8b67c3e9339423e5cc66bd33bbf216ff42231b20b36076f4","signature":"327fe0395a10f6c4c1d2d06805ca323b448c8d19f4ae762afb00047c08283164"},{"version":"9b230c64a2ca3ccd0ecf32b8f7064a5d799d653fe76ad0180043f52bc008681d","signature":"7906ac4ca3f7860207870620c388c5b2bae84455b7ae5a7f44f98a95116eb83b"},{"version":"ac3d6d5baa46370534c6aa13d6386f7bea0c7ad8c622035a77e99e2d40736fbf","signature":"ebc23fd80647c3f7353db4ee78ccdfe1eb8d77469135aace4664bbd311f0f7f8"},{"version":"906bd57d250d8664cabaece325197d02963ca0abde5f6e4d0a785aa3e55698f6","signature":"6bd2cd44d4eca8268659e47233f06b859257aa50b2c0da5c5f08ace7a6f1418d"},{"version":"f8e7b46c1c74c42a7eb1e71bf68a62ae603288985f21f69381dcee0a351aac18","signature":"f3081e3c746f97bc9be9c587543b1c7edeba352074914834e30ea68c09a521e9"},{"version":"3e9d90efc3b4d6b3bb3abffea5d8901a94126bef70ba138b4dcb5f0f9e6a09ac","signature":"c61c9d7c0c720c1377dca447ff8b90025346a3c9be56b3e02ffdbdf1eec989c6"},{"version":"9a2af5e89959ccdba1a63e749619cb29341969f9826c55538681fccee62d4b25","signature":"4ed29b0d5e2c6c60473d69438c9fc43fe4d3a678d2964255067ee03792389b97"},{"version":"9839e4781fe3173c84c8fd9e6a0dd2d73c07c814ed993af1db7503c4d5d65097","signature":"f20758d157f6e8fef38d65f6f698239d5ac686f43057b05ed80208571655f713"},{"version":"80530f2e2a77477b123d9343a8a63dbb625a934a96aa25c0a0e6ca62385dfa0b","signature":"13358a774faee03c210f92e1265261b33fd71cf55d22f2da4485531e6d969e40"},{"version":"c9f7a3aa9a97869d72abfdcff1fab9e4dd8eb06c6437959f1ca7c70d079899bc","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9","62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"516a426e3960379f310107635b8f3a7e8c307c6c665080b128039d9299ec4087","affectsGlobalScope":true}],"options":{"composite":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":2,"module":1,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":5},"fileIdsList":[[100,152,154],[57,100],[60,100],[61,66,100],[62,72,73,80,89,99,100],[62,63,72,80,100],[64,100],[65,66,73,81,100],[66,89,96,100],[67,69,72,80,100],[68,100],[69,70,100],[71,72,100],[72,100],[72,73,74,89,99,100],[72,73,74,89,100],[100],[75,80,89,99,100],[72,73,75,76,80,89,96,99,100],[75,77,89,96,99,100],[57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106],[72,78,100],[79,99,100],[69,72,80,89,100],[81,100],[82,100],[60,83,100],[84,98,100,104],[85,100],[86,100],[72,87,100],[87,88,100,102],[72,89,90,91,100],[89,91,100],[89,90,100],[92,100],[93,100],[72,94,95,100],[94,95,100],[66,80,96,100],[97,100],[80,98,100],[61,75,86,99,100],[66,100],[89,100,101],[100,102],[100,103],[61,66,72,74,83,89,99,100,102,104],[89,100,105],[100,148,149],[100,148,149,150,151],[100,153],[100,130,131,132,133],[100,107,110],[100,107],[100,115],[100,115,116],[100,111,112,113,114,117,118,119,120,121,122,123,124,125,126],[100,110],[56,100,108,109],[53,55,100],[54,100],[55,100],[100,107,108],[100,110,128],[100,127],[100,110,134,135],[100,128,135,137,138,139,140,141,142,143,144,145],[100,110,135],[100,138],[110],[128,135,137,138,139,140,141,142,143,144,145]],"referencedMap":[[155,1],[57,2],[58,2],[60,3],[61,4],[62,5],[63,6],[64,7],[65,8],[66,9],[67,10],[68,11],[69,12],[70,12],[71,13],[72,14],[73,15],[74,16],[59,17],[106,17],[75,18],[76,19],[77,20],[107,21],[78,22],[79,23],[80,24],[81,25],[82,26],[83,27],[84,28],[85,29],[86,30],[87,31],[88,32],[89,33],[91,34],[90,35],[92,36],[93,37],[94,38],[95,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[148,17],[150,50],[152,51],[151,50],[149,17],[154,52],[153,17],[12,17],[11,17],[2,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[19,17],[20,17],[3,17],[4,17],[24,17],[21,17],[22,17],[23,17],[25,17],[26,17],[27,17],[5,17],[28,17],[29,17],[30,17],[31,17],[6,17],[32,17],[33,17],[34,17],[35,17],[7,17],[36,17],[41,17],[42,17],[37,17],[38,17],[39,17],[40,17],[8,17],[46,17],[43,17],[44,17],[45,17],[47,17],[9,17],[48,17],[49,17],[50,17],[51,17],[1,17],[10,17],[52,17],[130,17],[131,17],[134,53],[132,54],[133,55],[111,17],[112,17],[113,14],[114,17],[115,17],[116,56],[117,57],[118,17],[127,58],[119,17],[120,17],[121,17],[122,17],[123,59],[125,17],[124,17],[126,17],[110,60],[54,61],[55,62],[53,17],[56,63],[108,55],[109,64],[129,65],[128,66],[136,67],[135,59],[146,68],[145,17],[137,69],[147,70],[138,2],[141,17],[139,17],[142,17],[144,17],[140,17],[143,17]],"exportedModulesMap":[[155,1],[57,2],[58,2],[60,3],[61,4],[62,5],[63,6],[64,7],[65,8],[66,9],[67,10],[68,11],[69,12],[70,12],[71,13],[72,14],[73,15],[74,16],[59,17],[106,17],[75,18],[76,19],[77,20],[107,21],[78,22],[79,23],[80,24],[81,25],[82,26],[83,27],[84,28],[85,29],[86,30],[87,31],[88,32],[89,33],[91,34],[90,35],[92,36],[93,37],[94,38],[95,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[148,17],[150,50],[152,51],[151,50],[149,17],[154,52],[153,17],[12,17],[11,17],[2,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[19,17],[20,17],[3,17],[4,17],[24,17],[21,17],[22,17],[23,17],[25,17],[26,17],[27,17],[5,17],[28,17],[29,17],[30,17],[31,17],[6,17],[32,17],[33,17],[34,17],[35,17],[7,17],[36,17],[41,17],[42,17],[37,17],[38,17],[39,17],[40,17],[8,17],[46,17],[43,17],[44,17],[45,17],[47,17],[9,17],[48,17],[49,17],[50,17],[51,17],[1,17],[10,17],[52,17],[130,17],[131,17],[134,53],[132,54],[133,55],[111,17],[112,17],[113,14],[114,17],[115,17],[116,56],[117,57],[118,17],[127,58],[119,17],[120,17],[121,17],[122,17],[123,59],[125,17],[124,17],[126,17],[110,60],[54,61],[55,62],[53,17],[56,63],[108,55],[109,64],[135,71],[146,72]],"semanticDiagnosticsPerFile":[155,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,59,106,75,76,77,107,78,79,80,81,82,83,84,85,86,87,88,89,91,90,92,93,94,95,96,97,98,99,100,101,102,103,104,105,148,150,152,151,149,154,153,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,36,41,42,37,38,39,40,8,46,43,44,45,47,9,48,49,50,51,1,10,52,130,131,134,132,133,111,112,113,114,115,116,117,118,127,119,120,121,122,123,125,124,126,110,54,55,53,56,108,109,129,128,136,135,146,145,137,147,138,141,139,142,144,140,143]},"version":"4.7.4"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/util",
3
- "version": "2.33.8-dev.6bc74570",
3
+ "version": "2.33.8",
4
4
  "description": "Temporary bucket for misc functions, which should graduate into separate packages.",
5
5
  "license": "MIT",
6
6
  "author": "DXOS.org",
@@ -11,13 +11,14 @@
11
11
  "src"
12
12
  ],
13
13
  "dependencies": {
14
- "@dxos/crypto": "2.33.8-dev.6bc74570",
15
- "@dxos/debug": "2.33.8-dev.6bc74570",
16
- "@dxos/protocols": "2.33.8-dev.6bc74570"
14
+ "@dxos/debug": "2.33.8",
15
+ "@dxos/protocols": "2.33.8"
17
16
  },
18
17
  "devDependencies": {
18
+ "@dxos/crypto": "2.33.8",
19
19
  "@dxos/eslint-plugin": "~1.0.34",
20
- "@dxos/protocols-toolchain": "2.33.7",
20
+ "@dxos/protocols": "2.33.8",
21
+ "@dxos/protocols-toolchain": "2.33.8",
21
22
  "@types/jest": "^26.0.7",
22
23
  "@types/node": "^16.11.27",
23
24
  "eslint": "^7.12.1",
@@ -0,0 +1,18 @@
1
+ //
2
+ // Copyright 2020 DXOS.org
3
+ //
4
+
5
+ // DXOS testing browser.
6
+
7
+ import { createKeyPair, createId } from '@dxos/crypto';
8
+ import { PublicKey } from '@dxos/protocols';
9
+
10
+ import { humanize } from './human-hash';
11
+
12
+ test('Hashing', () => {
13
+ const { publicKey, secretKey } = createKeyPair();
14
+
15
+ expect(humanize(publicKey)).not.toEqual(humanize(secretKey));
16
+ expect(humanize(publicKey)).toEqual(humanize(PublicKey.from(publicKey)));
17
+ expect(humanize(createId())).toBeDefined();
18
+ });
@@ -0,0 +1,132 @@
1
+ //
2
+ // Copyright 2021 DXOS.org
3
+ //
4
+
5
+ import { PublicKey, PublicKeyLike } from '@dxos/protocols';
6
+
7
+ // From https://github.com/SEBv15/humanhash/blob/166c1a6f70d854fe6767cdd76be1237112d4eaf1/index.js
8
+
9
+ const DEFAULT_WORDLIST = [
10
+ 'ack', 'alabama', 'alanine', 'alaska', 'alpha', 'angel', 'apart', 'april',
11
+ 'arizona', 'arkansas', 'artist', 'asparagus', 'aspen', 'august', 'autumn',
12
+ 'avocado', 'bacon', 'bakerloo', 'batman', 'beer', 'berlin', 'beryllium',
13
+ 'black', 'blossom', 'blue', 'bluebird', 'bravo', 'bulldog', 'burger',
14
+ 'butter', 'california', 'carbon', 'cardinal', 'carolina', 'carpet', 'cat',
15
+ 'ceiling', 'charlie', 'chicken', 'coffee', 'cola', 'cold', 'colorado',
16
+ 'comet', 'connecticut', 'crazy', 'cup', 'dakota', 'december', 'delaware',
17
+ 'delta', 'diet', 'don', 'double', 'early', 'earth', 'east', 'echo',
18
+ 'edward', 'eight', 'eighteen', 'eleven', 'emma', 'enemy', 'equal',
19
+ 'failed', 'fanta', 'fifteen', 'fillet', 'finch', 'fish', 'five', 'fix',
20
+ 'floor', 'florida', 'football', 'four', 'fourteen', 'foxtrot', 'freddie',
21
+ 'friend', 'fruit', 'gee', 'georgia', 'glucose', 'golf', 'green', 'grey',
22
+ 'hamper', 'happy', 'harry', 'hawaii', 'helium', 'high', 'hot', 'hotel',
23
+ 'hydrogen', 'idaho', 'illinois', 'india', 'indigo', 'ink', 'iowa',
24
+ 'island', 'item', 'jersey', 'jig', 'johnny', 'juliet', 'july', 'jupiter',
25
+ 'kansas', 'kentucky', 'kilo', 'king', 'kitten', 'lactose', 'lake', 'lamp',
26
+ 'lemon', 'leopard', 'lima', 'lion', 'lithium', 'london', 'louisiana',
27
+ 'low', 'magazine', 'magnesium', 'maine', 'mango', 'march', 'mars',
28
+ 'maryland', 'massachusetts', 'may', 'mexico', 'michigan', 'mike',
29
+ 'minnesota', 'mirror', 'mississippi', 'missouri', 'mobile', 'mockingbird',
30
+ 'monkey', 'montana', 'moon', 'mountain', 'muppet', 'music', 'nebraska',
31
+ 'neptune', 'network', 'nevada', 'nine', 'nineteen', 'nitrogen', 'north',
32
+ 'november', 'nuts', 'october', 'ohio', 'oklahoma', 'one', 'orange',
33
+ 'oranges', 'oregon', 'oscar', 'oven', 'oxygen', 'papa', 'paris', 'pasta',
34
+ 'pennsylvania', 'pip', 'pizza', 'pluto', 'potato', 'princess', 'purple',
35
+ 'quebec', 'queen', 'quiet', 'red', 'river', 'robert', 'robin', 'romeo',
36
+ 'rugby', 'sad', 'salami', 'saturn', 'september', 'seven', 'seventeen',
37
+ 'shade', 'sierra', 'single', 'sink', 'six', 'sixteen', 'skylark', 'snake',
38
+ 'social', 'sodium', 'solar', 'south', 'spaghetti', 'speaker', 'spring',
39
+ 'stairway', 'steak', 'stream', 'summer', 'sweet', 'table', 'tango', 'ten',
40
+ 'tennessee', 'tennis', 'texas', 'thirteen', 'three', 'timing', 'triple',
41
+ 'twelve', 'twenty', 'two', 'uncle', 'undress', 'uniform', 'uranus', 'utah',
42
+ 'vegan', 'venus', 'vermont', 'victor', 'video', 'violet', 'virginia',
43
+ 'washington', 'west', 'whiskey', 'white', 'william', 'winner', 'winter',
44
+ 'wisconsin', 'wolfram', 'wyoming', 'xray', 'yankee', 'yellow', 'zebra', 'zulu'
45
+ ];
46
+
47
+ /**
48
+ * humanhash: Human-readable representations of digests.
49
+ */
50
+ export class HumanHasher {
51
+ /**
52
+ * Transforms hex digests to human-readable strings.
53
+ *
54
+ * The format of these strings will look something like:
55
+ * `victor-bacon-zulu-lima`. The output is obtained by compressing the input
56
+ * digest to a fixed number of bytes, then mapping those bytes to one of 256
57
+ * words. A default wordlist is provided, but you can override this if you
58
+ * prefer.
59
+ * As long as you use the same wordlist, the output will be consistent (i.e.
60
+ * the same digest will always render the same representation).
61
+ *
62
+ * @param wordlist A list of exactly 256 words to choose from
63
+ */
64
+ constructor (private readonly wordlist = DEFAULT_WORDLIST) {
65
+ if (wordlist.length !== 256) {
66
+ throw new Error('Wordlist must have exactly 256 items');
67
+ }
68
+ this.wordlist = wordlist;
69
+ }
70
+
71
+ /**
72
+ * Humanize a given hexadecimal digest.
73
+ *
74
+ * Change the number of words output by specifying `words`. Change the
75
+ * word separator with `separator`.
76
+ *
77
+ * @param hexdigest A string of hexadecimal characters to humanize
78
+ * @param words How many words to output (more = safer)
79
+ * @param separator The string used to seperate the words
80
+ */
81
+ humanize (hexdigest: string, words = 4, separator = '-') {
82
+ const pairs = hexdigest.match(/(..?)/g);
83
+ if (!pairs) {
84
+ throw new Error('');
85
+ }
86
+
87
+ const bytes = pairs.map((x) => parseInt(x, 16));
88
+ const compressed = this._compress(bytes, words);
89
+
90
+ return compressed.map((x) => this.wordlist[x]).join(separator);
91
+ }
92
+
93
+ /**
94
+ * Compress a list of byte values to a fixed target length.
95
+ *
96
+ * @param bytes A list of bytes (numbers from 0-254)
97
+ * @param target The number of bytes to return / compress to
98
+ */
99
+ _compress (bytes: number[], target: number) {
100
+ const length = bytes.length;
101
+ if (target > length) {
102
+ throw new Error('Fewer input bytes than requested output');
103
+ }
104
+
105
+ // Calculate the segment size (divide and round down)
106
+ const segSize = length / target >> 0;
107
+
108
+ // Split 'bytes' array into 'target' number of segments.
109
+ const segments = [];
110
+ for (let i = 0; i < segSize * target; i += segSize) {
111
+ segments.push(bytes.slice(i, i + segSize));
112
+ }
113
+
114
+ // Catch any left-over bytes in the last segment.
115
+ segments[segments.length - 1] = segments[segments.length - 1].concat(bytes.slice(target * segSize));
116
+
117
+ const checksums = segments.map((x) => x.reduce((acc, curr) => acc ^ curr));
118
+ return checksums;
119
+ }
120
+ }
121
+
122
+ const hasher = new HumanHasher();
123
+
124
+ export const humanize = (value: PublicKeyLike): string => {
125
+ if (value instanceof Buffer || value instanceof Uint8Array) {
126
+ value = PublicKey.stringify(value);
127
+ } else if (value instanceof PublicKey) {
128
+ value = value.toHex();
129
+ }
130
+
131
+ return hasher.humanize(value);
132
+ };
package/src/index.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  //
4
4
 
5
5
  export * from './complex';
6
+ export * from './human-hash';
6
7
  export * from './json';
7
8
  export * from './map';
8
9
  export * from './range';
package/src/json.ts CHANGED
@@ -4,9 +4,10 @@
4
4
 
5
5
  import { inspect } from 'util';
6
6
 
7
- import { humanize } from '@dxos/crypto';
8
7
  import { PublicKey } from '@dxos/protocols';
9
8
 
9
+ import { humanize } from './human-hash';
10
+
10
11
  /**
11
12
  * JSON.stringify replacer.
12
13
  */