@dynamic-labs/waas 4.90.0 → 4.91.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/CHANGELOG.md +17 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +10 -10
- package/src/DynamicWaasMixin.cjs +33 -9
- package/src/DynamicWaasMixin.d.ts +14 -0
- package/src/DynamicWaasMixin.js +33 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.91.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.90.0...v4.91.0) (2026-06-23)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **midnight:** add WaaS layer to @dynamic-labs/midnight ([#11006](https://github.com/dynamic-labs/dynamic-auth/issues/11006)) ([01b9d16](https://github.com/dynamic-labs/dynamic-auth/commit/01b9d16d0ba92a141a9be546ca00cca4029894d5))
|
|
8
|
+
* **sdk-react-core:** widget support for Midnight multi-address display + export hiding ([#11008](https://github.com/dynamic-labs/dynamic-auth/issues/11008)) ([87320b4](https://github.com/dynamic-labs/dynamic-auth/commit/87320b4d6e286b88e17f144641346e16a27e9e71))
|
|
9
|
+
* **waas:** wire session public key through host backup ops for keyshare diagnostics [DYNT-1280] ([#11675](https://github.com/dynamic-labs/dynamic-auth/issues/11675)) ([4f7981c](https://github.com/dynamic-labs/dynamic-auth/commit/4f7981c009930469dec7b3dec93f20f99bbe5498))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **ethereum-aa:** make ZeroDevConnector inert instead of throwing when ZeroDev config is absent ([#11610](https://github.com/dynamic-labs/dynamic-auth/issues/11610)) ([a3aab6a](https://github.com/dynamic-labs/dynamic-auth/commit/a3aab6a97e2e996f96b725f9336704b844f79603))
|
|
15
|
+
* **react-native-extension:** fall back to react-native-webview when embedded native module is unavailable ([#11683](https://github.com/dynamic-labs/dynamic-auth/issues/11683)) ([3f8d92c](https://github.com/dynamic-labs/dynamic-auth/commit/3f8d92ca0c327128b16e3355ab2f4e63d2c8e731))
|
|
16
|
+
* **sdk-react-core:** warn instead of throwing when ZeroDev connector is absent ([#11611](https://github.com/dynamic-labs/dynamic-auth/issues/11611)) ([5836252](https://github.com/dynamic-labs/dynamic-auth/commit/58362524e45205399c0fdc5b92414190d1929e0b))
|
|
17
|
+
* **waas-evm:** sign EOA transactions with the resolved chainId, not the connector default ([#11653](https://github.com/dynamic-labs/dynamic-auth/issues/11653)) ([e634098](https://github.com/dynamic-labs/dynamic-auth/commit/e634098f0f23f4c53f92a580db6f4aacbd6b1f92))
|
|
18
|
+
|
|
2
19
|
## [4.90.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.89.0...v4.90.0) (2026-06-19)
|
|
3
20
|
|
|
4
21
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/waas",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.91.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@dynamic-labs-sdk/client": "1.12.1",
|
|
20
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
20
|
+
"@dynamic-labs/assert-package-version": "4.91.0",
|
|
21
21
|
"@dynamic-labs/sdk-api-core": "0.0.1046",
|
|
22
|
-
"@dynamic-labs-wallet/browser-wallet-client": "1.0.
|
|
22
|
+
"@dynamic-labs-wallet/browser-wallet-client": "1.0.44",
|
|
23
23
|
"@dynamic-labs-wallet/forward-mpc-client": "0.12.0",
|
|
24
|
-
"@dynamic-labs/ethereum-core": "4.
|
|
25
|
-
"@dynamic-labs/logger": "4.
|
|
26
|
-
"@dynamic-labs/solana-core": "4.
|
|
27
|
-
"@dynamic-labs/sui-core": "4.
|
|
28
|
-
"@dynamic-labs/utils": "4.
|
|
29
|
-
"@dynamic-labs/wallet-book": "4.
|
|
30
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
24
|
+
"@dynamic-labs/ethereum-core": "4.91.0",
|
|
25
|
+
"@dynamic-labs/logger": "4.91.0",
|
|
26
|
+
"@dynamic-labs/solana-core": "4.91.0",
|
|
27
|
+
"@dynamic-labs/sui-core": "4.91.0",
|
|
28
|
+
"@dynamic-labs/utils": "4.91.0",
|
|
29
|
+
"@dynamic-labs/wallet-book": "4.91.0",
|
|
30
|
+
"@dynamic-labs/wallet-connector-core": "4.91.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {}
|
|
33
33
|
}
|
package/src/DynamicWaasMixin.cjs
CHANGED
|
@@ -36,6 +36,9 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
36
36
|
setGetAuthTokenFunction(getAuthToken) {
|
|
37
37
|
this.getAuthToken = getAuthToken;
|
|
38
38
|
}
|
|
39
|
+
setOnUnauthorizedFunction(onUnauthorized) {
|
|
40
|
+
this.onUnauthorized = onUnauthorized;
|
|
41
|
+
}
|
|
39
42
|
setWaasAuthMode(authMode) {
|
|
40
43
|
this.authMode = authMode;
|
|
41
44
|
}
|
|
@@ -124,9 +127,12 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
124
127
|
setGetSignedSessionIdFunction(getSignedSessionId) {
|
|
125
128
|
this.getSignedSessionId = getSignedSessionId;
|
|
126
129
|
}
|
|
130
|
+
setGetSessionPublicKeyFunction(getSessionPublicKey) {
|
|
131
|
+
this.getSessionPublicKey = getSessionPublicKey;
|
|
132
|
+
}
|
|
127
133
|
delegateKeyShares(_a) {
|
|
128
134
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
129
|
-
var _b, _c;
|
|
135
|
+
var _b, _c, _d;
|
|
130
136
|
if (!accountAddress) {
|
|
131
137
|
throw new Error('Account address is required');
|
|
132
138
|
}
|
|
@@ -144,6 +150,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
144
150
|
accountAddress,
|
|
145
151
|
authToken,
|
|
146
152
|
password: resolvedPassword,
|
|
153
|
+
sessionPublicKey: yield ((_d = this.getSessionPublicKey) === null || _d === void 0 ? void 0 : _d.call(this)),
|
|
147
154
|
signedSessionId,
|
|
148
155
|
});
|
|
149
156
|
});
|
|
@@ -163,6 +170,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
163
170
|
ALEO: 'ALEO',
|
|
164
171
|
BTC: 'BTC',
|
|
165
172
|
EVM: 'EVM',
|
|
173
|
+
MIDNIGHT: 'MIDNIGHT',
|
|
166
174
|
SOL: 'SVM',
|
|
167
175
|
STELLAR: 'STELLAR',
|
|
168
176
|
SUI: 'SUI',
|
|
@@ -197,10 +205,14 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
197
205
|
eagerlyRecoverKeyShares: true,
|
|
198
206
|
environmentId: this.environmentId,
|
|
199
207
|
sdkVersion: _package.version,
|
|
200
|
-
}, Object.assign(Object.assign({}, (utils.PlatformService.isWaasSecureStorageSupported
|
|
208
|
+
}, Object.assign(Object.assign(Object.assign(Object.assign({}, (utils.PlatformService.isWaasSecureStorageSupported
|
|
201
209
|
? { secureStorage: createWaasClientSecureStorage.createWaasClientSecureStorage() }
|
|
202
210
|
: {})), (this.getSignedSessionId
|
|
203
211
|
? { getSignedSessionId: this.getSignedSessionId }
|
|
212
|
+
: {})), (this.getSessionPublicKey
|
|
213
|
+
? { getSessionPublicKey: this.getSessionPublicKey }
|
|
214
|
+
: {})), (this.onUnauthorized
|
|
215
|
+
? { onUnauthorized: this.onUnauthorized }
|
|
204
216
|
: {})));
|
|
205
217
|
this.instrumentAsync({
|
|
206
218
|
context: traceContext,
|
|
@@ -339,7 +351,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
339
351
|
}
|
|
340
352
|
backupKeySharesToGoogleDrive(_a) {
|
|
341
353
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, googleDriveAccessToken, }) {
|
|
342
|
-
var _b, _c;
|
|
354
|
+
var _b, _c, _d;
|
|
343
355
|
if (!accountAddress) {
|
|
344
356
|
throw new utils.DynamicError('Account address is required');
|
|
345
357
|
}
|
|
@@ -354,6 +366,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
354
366
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
355
367
|
googleDriveAccessToken,
|
|
356
368
|
password: resolvedPassword,
|
|
369
|
+
sessionPublicKey: yield ((_d = this.getSessionPublicKey) === null || _d === void 0 ? void 0 : _d.call(this)),
|
|
357
370
|
signedSessionId,
|
|
358
371
|
});
|
|
359
372
|
});
|
|
@@ -380,7 +393,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
380
393
|
}
|
|
381
394
|
backupKeySharesToICloud(_a) {
|
|
382
395
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
383
|
-
var _b, _c;
|
|
396
|
+
var _b, _c, _d;
|
|
384
397
|
if (!accountAddress) {
|
|
385
398
|
throw new utils.DynamicError('Account address is required');
|
|
386
399
|
}
|
|
@@ -394,6 +407,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
394
407
|
accountAddress,
|
|
395
408
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
396
409
|
password: resolvedPassword,
|
|
410
|
+
sessionPublicKey: yield ((_d = this.getSessionPublicKey) === null || _d === void 0 ? void 0 : _d.call(this)),
|
|
397
411
|
signedSessionId,
|
|
398
412
|
});
|
|
399
413
|
});
|
|
@@ -420,7 +434,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
420
434
|
}
|
|
421
435
|
refreshWalletAccountShares(_a) {
|
|
422
436
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
423
|
-
var _b, _c, _d, _e, _f, _g;
|
|
437
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
|
424
438
|
if (!accountAddress) {
|
|
425
439
|
throw new utils.DynamicError('Account address is required');
|
|
426
440
|
}
|
|
@@ -448,13 +462,14 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
448
462
|
elevatedAccessToken,
|
|
449
463
|
mfaToken,
|
|
450
464
|
password: resolvedPassword,
|
|
465
|
+
sessionPublicKey: yield ((_h = this.getSessionPublicKey) === null || _h === void 0 ? void 0 : _h.call(this)),
|
|
451
466
|
signedSessionId: backupSignedSessionId,
|
|
452
467
|
});
|
|
453
468
|
});
|
|
454
469
|
}
|
|
455
470
|
reshareWalletAccountShares(_a) {
|
|
456
471
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, thresholdSignatureScheme, password, }) {
|
|
457
|
-
var _b, _c, _d, _e;
|
|
472
|
+
var _b, _c, _d, _e, _f;
|
|
458
473
|
if (!accountAddress) {
|
|
459
474
|
throw new utils.DynamicError('Account address is required');
|
|
460
475
|
}
|
|
@@ -484,13 +499,14 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
484
499
|
newThresholdSignatureScheme: thresholdSignatureScheme,
|
|
485
500
|
oldThresholdSignatureScheme,
|
|
486
501
|
password: resolvedPassword,
|
|
502
|
+
sessionPublicKey: yield ((_f = this.getSessionPublicKey) === null || _f === void 0 ? void 0 : _f.call(this)),
|
|
487
503
|
signedSessionId,
|
|
488
504
|
});
|
|
489
505
|
});
|
|
490
506
|
}
|
|
491
507
|
revokeDelegation(_a) {
|
|
492
508
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
493
|
-
var _b, _c;
|
|
509
|
+
var _b, _c, _d;
|
|
494
510
|
if (!accountAddress) {
|
|
495
511
|
throw new utils.DynamicError('Account address is required');
|
|
496
512
|
}
|
|
@@ -504,6 +520,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
504
520
|
accountAddress,
|
|
505
521
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
506
522
|
password: resolvedPassword,
|
|
523
|
+
sessionPublicKey: yield ((_d = this.getSessionPublicKey) === null || _d === void 0 ? void 0 : _d.call(this)),
|
|
507
524
|
signedSessionId,
|
|
508
525
|
});
|
|
509
526
|
});
|
|
@@ -525,7 +542,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
525
542
|
const encryptedWallets = wallets.filter((w) => { var _a; return (_a = w.clientKeySharesBackupInfo) === null || _a === void 0 ? void 0 : _a.passwordEncrypted; });
|
|
526
543
|
const passwordUpdateBatchId = crypto.randomUUID();
|
|
527
544
|
yield Promise.all(encryptedWallets.map((wallet) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
528
|
-
var _b;
|
|
545
|
+
var _b, _c;
|
|
529
546
|
const signedSessionId = yield this.getSignedSessionId();
|
|
530
547
|
yield walletClient.updatePassword({
|
|
531
548
|
accountAddress: wallet.accountAddress,
|
|
@@ -533,6 +550,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
533
550
|
existingPassword: resolvedExistingPassword,
|
|
534
551
|
newPassword,
|
|
535
552
|
passwordUpdateBatchId,
|
|
553
|
+
sessionPublicKey: yield ((_c = this.getSessionPublicKey) === null || _c === void 0 ? void 0 : _c.call(this)),
|
|
536
554
|
signedSessionId,
|
|
537
555
|
});
|
|
538
556
|
})));
|
|
@@ -550,13 +568,14 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
550
568
|
const wallets = yield walletClient.getAllWallets();
|
|
551
569
|
const passwordUpdateBatchId = crypto.randomUUID();
|
|
552
570
|
yield Promise.all(wallets.map((wallet) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
553
|
-
var _b;
|
|
571
|
+
var _b, _c;
|
|
554
572
|
const signedSessionId = yield this.getSignedSessionId();
|
|
555
573
|
yield walletClient.setPassword({
|
|
556
574
|
accountAddress: wallet.accountAddress,
|
|
557
575
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
558
576
|
newPassword,
|
|
559
577
|
passwordUpdateBatchId,
|
|
578
|
+
sessionPublicKey: yield ((_c = this.getSessionPublicKey) === null || _c === void 0 ? void 0 : _c.call(this)),
|
|
560
579
|
signedSessionId,
|
|
561
580
|
});
|
|
562
581
|
})));
|
|
@@ -787,6 +806,11 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
787
806
|
}
|
|
788
807
|
});
|
|
789
808
|
}
|
|
809
|
+
getPrivateBalance() {
|
|
810
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
811
|
+
throw new utils.DynamicError(`getPrivateBalance is not supported for ${this.chainName} wallets`);
|
|
812
|
+
});
|
|
813
|
+
}
|
|
790
814
|
}
|
|
791
815
|
return DynamicWaasMixin;
|
|
792
816
|
};
|
|
@@ -15,6 +15,7 @@ export declare const withDynamicWaas: <T extends abstract new (...args: any[]) =
|
|
|
15
15
|
overrideKey: string;
|
|
16
16
|
isEmbeddedWallet: boolean;
|
|
17
17
|
getSignedSessionId?: (() => Promise<string>) | undefined;
|
|
18
|
+
getSessionPublicKey?: (() => Promise<string | undefined>) | undefined;
|
|
18
19
|
getMfaToken?: ((props?: {
|
|
19
20
|
mfaAction?: MFAAction;
|
|
20
21
|
}) => Promise<string | undefined>) | undefined;
|
|
@@ -23,6 +24,7 @@ export declare const withDynamicWaas: <T extends abstract new (...args: any[]) =
|
|
|
23
24
|
getElevatedAccessToken?: ((props: {
|
|
24
25
|
scope: TokenScope;
|
|
25
26
|
}) => Promise<string | undefined>) | undefined;
|
|
27
|
+
onUnauthorized?: (() => void | Promise<void>) | undefined;
|
|
26
28
|
environmentId?: string | undefined;
|
|
27
29
|
baseApiUrl?: string | undefined;
|
|
28
30
|
relayUrl?: string | undefined;
|
|
@@ -34,6 +36,7 @@ export declare const withDynamicWaas: <T extends abstract new (...args: any[]) =
|
|
|
34
36
|
__exportHandler: WaasExportHandler;
|
|
35
37
|
validateActiveWallet(expectedAddress: string): Promise<void>;
|
|
36
38
|
setGetAuthTokenFunction(getAuthToken: () => string): void;
|
|
39
|
+
setOnUnauthorizedFunction(onUnauthorized: () => void | Promise<void>): void;
|
|
37
40
|
setWaasAuthMode(authMode: 'cookie' | 'header'): void;
|
|
38
41
|
setGetMfaTokenFunction(getMfaToken: (props?: {
|
|
39
42
|
mfaAction?: MFAAction;
|
|
@@ -69,6 +72,7 @@ export declare const withDynamicWaas: <T extends abstract new (...args: any[]) =
|
|
|
69
72
|
setBaseClientKeysharesRelayApiUrl(baseClientKeysharesRelayApiUrl?: string): void;
|
|
70
73
|
setRelayUrl(relayUrl: string): void;
|
|
71
74
|
setGetSignedSessionIdFunction(getSignedSessionId: () => Promise<string>): void;
|
|
75
|
+
setGetSessionPublicKeyFunction(getSessionPublicKey: () => Promise<string | undefined>): void;
|
|
72
76
|
delegateKeyShares({ accountAddress, password, }: {
|
|
73
77
|
accountAddress: string;
|
|
74
78
|
password?: string;
|
|
@@ -199,4 +203,14 @@ export declare const withDynamicWaas: <T extends abstract new (...args: any[]) =
|
|
|
199
203
|
fn: (timing: InstrumentationTimer) => Promise<T_1>;
|
|
200
204
|
context?: Record<string, any> | undefined;
|
|
201
205
|
}): Promise<T_1>;
|
|
206
|
+
getPrivateBalance(): Promise<{
|
|
207
|
+
unshielded: Record<string, string>;
|
|
208
|
+
shielded: Record<string, string>;
|
|
209
|
+
dust: {
|
|
210
|
+
balance: string;
|
|
211
|
+
cap: string;
|
|
212
|
+
};
|
|
213
|
+
address: string;
|
|
214
|
+
dustSynced: boolean;
|
|
215
|
+
}>;
|
|
202
216
|
}) & T;
|
package/src/DynamicWaasMixin.js
CHANGED
|
@@ -32,6 +32,9 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
32
32
|
setGetAuthTokenFunction(getAuthToken) {
|
|
33
33
|
this.getAuthToken = getAuthToken;
|
|
34
34
|
}
|
|
35
|
+
setOnUnauthorizedFunction(onUnauthorized) {
|
|
36
|
+
this.onUnauthorized = onUnauthorized;
|
|
37
|
+
}
|
|
35
38
|
setWaasAuthMode(authMode) {
|
|
36
39
|
this.authMode = authMode;
|
|
37
40
|
}
|
|
@@ -120,9 +123,12 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
120
123
|
setGetSignedSessionIdFunction(getSignedSessionId) {
|
|
121
124
|
this.getSignedSessionId = getSignedSessionId;
|
|
122
125
|
}
|
|
126
|
+
setGetSessionPublicKeyFunction(getSessionPublicKey) {
|
|
127
|
+
this.getSessionPublicKey = getSessionPublicKey;
|
|
128
|
+
}
|
|
123
129
|
delegateKeyShares(_a) {
|
|
124
130
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
125
|
-
var _b, _c;
|
|
131
|
+
var _b, _c, _d;
|
|
126
132
|
if (!accountAddress) {
|
|
127
133
|
throw new Error('Account address is required');
|
|
128
134
|
}
|
|
@@ -140,6 +146,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
140
146
|
accountAddress,
|
|
141
147
|
authToken,
|
|
142
148
|
password: resolvedPassword,
|
|
149
|
+
sessionPublicKey: yield ((_d = this.getSessionPublicKey) === null || _d === void 0 ? void 0 : _d.call(this)),
|
|
143
150
|
signedSessionId,
|
|
144
151
|
});
|
|
145
152
|
});
|
|
@@ -159,6 +166,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
159
166
|
ALEO: 'ALEO',
|
|
160
167
|
BTC: 'BTC',
|
|
161
168
|
EVM: 'EVM',
|
|
169
|
+
MIDNIGHT: 'MIDNIGHT',
|
|
162
170
|
SOL: 'SVM',
|
|
163
171
|
STELLAR: 'STELLAR',
|
|
164
172
|
SUI: 'SUI',
|
|
@@ -193,10 +201,14 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
193
201
|
eagerlyRecoverKeyShares: true,
|
|
194
202
|
environmentId: this.environmentId,
|
|
195
203
|
sdkVersion: version,
|
|
196
|
-
}, Object.assign(Object.assign({}, (PlatformService.isWaasSecureStorageSupported
|
|
204
|
+
}, Object.assign(Object.assign(Object.assign(Object.assign({}, (PlatformService.isWaasSecureStorageSupported
|
|
197
205
|
? { secureStorage: createWaasClientSecureStorage() }
|
|
198
206
|
: {})), (this.getSignedSessionId
|
|
199
207
|
? { getSignedSessionId: this.getSignedSessionId }
|
|
208
|
+
: {})), (this.getSessionPublicKey
|
|
209
|
+
? { getSessionPublicKey: this.getSessionPublicKey }
|
|
210
|
+
: {})), (this.onUnauthorized
|
|
211
|
+
? { onUnauthorized: this.onUnauthorized }
|
|
200
212
|
: {})));
|
|
201
213
|
this.instrumentAsync({
|
|
202
214
|
context: traceContext,
|
|
@@ -335,7 +347,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
335
347
|
}
|
|
336
348
|
backupKeySharesToGoogleDrive(_a) {
|
|
337
349
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, googleDriveAccessToken, }) {
|
|
338
|
-
var _b, _c;
|
|
350
|
+
var _b, _c, _d;
|
|
339
351
|
if (!accountAddress) {
|
|
340
352
|
throw new DynamicError('Account address is required');
|
|
341
353
|
}
|
|
@@ -350,6 +362,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
350
362
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
351
363
|
googleDriveAccessToken,
|
|
352
364
|
password: resolvedPassword,
|
|
365
|
+
sessionPublicKey: yield ((_d = this.getSessionPublicKey) === null || _d === void 0 ? void 0 : _d.call(this)),
|
|
353
366
|
signedSessionId,
|
|
354
367
|
});
|
|
355
368
|
});
|
|
@@ -376,7 +389,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
376
389
|
}
|
|
377
390
|
backupKeySharesToICloud(_a) {
|
|
378
391
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
379
|
-
var _b, _c;
|
|
392
|
+
var _b, _c, _d;
|
|
380
393
|
if (!accountAddress) {
|
|
381
394
|
throw new DynamicError('Account address is required');
|
|
382
395
|
}
|
|
@@ -390,6 +403,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
390
403
|
accountAddress,
|
|
391
404
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
392
405
|
password: resolvedPassword,
|
|
406
|
+
sessionPublicKey: yield ((_d = this.getSessionPublicKey) === null || _d === void 0 ? void 0 : _d.call(this)),
|
|
393
407
|
signedSessionId,
|
|
394
408
|
});
|
|
395
409
|
});
|
|
@@ -416,7 +430,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
416
430
|
}
|
|
417
431
|
refreshWalletAccountShares(_a) {
|
|
418
432
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
419
|
-
var _b, _c, _d, _e, _f, _g;
|
|
433
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
|
420
434
|
if (!accountAddress) {
|
|
421
435
|
throw new DynamicError('Account address is required');
|
|
422
436
|
}
|
|
@@ -444,13 +458,14 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
444
458
|
elevatedAccessToken,
|
|
445
459
|
mfaToken,
|
|
446
460
|
password: resolvedPassword,
|
|
461
|
+
sessionPublicKey: yield ((_h = this.getSessionPublicKey) === null || _h === void 0 ? void 0 : _h.call(this)),
|
|
447
462
|
signedSessionId: backupSignedSessionId,
|
|
448
463
|
});
|
|
449
464
|
});
|
|
450
465
|
}
|
|
451
466
|
reshareWalletAccountShares(_a) {
|
|
452
467
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, thresholdSignatureScheme, password, }) {
|
|
453
|
-
var _b, _c, _d, _e;
|
|
468
|
+
var _b, _c, _d, _e, _f;
|
|
454
469
|
if (!accountAddress) {
|
|
455
470
|
throw new DynamicError('Account address is required');
|
|
456
471
|
}
|
|
@@ -480,13 +495,14 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
480
495
|
newThresholdSignatureScheme: thresholdSignatureScheme,
|
|
481
496
|
oldThresholdSignatureScheme,
|
|
482
497
|
password: resolvedPassword,
|
|
498
|
+
sessionPublicKey: yield ((_f = this.getSessionPublicKey) === null || _f === void 0 ? void 0 : _f.call(this)),
|
|
483
499
|
signedSessionId,
|
|
484
500
|
});
|
|
485
501
|
});
|
|
486
502
|
}
|
|
487
503
|
revokeDelegation(_a) {
|
|
488
504
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
489
|
-
var _b, _c;
|
|
505
|
+
var _b, _c, _d;
|
|
490
506
|
if (!accountAddress) {
|
|
491
507
|
throw new DynamicError('Account address is required');
|
|
492
508
|
}
|
|
@@ -500,6 +516,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
500
516
|
accountAddress,
|
|
501
517
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
502
518
|
password: resolvedPassword,
|
|
519
|
+
sessionPublicKey: yield ((_d = this.getSessionPublicKey) === null || _d === void 0 ? void 0 : _d.call(this)),
|
|
503
520
|
signedSessionId,
|
|
504
521
|
});
|
|
505
522
|
});
|
|
@@ -521,7 +538,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
521
538
|
const encryptedWallets = wallets.filter((w) => { var _a; return (_a = w.clientKeySharesBackupInfo) === null || _a === void 0 ? void 0 : _a.passwordEncrypted; });
|
|
522
539
|
const passwordUpdateBatchId = crypto.randomUUID();
|
|
523
540
|
yield Promise.all(encryptedWallets.map((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
524
|
-
var _b;
|
|
541
|
+
var _b, _c;
|
|
525
542
|
const signedSessionId = yield this.getSignedSessionId();
|
|
526
543
|
yield walletClient.updatePassword({
|
|
527
544
|
accountAddress: wallet.accountAddress,
|
|
@@ -529,6 +546,7 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
529
546
|
existingPassword: resolvedExistingPassword,
|
|
530
547
|
newPassword,
|
|
531
548
|
passwordUpdateBatchId,
|
|
549
|
+
sessionPublicKey: yield ((_c = this.getSessionPublicKey) === null || _c === void 0 ? void 0 : _c.call(this)),
|
|
532
550
|
signedSessionId,
|
|
533
551
|
});
|
|
534
552
|
})));
|
|
@@ -546,13 +564,14 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
546
564
|
const wallets = yield walletClient.getAllWallets();
|
|
547
565
|
const passwordUpdateBatchId = crypto.randomUUID();
|
|
548
566
|
yield Promise.all(wallets.map((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
549
|
-
var _b;
|
|
567
|
+
var _b, _c;
|
|
550
568
|
const signedSessionId = yield this.getSignedSessionId();
|
|
551
569
|
yield walletClient.setPassword({
|
|
552
570
|
accountAddress: wallet.accountAddress,
|
|
553
571
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
554
572
|
newPassword,
|
|
555
573
|
passwordUpdateBatchId,
|
|
574
|
+
sessionPublicKey: yield ((_c = this.getSessionPublicKey) === null || _c === void 0 ? void 0 : _c.call(this)),
|
|
556
575
|
signedSessionId,
|
|
557
576
|
});
|
|
558
577
|
})));
|
|
@@ -783,6 +802,11 @@ const withDynamicWaas = (BaseClass) => {
|
|
|
783
802
|
}
|
|
784
803
|
});
|
|
785
804
|
}
|
|
805
|
+
getPrivateBalance() {
|
|
806
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
807
|
+
throw new DynamicError(`getPrivateBalance is not supported for ${this.chainName} wallets`);
|
|
808
|
+
});
|
|
809
|
+
}
|
|
786
810
|
}
|
|
787
811
|
return DynamicWaasMixin;
|
|
788
812
|
};
|