@private.me/xbind 1.2.17 → 1.3.5

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.
Files changed (77) hide show
  1. package/README.md +97 -7
  2. package/dist-standalone/_deps/crypto/base64.js +212 -87
  3. package/dist-standalone/_deps/crypto/cjs/base64.js +653 -91
  4. package/dist-standalone/_deps/crypto/cjs/errors.js +658 -102
  5. package/dist-standalone/_deps/crypto/cjs/hmac.js +468 -66
  6. package/dist-standalone/_deps/crypto/cjs/index.js +848 -82
  7. package/dist-standalone/_deps/crypto/cjs/package.json +1 -0
  8. package/dist-standalone/_deps/crypto/cjs/padding.js +504 -50
  9. package/dist-standalone/_deps/crypto/cjs/share-header.js +369 -65
  10. package/dist-standalone/_deps/crypto/cjs/shares.js +865 -143
  11. package/dist-standalone/_deps/crypto/cjs/tlv.js +1005 -183
  12. package/dist-standalone/_deps/crypto/cjs/uuid.js +437 -55
  13. package/dist-standalone/_deps/crypto/cjs/verify.js +414 -24
  14. package/dist-standalone/_deps/crypto/cjs/xorida.js +888 -186
  15. package/dist-standalone/_deps/crypto/errors.js +179 -89
  16. package/dist-standalone/_deps/crypto/hmac.js +129 -61
  17. package/dist-standalone/_deps/crypto/index.js +140 -40
  18. package/dist-standalone/_deps/crypto/padding.js +151 -45
  19. package/dist-standalone/_deps/crypto/share-header.js +89 -60
  20. package/dist-standalone/_deps/crypto/shares.js +280 -133
  21. package/dist-standalone/_deps/crypto/tlv.js +348 -179
  22. package/dist-standalone/_deps/crypto/uuid.js +130 -50
  23. package/dist-standalone/_deps/crypto/verify.js +71 -15
  24. package/dist-standalone/_deps/crypto/xorida.js +332 -181
  25. package/dist-standalone/_deps/shared/cjs/errors.js +582 -525
  26. package/dist-standalone/_deps/shared/cjs/index.js +413 -409
  27. package/dist-standalone/_deps/shared/cjs/types.js +262 -348
  28. package/dist-standalone/_deps/shared/errors.d.ts +7 -1
  29. package/dist-standalone/_deps/shared/errors.d.ts.map +1 -1
  30. package/dist-standalone/_deps/shared/errors.js +229 -166
  31. package/dist-standalone/_deps/shared/errors.js.map +1 -1
  32. package/dist-standalone/_deps/shared/index.js +50 -54
  33. package/dist-standalone/_deps/shared/types.js +61 -60
  34. package/dist-standalone/_deps/ux-helpers/cjs/errors.js +1 -1
  35. package/dist-standalone/_deps/ux-helpers/cjs/pagination.js +1 -1
  36. package/dist-standalone/_deps/ux-helpers/cjs/progress.js +1 -1
  37. package/dist-standalone/_deps/ux-helpers/cjs/search.js +1 -1
  38. package/dist-standalone/_deps/ux-helpers/errors.js +1 -1
  39. package/dist-standalone/_deps/ux-helpers/pagination.js +1 -1
  40. package/dist-standalone/_deps/ux-helpers/progress.js +1 -1
  41. package/dist-standalone/_deps/ux-helpers/search.js +1 -1
  42. package/dist-standalone/_deps/xchange/auto-accept.js +1 -1
  43. package/dist-standalone/_deps/xchange/cjs/auto-accept.js +1 -1
  44. package/dist-standalone/_deps/xchange/cjs/errors.js +1 -1
  45. package/dist-standalone/_deps/xchange/cjs/index.js +1 -1
  46. package/dist-standalone/_deps/xchange/cjs/invite-client.js +1 -1
  47. package/dist-standalone/_deps/xchange/cjs/lazy-init.js +1 -1
  48. package/dist-standalone/_deps/xchange/cjs/trust-integration.js +1 -1
  49. package/dist-standalone/_deps/xchange/cjs/xchange.js +1 -1
  50. package/dist-standalone/_deps/xchange/errors.js +1 -1
  51. package/dist-standalone/_deps/xchange/index.js +1 -1
  52. package/dist-standalone/_deps/xchange/invite-client.js +1 -1
  53. package/dist-standalone/_deps/xchange/lazy-init.js +1 -1
  54. package/dist-standalone/_deps/xchange/trust-integration.js +1 -1
  55. package/dist-standalone/_deps/xchange/xchange.js +1 -1
  56. package/dist-standalone/_deps/xregistry/cjs/discovery.js +1 -1
  57. package/dist-standalone/_deps/xregistry/cjs/errors.js +1 -1
  58. package/dist-standalone/_deps/xregistry/cjs/index.js +1 -1
  59. package/dist-standalone/_deps/xregistry/cjs/registry.js +1 -1
  60. package/dist-standalone/_deps/xregistry/cjs/schema.js +1 -1
  61. package/dist-standalone/_deps/xregistry/cjs/types.js +1 -1
  62. package/dist-standalone/_deps/xregistry/discovery.js +1 -1
  63. package/dist-standalone/_deps/xregistry/errors.js +1 -1
  64. package/dist-standalone/_deps/xregistry/index.js +1 -1
  65. package/dist-standalone/_deps/xregistry/registry.js +1 -1
  66. package/dist-standalone/_deps/xregistry/schema.js +1 -1
  67. package/dist-standalone/_deps/xregistry/types.js +1 -1
  68. package/dist-standalone/cjs/identity.js +2 -3
  69. package/dist-standalone/cli/setup.d.ts +52 -0
  70. package/dist-standalone/cli/setup.js +515 -0
  71. package/dist-standalone/cli/types.d.ts +79 -0
  72. package/dist-standalone/cli/types.js +27 -0
  73. package/dist-standalone/cli/xbind.d.ts +20 -0
  74. package/dist-standalone/cli/xbind.js +149 -0
  75. package/dist-standalone/identity.js +2 -3
  76. package/package.json +3 -2
  77. package/share1.dat +0 -0
