@internxt/sdk 1.8.0 → 1.9.0
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/auth/index.js
CHANGED
|
@@ -77,9 +77,22 @@ var Auth = /** @class */ (function () {
|
|
|
77
77
|
password: registerDetails.password,
|
|
78
78
|
mnemonic: registerDetails.mnemonic,
|
|
79
79
|
salt: registerDetails.salt,
|
|
80
|
+
/**
|
|
81
|
+
/ @deprecated The individual fields for keys should not be used
|
|
82
|
+
*/
|
|
80
83
|
privateKey: registerDetails.keys.privateKeyEncrypted,
|
|
81
84
|
publicKey: registerDetails.keys.publicKey,
|
|
82
85
|
revocationKey: registerDetails.keys.revocationCertificate,
|
|
86
|
+
keys: {
|
|
87
|
+
ecc: {
|
|
88
|
+
publicKey: registerDetails.keys.ecc.publicKey,
|
|
89
|
+
privateKeyEncrypted: registerDetails.keys.ecc.privateKeyEncrypted,
|
|
90
|
+
},
|
|
91
|
+
kyber: {
|
|
92
|
+
publicKey: registerDetails.keys.kyber.publicKey,
|
|
93
|
+
privateKeyEncrypted: registerDetails.keys.kyber.privateKeyEncrypted,
|
|
94
|
+
}
|
|
95
|
+
},
|
|
83
96
|
referral: registerDetails.referral,
|
|
84
97
|
referrer: registerDetails.referrer,
|
|
85
98
|
}, this.basicHeaders());
|
|
@@ -98,9 +111,22 @@ var Auth = /** @class */ (function () {
|
|
|
98
111
|
password: registerDetails.password,
|
|
99
112
|
mnemonic: registerDetails.mnemonic,
|
|
100
113
|
salt: registerDetails.salt,
|
|
114
|
+
/**
|
|
115
|
+
/ @deprecated The individual fields for keys should not be used
|
|
116
|
+
*/
|
|
101
117
|
privateKey: registerDetails.keys.privateKeyEncrypted,
|
|
102
118
|
publicKey: registerDetails.keys.publicKey,
|
|
103
119
|
revocationKey: registerDetails.keys.revocationCertificate,
|
|
120
|
+
keys: {
|
|
121
|
+
ecc: {
|
|
122
|
+
publicKey: registerDetails.keys.ecc.publicKey,
|
|
123
|
+
privateKeyEncrypted: registerDetails.keys.ecc.privateKeyEncrypted,
|
|
124
|
+
},
|
|
125
|
+
kyber: {
|
|
126
|
+
publicKey: registerDetails.keys.kyber.publicKey,
|
|
127
|
+
privateKeyEncrypted: registerDetails.keys.kyber.privateKeyEncrypted,
|
|
128
|
+
},
|
|
129
|
+
},
|
|
104
130
|
referral: registerDetails.referral,
|
|
105
131
|
referrer: registerDetails.referrer,
|
|
106
132
|
invitationId: registerDetails.invitationId,
|
|
@@ -149,9 +175,22 @@ var Auth = /** @class */ (function () {
|
|
|
149
175
|
email: details.email,
|
|
150
176
|
password: encryptedPasswordHash,
|
|
151
177
|
tfa: details.tfaCode,
|
|
178
|
+
/**
|
|
179
|
+
/ @deprecated The individual fields for keys should not be used
|
|
180
|
+
*/
|
|
152
181
|
privateKey: keys.privateKeyEncrypted,
|
|
153
182
|
publicKey: keys.publicKey,
|
|
154
183
|
revocateKey: keys.revocationCertificate,
|
|
184
|
+
keys: {
|
|
185
|
+
ecc: {
|
|
186
|
+
publicKey: keys.ecc.publicKey,
|
|
187
|
+
privateKeyEncrypted: keys.ecc.privateKeyEncrypted,
|
|
188
|
+
},
|
|
189
|
+
kyber: {
|
|
190
|
+
publicKey: keys.kyber.publicKey,
|
|
191
|
+
privateKeyEncrypted: keys.kyber.privateKeyEncrypted,
|
|
192
|
+
}
|
|
193
|
+
},
|
|
155
194
|
}, this.basicHeaders())
|
|
156
195
|
.then(function (data) {
|
|
157
196
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -170,9 +209,20 @@ var Auth = /** @class */ (function () {
|
|
|
170
209
|
*/
|
|
171
210
|
Auth.prototype.updateKeys = function (keys, token) {
|
|
172
211
|
return this.client.patch('/user/keys', {
|
|
212
|
+
/**
|
|
213
|
+
/ @deprecated The individual fields for keys should not be used
|
|
214
|
+
*/
|
|
173
215
|
publicKey: keys.publicKey,
|
|
174
216
|
privateKey: keys.privateKeyEncrypted,
|
|
175
217
|
revocationKey: keys.revocationCertificate,
|
|
218
|
+
ecc: {
|
|
219
|
+
publicKey: keys.ecc.publicKey,
|
|
220
|
+
privateKeyEncrypted: keys.ecc.privateKeyEncrypted,
|
|
221
|
+
},
|
|
222
|
+
kyber: {
|
|
223
|
+
publicKey: keys.kyber.publicKey,
|
|
224
|
+
privateKeyEncrypted: keys.kyber.privateKeyEncrypted,
|
|
225
|
+
}
|
|
176
226
|
}, this.headersWithToken(token));
|
|
177
227
|
};
|
|
178
228
|
/**
|
package/dist/auth/types.d.ts
CHANGED
|
@@ -33,6 +33,14 @@ export interface Keys {
|
|
|
33
33
|
privateKeyEncrypted: string;
|
|
34
34
|
publicKey: string;
|
|
35
35
|
revocationCertificate: string;
|
|
36
|
+
ecc: {
|
|
37
|
+
publicKey: string;
|
|
38
|
+
privateKeyEncrypted: string;
|
|
39
|
+
};
|
|
40
|
+
kyber: {
|
|
41
|
+
publicKey: string | null;
|
|
42
|
+
privateKeyEncrypted: string | null;
|
|
43
|
+
};
|
|
36
44
|
}
|
|
37
45
|
export interface CryptoProvider {
|
|
38
46
|
encryptPasswordHash: (password: Password, encryptedSalt: string) => string;
|
|
@@ -19,6 +19,16 @@ export interface UserSettings {
|
|
|
19
19
|
privateKey: string;
|
|
20
20
|
publicKey: string;
|
|
21
21
|
revocationKey: string;
|
|
22
|
+
keys: {
|
|
23
|
+
ecc: {
|
|
24
|
+
publicKey: string;
|
|
25
|
+
privateKeyEncrypted: string;
|
|
26
|
+
};
|
|
27
|
+
kyber: {
|
|
28
|
+
publicKey: string;
|
|
29
|
+
privateKeyEncrypted: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
22
32
|
teams?: boolean;
|
|
23
33
|
appSumoDetails: AppSumoDetails | null;
|
|
24
34
|
registerCompleted: boolean;
|