@internxt/sdk 1.10.5 → 1.10.7
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.d.ts +9 -0
- package/dist/auth/index.js +17 -1
- package/package.json +1 -1
package/dist/auth/index.d.ts
CHANGED
|
@@ -152,6 +152,15 @@ export declare class Auth {
|
|
|
152
152
|
* @param keys
|
|
153
153
|
*/
|
|
154
154
|
changePasswordWithLink(token: string | undefined, password: string, salt: string, mnemonic: string, keys?: PrivateKeys): Promise<void>;
|
|
155
|
+
/**
|
|
156
|
+
* Restore password with email link
|
|
157
|
+
* @param token
|
|
158
|
+
* @param password
|
|
159
|
+
* @param salt
|
|
160
|
+
* @param mnemonic
|
|
161
|
+
* @param keys
|
|
162
|
+
*/
|
|
163
|
+
changePasswordWithLinkV2(token: string | undefined, password: string, salt: string, mnemonic: string, keys?: PrivateKeys): Promise<void>;
|
|
155
164
|
legacyRecoverAccount({ token, encryptedPassword, encryptedSalt, encryptedMnemonic, eccEncryptedMnemonic, kyberEncryptedMnemonic, keys, }: ChangePasswordWithLinkPayload): Promise<void>;
|
|
156
165
|
/**
|
|
157
166
|
* Reset account with token
|
package/dist/auth/index.js
CHANGED
|
@@ -433,6 +433,22 @@ var Auth = /** @class */ (function () {
|
|
|
433
433
|
privateKeys: keys,
|
|
434
434
|
}, this.basicHeaders());
|
|
435
435
|
};
|
|
436
|
+
/**
|
|
437
|
+
* Restore password with email link
|
|
438
|
+
* @param token
|
|
439
|
+
* @param password
|
|
440
|
+
* @param salt
|
|
441
|
+
* @param mnemonic
|
|
442
|
+
* @param keys
|
|
443
|
+
*/
|
|
444
|
+
Auth.prototype.changePasswordWithLinkV2 = function (token, password, salt, mnemonic, keys) {
|
|
445
|
+
return this.client.put("/users/recover-account-v2?token=".concat(token, "&reset=false"), {
|
|
446
|
+
password: password,
|
|
447
|
+
salt: salt,
|
|
448
|
+
mnemonic: mnemonic,
|
|
449
|
+
privateKeys: keys,
|
|
450
|
+
}, this.basicHeaders());
|
|
451
|
+
};
|
|
436
452
|
Auth.prototype.legacyRecoverAccount = function (_a) {
|
|
437
453
|
var token = _a.token, encryptedPassword = _a.encryptedPassword, encryptedSalt = _a.encryptedSalt, encryptedMnemonic = _a.encryptedMnemonic, eccEncryptedMnemonic = _a.eccEncryptedMnemonic, kyberEncryptedMnemonic = _a.kyberEncryptedMnemonic, keys = _a.keys;
|
|
438
454
|
var accountRecoverPayload = {
|
|
@@ -462,7 +478,7 @@ var Auth = /** @class */ (function () {
|
|
|
462
478
|
}, this.basicHeaders());
|
|
463
479
|
};
|
|
464
480
|
Auth.prototype.basicHeaders = function () {
|
|
465
|
-
return (0, headers_1.basicHeaders)(this.appDetails.clientName, this.appDetails.clientVersion);
|
|
481
|
+
return (0, headers_1.basicHeaders)(this.appDetails.clientName, this.appDetails.clientVersion, this.appDetails.customHeaders);
|
|
466
482
|
};
|
|
467
483
|
Auth.prototype.headersWithToken = function (token) {
|
|
468
484
|
return (0, headers_1.headersWithToken)(this.appDetails.clientName, this.appDetails.clientVersion, token);
|