@peers-app/peers-sdk 0.7.40 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data/files/file-read-stream.d.ts +2 -1
- package/dist/data/files/file-read-stream.js +9 -5
- package/dist/data/files/files.d.ts +4 -2
- package/dist/data/files/files.js +4 -4
- package/dist/data/groups.d.ts +2 -2
- package/dist/device/binary-peer-connection.d.ts +54 -0
- package/dist/device/binary-peer-connection.js +350 -0
- package/dist/device/binary-peer-connection.test.d.ts +1 -0
- package/dist/device/binary-peer-connection.test.js +204 -0
- package/dist/device/connection.d.ts +29 -0
- package/dist/device/connection.js +85 -2
- package/dist/device/connection.test.js +20 -4
- package/dist/device/socket-io-binary-peer.d.ts +27 -0
- package/dist/device/socket-io-binary-peer.js +97 -0
- package/dist/device/socket.type.d.ts +52 -0
- package/dist/device/streamed-socket.d.ts +4 -1
- package/dist/device/streamed-socket.js +45 -4
- package/dist/device/tx-encoding.js +22 -4
- package/dist/device/tx-encoding.test.js +28 -10
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/keys.js +17 -14
- package/dist/package-loader/package-loader.d.ts +2 -0
- package/dist/package-loader/package-loader.js +4 -2
- package/dist/rpc-types.d.ts +1 -0
- package/dist/rpc-types.js +5 -1
- package/dist/user-connect/connection-code.d.ts +67 -0
- package/dist/user-connect/connection-code.js +176 -0
- package/dist/user-connect/connection-code.test.d.ts +1 -0
- package/dist/user-connect/connection-code.test.js +213 -0
- package/dist/user-connect/index.d.ts +3 -0
- package/dist/user-connect/index.js +19 -0
- package/dist/user-connect/user-connect.pvars.d.ts +3 -0
- package/dist/user-connect/user-connect.pvars.js +33 -0
- package/dist/user-connect/user-connect.types.d.ts +58 -0
- package/dist/user-connect/user-connect.types.js +8 -0
- package/package.json +3 -1
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const connection_code_1 = require("./connection-code");
|
|
4
|
+
describe('connection-code', () => {
|
|
5
|
+
describe('generateConnectionCode', () => {
|
|
6
|
+
it('should generate a code with 12 characters', () => {
|
|
7
|
+
const result = (0, connection_code_1.generateConnectionCode)();
|
|
8
|
+
expect(result.code).toHaveLength(12);
|
|
9
|
+
});
|
|
10
|
+
it('should have alias of 4 characters', () => {
|
|
11
|
+
const result = (0, connection_code_1.generateConnectionCode)();
|
|
12
|
+
expect(result.alias).toHaveLength(4);
|
|
13
|
+
});
|
|
14
|
+
it('should have secret of 8 characters', () => {
|
|
15
|
+
const result = (0, connection_code_1.generateConnectionCode)();
|
|
16
|
+
expect(result.secret).toHaveLength(8);
|
|
17
|
+
});
|
|
18
|
+
it('should have code = alias + secret', () => {
|
|
19
|
+
const result = (0, connection_code_1.generateConnectionCode)();
|
|
20
|
+
expect(result.code).toBe(result.alias + result.secret);
|
|
21
|
+
});
|
|
22
|
+
it('should only contain valid Crockford Base32 characters', () => {
|
|
23
|
+
const validChars = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
|
|
24
|
+
for (let i = 0; i < 10; i++) {
|
|
25
|
+
const result = (0, connection_code_1.generateConnectionCode)();
|
|
26
|
+
for (const char of result.code) {
|
|
27
|
+
expect(validChars).toContain(char);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
it('should generate different codes each time', () => {
|
|
32
|
+
const codes = new Set();
|
|
33
|
+
for (let i = 0; i < 100; i++) {
|
|
34
|
+
codes.add((0, connection_code_1.generateConnectionCode)().code);
|
|
35
|
+
}
|
|
36
|
+
expect(codes.size).toBe(100);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
describe('formatConnectionCode', () => {
|
|
40
|
+
it('should format a 12-character code as XXXX-YYYY-ZZZZ', () => {
|
|
41
|
+
expect((0, connection_code_1.formatConnectionCode)('ABCD1234EFGH')).toBe('ABCD-1234-EFGH');
|
|
42
|
+
});
|
|
43
|
+
it('should handle lowercase input', () => {
|
|
44
|
+
expect((0, connection_code_1.formatConnectionCode)('abcd1234efgh')).toBe('ABCD-1234-EFGH');
|
|
45
|
+
});
|
|
46
|
+
it('should handle input with existing dashes', () => {
|
|
47
|
+
expect((0, connection_code_1.formatConnectionCode)('ABCD-1234-EFGH')).toBe('ABCD-1234-EFGH');
|
|
48
|
+
});
|
|
49
|
+
it('should handle input with spaces', () => {
|
|
50
|
+
expect((0, connection_code_1.formatConnectionCode)('ABCD 1234 EFGH')).toBe('ABCD-1234-EFGH');
|
|
51
|
+
});
|
|
52
|
+
it('should throw for codes that are too short', () => {
|
|
53
|
+
expect(() => (0, connection_code_1.formatConnectionCode)('ABCD1234')).toThrow('must be 12 characters');
|
|
54
|
+
});
|
|
55
|
+
it('should throw for codes that are too long', () => {
|
|
56
|
+
expect(() => (0, connection_code_1.formatConnectionCode)('ABCD1234EFGH5678')).toThrow('must be 12 characters');
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
describe('parseConnectionCode', () => {
|
|
60
|
+
it('should parse a plain 12-character code', () => {
|
|
61
|
+
const result = (0, connection_code_1.parseConnectionCode)('ABCD12345678');
|
|
62
|
+
expect(result.alias).toBe('ABCD');
|
|
63
|
+
expect(result.secret).toBe('12345678');
|
|
64
|
+
});
|
|
65
|
+
it('should parse a formatted code with dashes', () => {
|
|
66
|
+
const result = (0, connection_code_1.parseConnectionCode)('ABCD-1234-5678');
|
|
67
|
+
expect(result.alias).toBe('ABCD');
|
|
68
|
+
expect(result.secret).toBe('12345678');
|
|
69
|
+
});
|
|
70
|
+
it('should handle lowercase input', () => {
|
|
71
|
+
const result = (0, connection_code_1.parseConnectionCode)('abcd-1234-5678');
|
|
72
|
+
expect(result.alias).toBe('ABCD');
|
|
73
|
+
expect(result.secret).toBe('12345678');
|
|
74
|
+
});
|
|
75
|
+
it('should handle mixed case and spaces', () => {
|
|
76
|
+
const result = (0, connection_code_1.parseConnectionCode)('AbCd 1234 5678');
|
|
77
|
+
expect(result.alias).toBe('ABCD');
|
|
78
|
+
expect(result.secret).toBe('12345678');
|
|
79
|
+
});
|
|
80
|
+
it('should throw for invalid length', () => {
|
|
81
|
+
expect(() => (0, connection_code_1.parseConnectionCode)('ABCD1234')).toThrow('must be 12 characters');
|
|
82
|
+
});
|
|
83
|
+
it('should be the inverse of formatConnectionCode', () => {
|
|
84
|
+
const original = (0, connection_code_1.generateConnectionCode)();
|
|
85
|
+
const formatted = (0, connection_code_1.formatConnectionCode)(original.code);
|
|
86
|
+
const parsed = (0, connection_code_1.parseConnectionCode)(formatted);
|
|
87
|
+
expect(parsed.alias).toBe(original.alias);
|
|
88
|
+
expect(parsed.secret).toBe(original.secret);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
describe('encryptWithSecret and decryptWithSecret', () => {
|
|
92
|
+
it('should round-trip a simple string', () => {
|
|
93
|
+
const secret = 'ABCD1234';
|
|
94
|
+
const data = 'Hello, World!';
|
|
95
|
+
const encrypted = (0, connection_code_1.encryptWithSecret)(data, secret);
|
|
96
|
+
const decrypted = (0, connection_code_1.decryptWithSecret)(encrypted, secret);
|
|
97
|
+
expect(decrypted).toBe(data);
|
|
98
|
+
});
|
|
99
|
+
it('should round-trip an object', () => {
|
|
100
|
+
const secret = 'ZYXW9876';
|
|
101
|
+
const data = { userId: 'user123', name: 'Test User', count: 42 };
|
|
102
|
+
const encrypted = (0, connection_code_1.encryptWithSecret)(data, secret);
|
|
103
|
+
const decrypted = (0, connection_code_1.decryptWithSecret)(encrypted, secret);
|
|
104
|
+
expect(decrypted).toEqual(data);
|
|
105
|
+
});
|
|
106
|
+
it('should round-trip user connect info', () => {
|
|
107
|
+
const secret = 'TESTCODE';
|
|
108
|
+
const userInfo = {
|
|
109
|
+
userId: 'user123',
|
|
110
|
+
publicKey: 'pk_abc123',
|
|
111
|
+
publicBoxKey: 'pbk_xyz789',
|
|
112
|
+
deviceId: 'device456',
|
|
113
|
+
};
|
|
114
|
+
const encrypted = (0, connection_code_1.encryptWithSecret)(userInfo, secret);
|
|
115
|
+
const decrypted = (0, connection_code_1.decryptWithSecret)(encrypted, secret);
|
|
116
|
+
expect(decrypted).toEqual(userInfo);
|
|
117
|
+
});
|
|
118
|
+
it('should produce different ciphertext for same data (due to random nonce)', () => {
|
|
119
|
+
const secret = 'ABCD1234';
|
|
120
|
+
const data = 'Same data';
|
|
121
|
+
const encrypted1 = (0, connection_code_1.encryptWithSecret)(data, secret);
|
|
122
|
+
const encrypted2 = (0, connection_code_1.encryptWithSecret)(data, secret);
|
|
123
|
+
expect(encrypted1).not.toBe(encrypted2);
|
|
124
|
+
});
|
|
125
|
+
it('should fail decryption with wrong secret', () => {
|
|
126
|
+
const data = 'Secret message';
|
|
127
|
+
const encrypted = (0, connection_code_1.encryptWithSecret)(data, 'CORRECT1');
|
|
128
|
+
expect(() => (0, connection_code_1.decryptWithSecret)(encrypted, 'WRONGKEY')).toThrow('Decryption failed');
|
|
129
|
+
});
|
|
130
|
+
it('should fail decryption with corrupted data', () => {
|
|
131
|
+
const secret = 'ABCD1234';
|
|
132
|
+
const data = 'Hello';
|
|
133
|
+
const encrypted = (0, connection_code_1.encryptWithSecret)(data, secret);
|
|
134
|
+
const corrupted = encrypted.slice(0, -5) + 'XXXXX';
|
|
135
|
+
expect(() => (0, connection_code_1.decryptWithSecret)(corrupted, secret)).toThrow();
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
describe('generateConfirmationHash', () => {
|
|
139
|
+
const userA = {
|
|
140
|
+
userId: 'userA123',
|
|
141
|
+
publicKey: 'pkA',
|
|
142
|
+
publicBoxKey: 'pbkA',
|
|
143
|
+
deviceId: 'deviceA',
|
|
144
|
+
};
|
|
145
|
+
const userB = {
|
|
146
|
+
userId: 'userB456',
|
|
147
|
+
publicKey: 'pkB',
|
|
148
|
+
publicBoxKey: 'pbkB',
|
|
149
|
+
deviceId: 'deviceB',
|
|
150
|
+
};
|
|
151
|
+
it('should return a 4-character hash', () => {
|
|
152
|
+
const hash = (0, connection_code_1.generateConfirmationHash)(userA, userB);
|
|
153
|
+
expect(hash).toHaveLength(4);
|
|
154
|
+
});
|
|
155
|
+
it('should only contain valid Crockford Base32 characters', () => {
|
|
156
|
+
const validChars = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
|
|
157
|
+
const hash = (0, connection_code_1.generateConfirmationHash)(userA, userB);
|
|
158
|
+
for (const char of hash) {
|
|
159
|
+
expect(validChars).toContain(char);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
it('should produce same hash regardless of argument order', () => {
|
|
163
|
+
const hashAB = (0, connection_code_1.generateConfirmationHash)(userA, userB);
|
|
164
|
+
const hashBA = (0, connection_code_1.generateConfirmationHash)(userB, userA);
|
|
165
|
+
expect(hashAB).toBe(hashBA);
|
|
166
|
+
});
|
|
167
|
+
it('should produce different hash for different users', () => {
|
|
168
|
+
const userC = {
|
|
169
|
+
userId: 'userC789',
|
|
170
|
+
publicKey: 'pkC',
|
|
171
|
+
publicBoxKey: 'pbkC',
|
|
172
|
+
deviceId: 'deviceC',
|
|
173
|
+
};
|
|
174
|
+
const hashAB = (0, connection_code_1.generateConfirmationHash)(userA, userB);
|
|
175
|
+
const hashAC = (0, connection_code_1.generateConfirmationHash)(userA, userC);
|
|
176
|
+
expect(hashAB).not.toBe(hashAC);
|
|
177
|
+
});
|
|
178
|
+
it('should be deterministic', () => {
|
|
179
|
+
const hash1 = (0, connection_code_1.generateConfirmationHash)(userA, userB);
|
|
180
|
+
const hash2 = (0, connection_code_1.generateConfirmationHash)(userA, userB);
|
|
181
|
+
expect(hash1).toBe(hash2);
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
describe('isValidConnectionCode', () => {
|
|
185
|
+
it('should return true for valid 12-character codes', () => {
|
|
186
|
+
expect((0, connection_code_1.isValidConnectionCode)('ABCD1234EFGH')).toBe(true);
|
|
187
|
+
});
|
|
188
|
+
it('should return true for codes with dashes', () => {
|
|
189
|
+
expect((0, connection_code_1.isValidConnectionCode)('ABCD-1234-EFGH')).toBe(true);
|
|
190
|
+
});
|
|
191
|
+
it('should return true for lowercase codes', () => {
|
|
192
|
+
expect((0, connection_code_1.isValidConnectionCode)('abcd1234efgh')).toBe(true);
|
|
193
|
+
});
|
|
194
|
+
it('should return true for generated codes', () => {
|
|
195
|
+
const code = (0, connection_code_1.generateConnectionCode)();
|
|
196
|
+
expect((0, connection_code_1.isValidConnectionCode)(code.code)).toBe(true);
|
|
197
|
+
expect((0, connection_code_1.isValidConnectionCode)((0, connection_code_1.formatConnectionCode)(code.code))).toBe(true);
|
|
198
|
+
});
|
|
199
|
+
it('should return false for codes that are too short', () => {
|
|
200
|
+
expect((0, connection_code_1.isValidConnectionCode)('ABCD1234')).toBe(false);
|
|
201
|
+
});
|
|
202
|
+
it('should return false for codes that are too long', () => {
|
|
203
|
+
expect((0, connection_code_1.isValidConnectionCode)('ABCD1234EFGH5678')).toBe(false);
|
|
204
|
+
});
|
|
205
|
+
it('should return false for codes with invalid characters', () => {
|
|
206
|
+
// I, L, O, U are not in Crockford Base32
|
|
207
|
+
expect((0, connection_code_1.isValidConnectionCode)('ABCDILOU1234')).toBe(false);
|
|
208
|
+
});
|
|
209
|
+
it('should return false for empty string', () => {
|
|
210
|
+
expect((0, connection_code_1.isValidConnectionCode)('')).toBe(false);
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./connection-code"), exports);
|
|
18
|
+
__exportStar(require("./user-connect.types"), exports);
|
|
19
|
+
__exportStar(require("./user-connect.pvars"), exports);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const userConnectStatus: import("../data/persistent-vars").PersistentVar<any>;
|
|
2
|
+
export declare const userConnectCodeOffer: import("../data/persistent-vars").PersistentVar<string>;
|
|
3
|
+
export declare const userConnectCodeAnswer: import("../data/persistent-vars").PersistentVar<string>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userConnectCodeAnswer = exports.userConnectCodeOffer = exports.userConnectStatus = void 0;
|
|
4
|
+
const persistent_vars_1 = require("../data/persistent-vars");
|
|
5
|
+
exports.userConnectStatus = (0, persistent_vars_1.deviceVar)('userConnectStatus', { defaultValue: undefined });
|
|
6
|
+
exports.userConnectCodeOffer = (0, persistent_vars_1.deviceVar)('userConnectCodeOffer', { defaultValue: '' });
|
|
7
|
+
exports.userConnectCodeOffer.loadingPromise.then(() => {
|
|
8
|
+
let codeTimeout = undefined;
|
|
9
|
+
(0, exports.userConnectStatus)('');
|
|
10
|
+
exports.userConnectCodeOffer.subscribe(() => {
|
|
11
|
+
(0, exports.userConnectStatus)('');
|
|
12
|
+
clearTimeout(codeTimeout);
|
|
13
|
+
if ((0, exports.userConnectCodeOffer)()) {
|
|
14
|
+
codeTimeout = setTimeout(() => {
|
|
15
|
+
(0, exports.userConnectCodeOffer)('');
|
|
16
|
+
}, 600_000); // 10 minutes
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
exports.userConnectCodeAnswer = (0, persistent_vars_1.deviceVar)('userConnectCodeAnswer', { defaultValue: '' });
|
|
21
|
+
exports.userConnectCodeAnswer.loadingPromise.then(() => {
|
|
22
|
+
let codeTimeout = undefined;
|
|
23
|
+
(0, exports.userConnectStatus)('');
|
|
24
|
+
exports.userConnectCodeAnswer.subscribe(() => {
|
|
25
|
+
(0, exports.userConnectStatus)('');
|
|
26
|
+
clearTimeout(codeTimeout);
|
|
27
|
+
if ((0, exports.userConnectCodeAnswer)()) {
|
|
28
|
+
codeTimeout = setTimeout(() => {
|
|
29
|
+
(0, exports.userConnectCodeAnswer)('');
|
|
30
|
+
}, 600_000); // 10 minutes
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the user connection flow.
|
|
3
|
+
*
|
|
4
|
+
* This flow allows two users to securely exchange user information
|
|
5
|
+
* using a 12-character code (4-char rendezvous alias + 8-char shared secret).
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* User information exchanged during the connection flow.
|
|
9
|
+
*/
|
|
10
|
+
export interface IUserConnectInfo {
|
|
11
|
+
userId: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
publicKey: string;
|
|
14
|
+
publicBoxKey: string;
|
|
15
|
+
deviceId: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Message sent by the responder to initiate the connection.
|
|
19
|
+
* The payload is encrypted with the shared secret from the connection code.
|
|
20
|
+
*/
|
|
21
|
+
export interface IUserConnectRequest {
|
|
22
|
+
type: 'user-connect-request';
|
|
23
|
+
/** User info encrypted with the shared secret */
|
|
24
|
+
encryptedUserInfo: string;
|
|
25
|
+
/** The responder's deviceId so the initiator can respond directly */
|
|
26
|
+
responseDeviceId: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Message sent by the initiator in response to a connection request.
|
|
30
|
+
* The payload is encrypted with the shared secret.
|
|
31
|
+
*/
|
|
32
|
+
export interface IUserConnectResponse {
|
|
33
|
+
type: 'user-connect-response';
|
|
34
|
+
/** User info encrypted with the shared secret */
|
|
35
|
+
encryptedUserInfo: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Message broadcast to register a short-lived device alias.
|
|
39
|
+
* Other devices store this mapping for routing purposes.
|
|
40
|
+
*/
|
|
41
|
+
export interface IDeviceAliasMessage {
|
|
42
|
+
type: 'device-alias';
|
|
43
|
+
/** The short alias (4 chars Crockford Base32) */
|
|
44
|
+
alias: string;
|
|
45
|
+
/** The actual deviceId this alias maps to */
|
|
46
|
+
deviceId: string;
|
|
47
|
+
/** TTL in milliseconds (typically 10 minutes) */
|
|
48
|
+
ttlMs: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Result of a successful user connection.
|
|
52
|
+
*/
|
|
53
|
+
export interface IUserConnectResult {
|
|
54
|
+
/** The remote user's information */
|
|
55
|
+
remoteUser: IUserConnectInfo;
|
|
56
|
+
/** Confirmation hash (first 4 chars) for visual verification */
|
|
57
|
+
confirmationHash: string;
|
|
58
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Types for the user connection flow.
|
|
4
|
+
*
|
|
5
|
+
* This flow allows two users to securely exchange user information
|
|
6
|
+
* using a 12-character code (4-char rendezvous alias + 8-char shared secret).
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peers-app/peers-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/peers-app/peers-sdk.git"
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@msgpack/msgpack": "^3.1.2",
|
|
34
34
|
"@noble/hashes": "^1.8.0",
|
|
35
|
+
"ed2curve": "^0.3.0",
|
|
35
36
|
"fast-json-stable-stringify": "^2.1.0",
|
|
36
37
|
"fflate": "^0.8.2",
|
|
37
38
|
"lodash": "^4.17.21",
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@types/better-sqlite3": "^7.6.12",
|
|
47
|
+
"@types/ed2curve": "^0.2.4",
|
|
46
48
|
"@types/jest": "^29.5.13",
|
|
47
49
|
"@types/lodash": "^4.17.7",
|
|
48
50
|
"@types/moment": "^2.13.0",
|