@@ -1,56 +1,136 @@
1
- /**
2
- * Generate a RFC 4122 Version 4 UUID (128-bit random).
3
- * Uses crypto.randomUUID() when available, otherwise constructs manually
4
- * from crypto.getRandomValues() with proper version/variant bits.
5
- *
6
- * @returns UUID string in standard 8-4-4-4-12 hex format
7
- */
8
- export function generateUUID() {
9
- if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {
10
- return crypto.randomUUID();
1
+ function a19_0x1f4b(_0x5713be, _0x2915bc) {
2
+ _0x5713be = _0x5713be - 0x1a5;
3
+ const _0x4bf66f = a19_0x4bf6();
4
+ let _0x1f4b90 = _0x4bf66f[_0x5713be];
5
+ if (a19_0x1f4b['viKZZb'] === undefined) {
6
+ var _0x5629d4 = function (_0x199737) {
7
+ const _0x1a13d7 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
8
+ let _0x309d0f = '', _0x4c5c8b = '';
9
+ for (let _0x200be4 = 0x0, _0x3e8f75, _0x23ff2e, _0x56b761 = 0x0; _0x23ff2e = _0x199737['charAt'](_0x56b761++); ~_0x23ff2e && (_0x3e8f75 = _0x200be4 % 0x4 ? _0x3e8f75 * 0x40 + _0x23ff2e : _0x23ff2e, _0x200be4++ % 0x4) ? _0x309d0f += String['fromCharCode'](0xff & _0x3e8f75 >> (-0x2 * _0x200be4 & 0x6)) : 0x0) {
10
+ _0x23ff2e = _0x1a13d7['indexOf'](_0x23ff2e);
11
+ }
12
+ for (let _0x176041 = 0x0, _0x356b46 = _0x309d0f['length']; _0x176041 < _0x356b46; _0x176041++) {
13
+ _0x4c5c8b += '%' + ('00' + _0x309d0f['charCodeAt'](_0x176041)['toString'](0x10))['slice'](-0x2);
14
+ }
15
+ return decodeURIComponent(_0x4c5c8b);
16
+ };
17
+ a19_0x1f4b['ugZltk'] = _0x5629d4, a19_0x1f4b['sWyFJg'] = {}, a19_0x1f4b['viKZZb'] = !![];
18
+ }
19
+ const _0x2ae596 = _0x4bf66f[0x0], _0x40c575 = _0x5713be + _0x2ae596, _0xe1e37 = a19_0x1f4b['sWyFJg'][_0x40c575];
20
+ return !_0xe1e37 ? (_0x1f4b90 = a19_0x1f4b['ugZltk'](_0x1f4b90), a19_0x1f4b['sWyFJg'][_0x40c575] = _0x1f4b90) : _0x1f4b90 = _0xe1e37, _0x1f4b90;
21
+ }
22
+ (function (_0x4f9e0b, _0x2e1cf0) {
23
+ const a19_0x569da2 = {
24
+ _0x517d52: 0x1b7,
25
+ _0x3fb6ae: 0x1b2,
26
+ _0x41b50b: 0x1ac,
27
+ _0x56c77b: 0x1a6,
28
+ _0x11d2de: 0x1b4,
29
+ _0x41bb94: 0x1af,
30
+ _0x2cba97: 0x1bb
31
+ }, _0x21cf9f = a19_0x1f4b, _0x8b9f1c = _0x4f9e0b();
32
+ while (!![]) {
33
+ try {
34
+ const _0x65f039 = parseInt(_0x21cf9f(0x1ab)) / 0x1 * (-parseInt(_0x21cf9f(a19_0x569da2._0x517d52)) / 0x2) + -parseInt(_0x21cf9f(a19_0x569da2._0x3fb6ae)) / 0x3 + parseInt(_0x21cf9f(a19_0x569da2._0x41b50b)) / 0x4 * (parseInt(_0x21cf9f(a19_0x569da2._0x56c77b)) / 0x5) + -parseInt(_0x21cf9f(a19_0x569da2._0x11d2de)) / 0x6 * (parseInt(_0x21cf9f(a19_0x569da2._0x41bb94)) / 0x7) + -parseInt(_0x21cf9f(0x1ad)) / 0x8 + -parseInt(_0x21cf9f(0x1a9)) / 0x9 * (-parseInt(_0x21cf9f(0x1ba)) / 0xa) + parseInt(_0x21cf9f(a19_0x569da2._0x2cba97)) / 0xb;
35
+ if (_0x65f039 === _0x2e1cf0)
36
+ break;
37
+ else
38
+ _0x8b9f1c['push'](_0x8b9f1c['shift']());
39
+ } catch (_0x166036) {
40
+ _0x8b9f1c['push'](_0x8b9f1c['shift']());
41
+ }
11
42
  }
12
- const bytes = new Uint8Array(16);
13
- crypto.getRandomValues(bytes);
14
- // Set version 4 (bits 12-15 of time_hi_and_version)
15
- bytes[6] = (bytes[6] & 0x0f) | 0x40;
16
- // Set variant 10xx (bits 6-7 of clock_seq_hi_and_reserved)
17
- bytes[8] = (bytes[8] & 0x3f) | 0x80;
18
- const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, '0')).join('');
43
+ }(a19_0x4bf6, 0x53d9c));
44
+ export function generateUUID() {
45
+ const a19_0x48b2ea = {
46
+ _0x20657a: 0x1b6,
47
+ _0x256d80: 0x1b1,
48
+ _0x13214a: 0x1ae,
49
+ _0x360d2e: 0x1a8
50
+ }, _0x3727de = a19_0x1f4b, _0x15d326 = {
51
+ 'ESmbP': function (_0x3793ae, _0x5c9b73) {
52
+ return _0x3793ae !== _0x5c9b73;
53
+ },
54
+ 'SjJsR': function (_0x48deff, _0x500d04) {
55
+ return _0x48deff | _0x500d04;
56
+ },
57
+ 'kjtjz': function (_0x393291, _0x1abaa0) {
58
+ return _0x393291 & _0x1abaa0;
59
+ },
60
+ 'khubY': function (_0x394879, _0x1efe37) {
61
+ return _0x394879 | _0x1efe37;
62
+ }
63
+ };
64
+ if (_0x15d326['ESmbP'](typeof crypto, _0x3727de(a19_0x48b2ea._0x20657a)) && typeof crypto[_0x3727de(0x1b9)] === _0x3727de(0x1a5))
65
+ return crypto['randomUUID']();
66
+ const _0x4b6a57 = new Uint8Array(0x10);
67
+ crypto[_0x3727de(a19_0x48b2ea._0x256d80)](_0x4b6a57), _0x4b6a57[0x6] = _0x15d326[_0x3727de(a19_0x48b2ea._0x13214a)](_0x15d326[_0x3727de(0x1b0)](_0x4b6a57[0x6], 0xf), 0x40), _0x4b6a57[0x8] = _0x15d326[_0x3727de(0x1aa)](_0x15d326[_0x3727de(0x1b0)](_0x4b6a57[0x8], 0x3f), 0x80);
68
+ const _0x524a41 = Array['from'](_0x4b6a57, _0x2902a8 => _0x2902a8[_0x3727de(0x1bd)](0x10)[_0x3727de(0x1b5)](0x2, '0'))[_0x3727de(0x1a7)]('');
19
69
  return [
20
- hex.slice(0, 8),
21
- hex.slice(8, 12),
22
- hex.slice(12, 16),
23
- hex.slice(16, 20),
24
- hex.slice(20, 32),
25
- ].join('-');
70
+ _0x524a41['slice'](0x0, 0x8),
71
+ _0x524a41['slice'](0x8, 0xc),
72
+ _0x524a41[_0x3727de(a19_0x48b2ea._0x360d2e)](0xc, 0x10),
73
+ _0x524a41[_0x3727de(a19_0x48b2ea._0x360d2e)](0x10, 0x14),
74
+ _0x524a41['slice'](0x14, 0x20)
75
+ ][_0x3727de(0x1a7)]('-');
26
76
  }
