@portal-hq/web 1.0.1 → 1.0.2
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/lib/commonjs/index.js +4 -4
- package/lib/commonjs/mpc/index.js +1 -1
- package/lib/esm/index.js +4 -4
- package/lib/esm/mpc/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +4 -4
- package/src/mpc/index.ts +1 -1
- package/types.d.ts +1 -0
package/lib/commonjs/index.js
CHANGED
|
@@ -144,16 +144,16 @@ class Portal {
|
|
|
144
144
|
return this.recoverWallet(cipherText, backupMethod, backupConfigs, progress);
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
ejectPrivateKey(
|
|
147
|
+
ejectPrivateKey(clientBackupCipherText, backupMethod, backupConfigs, orgBackupShare) {
|
|
148
148
|
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
-
if (
|
|
150
|
-
throw new Error('
|
|
149
|
+
if (clientBackupCipherText === '') {
|
|
150
|
+
throw new Error('clientBackupCipherText cannot be empty string.');
|
|
151
151
|
}
|
|
152
152
|
if (orgBackupShare === '') {
|
|
153
153
|
throw new Error('orgBackupShare cannot be empty string.');
|
|
154
154
|
}
|
|
155
155
|
const privateKey = yield this.mpc.eject({
|
|
156
|
-
cipherText:
|
|
156
|
+
cipherText: clientBackupCipherText,
|
|
157
157
|
backupMethod,
|
|
158
158
|
backupConfigs,
|
|
159
159
|
organizationBackupShare: orgBackupShare,
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.MpcErrorCodes = exports.MpcError = void 0;
|
|
13
13
|
const errors_1 = require("./errors");
|
|
14
14
|
const index_1 = require("../index");
|
|
15
|
-
const WEB_SDK_VERSION = '1.0.
|
|
15
|
+
const WEB_SDK_VERSION = '1.0.2';
|
|
16
16
|
class Mpc {
|
|
17
17
|
constructor({ portal }) {
|
|
18
18
|
this.configureIframe = () => {
|
package/lib/esm/index.js
CHANGED
|
@@ -138,16 +138,16 @@ class Portal {
|
|
|
138
138
|
return this.recoverWallet(cipherText, backupMethod, backupConfigs, progress);
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
ejectPrivateKey(
|
|
141
|
+
ejectPrivateKey(clientBackupCipherText, backupMethod, backupConfigs, orgBackupShare) {
|
|
142
142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
-
if (
|
|
144
|
-
throw new Error('
|
|
143
|
+
if (clientBackupCipherText === '') {
|
|
144
|
+
throw new Error('clientBackupCipherText cannot be empty string.');
|
|
145
145
|
}
|
|
146
146
|
if (orgBackupShare === '') {
|
|
147
147
|
throw new Error('orgBackupShare cannot be empty string.');
|
|
148
148
|
}
|
|
149
149
|
const privateKey = yield this.mpc.eject({
|
|
150
|
-
cipherText:
|
|
150
|
+
cipherText: clientBackupCipherText,
|
|
151
151
|
backupMethod,
|
|
152
152
|
backupConfigs,
|
|
153
153
|
organizationBackupShare: orgBackupShare,
|
package/lib/esm/mpc/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { PortalMpcError } from './errors';
|
|
11
11
|
import { BackupMethods } from '../index';
|
|
12
|
-
const WEB_SDK_VERSION = '1.0.
|
|
12
|
+
const WEB_SDK_VERSION = '1.0.2';
|
|
13
13
|
class Mpc {
|
|
14
14
|
constructor({ portal }) {
|
|
15
15
|
this.configureIframe = () => {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -220,13 +220,13 @@ class Portal {
|
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
public async ejectPrivateKey(
|
|
223
|
-
|
|
223
|
+
clientBackupCipherText: string,
|
|
224
224
|
backupMethod: BackupMethods,
|
|
225
225
|
backupConfigs: BackupConfigs,
|
|
226
226
|
orgBackupShare: string,
|
|
227
227
|
): Promise<string> {
|
|
228
|
-
if (
|
|
229
|
-
throw new Error('
|
|
228
|
+
if (clientBackupCipherText === '') {
|
|
229
|
+
throw new Error('clientBackupCipherText cannot be empty string.')
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
if (orgBackupShare === '') {
|
|
@@ -234,7 +234,7 @@ class Portal {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
const privateKey = await this.mpc.eject({
|
|
237
|
-
cipherText:
|
|
237
|
+
cipherText: clientBackupCipherText,
|
|
238
238
|
backupMethod,
|
|
239
239
|
backupConfigs,
|
|
240
240
|
organizationBackupShare: orgBackupShare,
|
package/src/mpc/index.ts
CHANGED