27
- /**
28
- * Parse a UUID string into its raw 16 bytes.
29
- *
30
- * @param uuid - UUID string in 8-4-4-4-12 hex format
31
- * @returns 16-byte Uint8Array
32
- */
33
- export function uuidToBytes(uuid) {
34
- const hex = uuid.replace(/-/g, '');
35
- const bytes = new Uint8Array(16);
36
- for (let i = 0; i < 16; i++) {
37
- bytes[i] = parseInt(hex.slice(i * 2, i * 2 + 2), 16);
77
+ export function uuidToBytes(_0x294369) {
78
+ const a19_0x541d61 = { _0x33a658: 0x1b3 }, _0x5322cb = a19_0x1f4b, _0x57acc8 = {
79
+ 'FLSnb': function (_0x5340d2, _0x27bd00, _0x250018) {
80
+ return _0x5340d2(_0x27bd00, _0x250018);
81
+ }
82
+ }, _0xb42d0c = _0x294369[_0x5322cb(a19_0x541d61._0x33a658)](/-/g, ''), _0x37b20b = new Uint8Array(0x10);
83
+ for (let _0x212ae1 = 0x0; _0x212ae1 < 0x10; _0x212ae1++) {
84
+ _0x37b20b[_0x212ae1] = _0x57acc8[_0x5322cb(0x1b8)](parseInt, _0xb42d0c['slice'](_0x212ae1 * 0x2, _0x212ae1 * 0x2 + 0x2), 0x10);
38
85
  }
39
- return bytes;
86
+ return _0x37b20b;
40
87
  }
41
- /**
42
- * Convert raw 16 UUID bytes to the standard string format.
43
- *
44
- * @param bytes - 16-byte Uint8Array
45
- * @returns UUID string in 8-4-4-4-12 hex format
46
- */
47
- export function bytesToUuid(bytes) {
48
- const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, '0')).join('');
49
- return [
50
- hex.slice(0, 8),
51
- hex.slice(8, 12),
52
- hex.slice(12, 16),
53
- hex.slice(16, 20),
54
- hex.slice(20, 32),
55
- ].join('-');
88
+ function a19_0x4bf6() {
89
+ const _0x2d9369 = [
90
+ 'mZuWodq4oePjtKjwzq',
91
+ 'u2PkC1i',
92
+ 'mtyXv2HerfLZ',
93
+ 'A2P0ANO',
94
+ 'z2v0uMfUzg9TvMfSDwvZ',
95
+ 'mtq2ndeYm0jrqKzXwa',
96
+ 'CMvWBgfJzq',
97
+ 'mtmZotiWD0rUA01R',
98
+ 'CgfKu3rHCNq',
99
+ 'Dw5KzwzPBMvK',
100
+ 'mKnUzhjZra',
101
+ 'rKXtBMi',
102
+ 'CMfUzg9Tvvvjra',
103
+ 'nZb1tNvpC04',
104
+ 'mtyZnZa3nJfltfvnDxa',
105
+ 'zNjVBq',
106
+ 'Dg9tDhjPBMC',
107
+ 'zNvUy3rPB24',
108
+ 'mtiYnti1u0T3BhHy',
109
+ 'AM9PBG',
110
+ 'C2XPy2u',
111
+ 'mJKXodyXB1HlzKfS',
112
+ 'A2H1yLK',
113
+ 'mtuYmZG1tg9PzwTw',
114
+ 'mZzRzhPbqNG'
115
+ ];
116
+ a19_0x4bf6 = function () {
117
+ return _0x2d9369;
118
+ };
119
+ return a19_0x4bf6();
56
120
  }
121
+ export function bytesToUuid(_0x2f8c11) {
122
+ const a19_0x5de409 = {
123
+ _0x6ace28: 0x1bc,
124
+ _0x2c158b: 0x1a7,
125
+ _0x418d89: 0x1a8,
126
+ _0x16d710: 0x1a8,
127
+ _0x340170: 0x1a8
128
+ }, _0x41793c = a19_0x1f4b, _0x245651 = Array[_0x41793c(a19_0x5de409._0x6ace28)](_0x2f8c11, _0x390f42 => _0x390f42['toString'](0x10)[_0x41793c(0x1b5)](0x2, '0'))[_0x41793c(a19_0x5de409._0x2c158b)]('');
129
+ return [
130
+ _0x245651[_0x41793c(a19_0x5de409._0x418d89)](0x0, 0x8),
131
+ _0x245651[_0x41793c(a19_0x5de409._0x16d710)](0x8, 0xc),
132
+ _0x245651[_0x41793c(a19_0x5de409._0x340170)](0xc, 0x10),
133
+ _0x245651[_0x41793c(0x1a8)](0x10, 0x14),
134
+ _0x245651[_0x41793c(a19_0x5de409._0x418d89)](0x14, 0x20)
135
+ ][_0x41793c(0x1a7)]('-');
136
+ }
@@ -1,15 +1,71 @@
1
- /**
2
- * @module verify
3
- * Lightweight sub-path export for verification-only use cases.
4
- *
5
- * Import as `@private.me/crypto/verify` for tree-shaking:
6
- * ```ts
7
- * import { verifyHMAC, fromBase64, isSupported } from '@private.me/crypto/verify';
8
- * ```
9
- *
10
- * This module re-exports only HMAC verification, base64 decoding,
11
- * and the capability check — no splitting, no reconstruction, no padding.
12
- */
13
- export { verifyHMAC } from './hmac.js';
14
- export { fromBase64, toBase64, fromBase64Url, toBase64Url } from './base64.js';
15
- export { isSupported } from './index.js';
1
+ function a20_0x5929() {
2
+ var _0x495042 = [
3
+ 'mZa0mdeYofzlDxLnqG',
4
+ 'ngLoq0nuuq',
5
+ 'mLH0D251Eq',
6
+ 'ndC2mdy1nLHiD1Hdtq',
7
+ 'ndqYotiZnMndq0HuyW',
8
+ 'mJC3nJaYnw5PuejnrG',
9
+ 'mtm0mdu3ngjyuezOzG',
10
+ 'ntu3nte1BujuAhHI',
11
+ 'nJKXmtm3oxH5zgTHDq'
12
+ ];
13
+ a20_0x5929 = function () {
14
+ return _0x495042;
15
+ };
16
+ return a20_0x5929();
17
+ }
18
+ (function (_0x5e9717, _0x4e73ef) {
19
+ var a20_0x17eaab = {
20
+ _0x241fd7: 0xa5,
21
+ _0x1f1042: 0xa3,
22
+ _0x3dfb73: 0xab,
23
+ _0x281af3: 0xa7,
24
+ _0x18ee9: 0xaa,
25
+ _0x1d7eb4: 0xa6
26
+ }, _0x4ba6d0 = a20_0x46d9, _0x25033e = _0x5e9717();
27
+ while (!![]) {
28
+ try {
29
+ var _0x222d89 = -parseInt(_0x4ba6d0(a20_0x17eaab._0x241fd7)) / 0x1 + parseInt(_0x4ba6d0(0xa9)) / 0x2 * (parseInt(_0x4ba6d0(0xa4)) / 0x3) + -parseInt(_0x4ba6d0(0xa8)) / 0x4 * (parseInt(_0x4ba6d0(a20_0x17eaab._0x1f1042)) / 0x5) + -parseInt(_0x4ba6d0(a20_0x17eaab._0x3dfb73)) / 0x6 + parseInt(_0x4ba6d0(a20_0x17eaab._0x281af3)) / 0x7 + parseInt(_0x4ba6d0(a20_0x17eaab._0x18ee9)) / 0x8 + parseInt(_0x4ba6d0(a20_0x17eaab._0x1d7eb4)) / 0x9;
30
+ if (_0x222d89 === _0x4e73ef)
31
+ break;
32
+ else
33
+ _0x25033e['push'](_0x25033e['shift']());
34
+ } catch (_0x454939) {
35
+ _0x25033e['push'](_0x25033e['shift']());
36
+ }
37
+ }
38
+ }(a20_0x5929, 0x60021));
39
+ export {
40
+ verifyHMAC
41
+ } from './hmac.js';
42
+ function a20_0x46d9(_0x38f89a, _0x471fd9) {
43
+ _0x38f89a = _0x38f89a - 0xa3;
44
+ var _0x59294a = a20_0x5929();
45
+ var _0x46d980 = _0x59294a[_0x38f89a];
46
+ if (a20_0x46d9['KzQQhi'] === undefined) {
47
+ var _0x69bf7a = function (_0x462f2f) {
48
+ var _0x4c49db = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
49
+ var _0x1f148a = '', _0xde4129 = '';
50
+ for (var _0x4ac71d = 0x0, _0xe07edc, _0x2efe63, _0x4a044a = 0x0; _0x2efe63 = _0x462f2f['charAt'](_0x4a044a++); ~_0x2efe63 && (_0xe07edc = _0x4ac71d % 0x4 ? _0xe07edc * 0x40 + _0x2efe63 : _0x2efe63, _0x4ac71d++ % 0x4) ? _0x1f148a += String['fromCharCode'](0xff & _0xe07edc >> (-0x2 * _0x4ac71d & 0x6)) : 0x0) {
51
+ _0x2efe63 = _0x4c49db['indexOf'](_0x2efe63);
52
+ }
53
+ for (var _0x53c370 = 0x0, _0x11afb6 = _0x1f148a['length']; _0x53c370 < _0x11afb6; _0x53c370++) {
54
+ _0xde4129 += '%' + ('00' + _0x1f148a['charCodeAt'](_0x53c370)['toString'](0x10))['slice'](-0x2);
55
+ }
56
+ return decodeURIComponent(_0xde4129);
57
+ };
58
+ a20_0x46d9['VSNeNq'] = _0x69bf7a, a20_0x46d9['oPHkLn'] = {}, a20_0x46d9['KzQQhi'] = !![];
59
+ }
60
+ var _0x4b56fe = _0x59294a[0x0], _0x2fba35 = _0x38f89a + _0x4b56fe, _0x64aa67 = a20_0x46d9['oPHkLn'][_0x2fba35];
61
+ return !_0x64aa67 ? (_0x46d980 = a20_0x46d9['VSNeNq'](_0x46d980), a20_0x46d9['oPHkLn'][_0x2fba35] = _0x46d980) : _0x46d980 = _0x64aa67, _0x46d980;
62
+ }
63
+ export {
64
+ fromBase64,
65
+ toBase64,
66
+ fromBase64Url,
67
+ toBase64Url
68
+ } from './base64.js';
69
+ export {
70
+ isSupported
71
+ } from './index.js';