@dynamic-labs-wallet/browser-wallet-client 0.0.0-beta.271.1 → 0.0.0-beta.290.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/index.cjs.js +44 -39
- package/index.esm.js +44 -39
- package/package.json +4 -4
- package/src/client/client.d.ts +13 -11
- package/src/client/client.d.ts.map +1 -1
- package/src/client/iframeManager/IframeManager.d.ts +0 -1
- package/src/client/iframeManager/IframeManager.d.ts.map +1 -1
- package/src/services/iframeMessageHandler.d.ts +2 -1
- package/src/services/iframeMessageHandler.d.ts.map +1 -1
package/index.cjs.js
CHANGED
|
@@ -44,6 +44,9 @@ class iframeMessageHandler {
|
|
|
44
44
|
async backupKeySharesToGoogleDrive(request) {
|
|
45
45
|
await this.requestChannel.request('backupKeySharesToGoogleDrive', request);
|
|
46
46
|
}
|
|
47
|
+
async delegateKeyShares(request) {
|
|
48
|
+
return this.requestChannel.request('delegateKeyShares', request);
|
|
49
|
+
}
|
|
47
50
|
async restoreBackupFromGoogleDrive(request) {
|
|
48
51
|
return this.requestChannel.request('restoreBackupFromGoogleDrive', request);
|
|
49
52
|
}
|
|
@@ -226,7 +229,12 @@ class IframeManager {
|
|
|
226
229
|
const context = _extends({}, this.getIframeContext(), {
|
|
227
230
|
attempt: IframeManager.iframeLoadAttempts
|
|
228
231
|
});
|
|
229
|
-
|
|
232
|
+
// Set up timeout that will trigger iframe error, a retry will be triggered on this iframe error
|
|
233
|
+
const iframeTimeoutId = setTimeout(()=>{
|
|
234
|
+
if (iframe.onerror) {
|
|
235
|
+
iframe.onerror('Iframe load timeout');
|
|
236
|
+
}
|
|
237
|
+
}, IframeManager.iframeLoadTimeout);
|
|
230
238
|
messageListener = this.createMessageListener(iframe, iframeTimeoutId, resolve);
|
|
231
239
|
window.addEventListener('message', messageListener);
|
|
232
240
|
this.configureIframe(iframe);
|
|
@@ -269,30 +277,6 @@ class IframeManager {
|
|
|
269
277
|
}
|
|
270
278
|
};
|
|
271
279
|
}
|
|
272
|
-
setupIframeTimeoutWithRetry(messageListener, reject, iframe, attemptLoad, context) {
|
|
273
|
-
return setTimeout(()=>{
|
|
274
|
-
if (messageListener) {
|
|
275
|
-
window.removeEventListener('message', messageListener);
|
|
276
|
-
}
|
|
277
|
-
// Check if we should retry
|
|
278
|
-
if (IframeManager.iframeLoadAttempts <= IframeManager.maxRetryAttempts) {
|
|
279
|
-
this.logger.warn(`(loadIframe) Iframe load timeout on attempt ${IframeManager.iframeLoadAttempts}, retrying... Context: ${JSON.stringify(context)}`);
|
|
280
|
-
// Clean up current attempt
|
|
281
|
-
if (iframe.parentNode) {
|
|
282
|
-
iframe.parentNode.removeChild(iframe);
|
|
283
|
-
}
|
|
284
|
-
// retry if timeout
|
|
285
|
-
this.resetSharedIframe().then(()=>{
|
|
286
|
-
attemptLoad();
|
|
287
|
-
});
|
|
288
|
-
} else {
|
|
289
|
-
// Max retries reached, give up
|
|
290
|
-
this.resetSharedIframe();
|
|
291
|
-
this.logger.error(`(loadIframe) Iframe load timeout after ${IframeManager.maxRetryAttempts + 1} attempts, giving up. Context: ${JSON.stringify(context)}`);
|
|
292
|
-
reject(new Error(`(loadIframe) Iframe load timeout after ${IframeManager.maxRetryAttempts + 1} attempts, this could be network issues, incorrect iframe domain, or CORS errors that prevents iframe from being loaded or sending handshake message, context: ${JSON.stringify(context)}`));
|
|
293
|
-
}
|
|
294
|
-
}, IframeManager.iframeLoadTimeout);
|
|
295
|
-
}
|
|
296
280
|
getIframeContext() {
|
|
297
281
|
var _this_sdkVersion;
|
|
298
282
|
return {
|
|
@@ -558,7 +542,7 @@ class DynamicWalletClient extends IframeManager {
|
|
|
558
542
|
authToken
|
|
559
543
|
});
|
|
560
544
|
}
|
|
561
|
-
async signMessage({ message, accountAddress, password = undefined, signedSessionId, authToken }) {
|
|
545
|
+
async signMessage({ message, accountAddress, password = undefined, signedSessionId, authToken, mfaToken }) {
|
|
562
546
|
await this.initializeMessageTransport();
|
|
563
547
|
if (!this.iframeMessageHandler) {
|
|
564
548
|
throw new Error('Iframe message handler not initialized');
|
|
@@ -569,10 +553,11 @@ class DynamicWalletClient extends IframeManager {
|
|
|
569
553
|
accountAddress,
|
|
570
554
|
password,
|
|
571
555
|
signedSessionId,
|
|
572
|
-
authToken
|
|
556
|
+
authToken,
|
|
557
|
+
mfaToken
|
|
573
558
|
});
|
|
574
559
|
}
|
|
575
|
-
async signRawMessage({ message, accountAddress, password = undefined, signedSessionId, authToken }) {
|
|
560
|
+
async signRawMessage({ message, accountAddress, password = undefined, signedSessionId, authToken, mfaToken }) {
|
|
576
561
|
await this.initializeMessageTransport();
|
|
577
562
|
if (!this.iframeMessageHandler) {
|
|
578
563
|
throw new Error('Iframe message handler not initialized');
|
|
@@ -583,7 +568,8 @@ class DynamicWalletClient extends IframeManager {
|
|
|
583
568
|
accountAddress,
|
|
584
569
|
password,
|
|
585
570
|
signedSessionId,
|
|
586
|
-
authToken
|
|
571
|
+
authToken,
|
|
572
|
+
mfaToken
|
|
587
573
|
});
|
|
588
574
|
}
|
|
589
575
|
/**
|
|
@@ -596,7 +582,7 @@ class DynamicWalletClient extends IframeManager {
|
|
|
596
582
|
* SUI:
|
|
597
583
|
* const txBytes = await txb.build({ client });
|
|
598
584
|
* const txString = Buffer.from(txBytes).toString("hex");
|
|
599
|
-
*/ async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId, authToken }) {
|
|
585
|
+
*/ async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId, authToken, mfaToken }) {
|
|
600
586
|
await this.initializeMessageTransport();
|
|
601
587
|
if (!this.iframeMessageHandler) {
|
|
602
588
|
throw new Error('Iframe message handler not initialized');
|
|
@@ -607,10 +593,11 @@ class DynamicWalletClient extends IframeManager {
|
|
|
607
593
|
transaction,
|
|
608
594
|
password,
|
|
609
595
|
signedSessionId,
|
|
610
|
-
authToken
|
|
596
|
+
authToken,
|
|
597
|
+
mfaToken
|
|
611
598
|
});
|
|
612
599
|
}
|
|
613
|
-
async signTypedData({ accountAddress, typedData, password = undefined, signedSessionId, authToken }) {
|
|
600
|
+
async signTypedData({ accountAddress, typedData, password = undefined, signedSessionId, authToken, mfaToken }) {
|
|
614
601
|
await this.initializeMessageTransport();
|
|
615
602
|
if (!this.iframeMessageHandler) {
|
|
616
603
|
throw new Error('Iframe message handler not initialized');
|
|
@@ -621,7 +608,8 @@ class DynamicWalletClient extends IframeManager {
|
|
|
621
608
|
typedData: JSON.stringify(typedData),
|
|
622
609
|
password,
|
|
623
610
|
signedSessionId,
|
|
624
|
-
authToken
|
|
611
|
+
authToken,
|
|
612
|
+
mfaToken
|
|
625
613
|
});
|
|
626
614
|
}
|
|
627
615
|
async backupKeySharesToGoogleDrive({ accountAddress, password = undefined, signedSessionId, authToken }) {
|
|
@@ -637,6 +625,20 @@ class DynamicWalletClient extends IframeManager {
|
|
|
637
625
|
authToken
|
|
638
626
|
});
|
|
639
627
|
}
|
|
628
|
+
async delegateKeyShares({ accountAddress, password, signedSessionId, authToken, mfaToken }) {
|
|
629
|
+
await this.initializeMessageTransport();
|
|
630
|
+
if (!this.iframeMessageHandler) {
|
|
631
|
+
throw new Error('Iframe message handler not initialized');
|
|
632
|
+
}
|
|
633
|
+
return this.iframeMessageHandler.delegateKeyShares({
|
|
634
|
+
chainName: this.chainName,
|
|
635
|
+
accountAddress,
|
|
636
|
+
password,
|
|
637
|
+
signedSessionId,
|
|
638
|
+
authToken,
|
|
639
|
+
mfaToken
|
|
640
|
+
});
|
|
641
|
+
}
|
|
640
642
|
async restoreBackupFromGoogleDrive({ accountAddress, displayContainer, password, signedSessionId, authToken }) {
|
|
641
643
|
const { iframeDisplay } = await this.initializeIframeDisplayForContainer({
|
|
642
644
|
container: displayContainer
|
|
@@ -652,7 +654,7 @@ class DynamicWalletClient extends IframeManager {
|
|
|
652
654
|
authToken
|
|
653
655
|
});
|
|
654
656
|
}
|
|
655
|
-
async refreshWalletAccountShares({ accountAddress, password, signedSessionId, authToken }) {
|
|
657
|
+
async refreshWalletAccountShares({ accountAddress, password, signedSessionId, authToken, mfaToken }) {
|
|
656
658
|
await this.initializeMessageTransport();
|
|
657
659
|
if (!this.iframeMessageHandler) {
|
|
658
660
|
throw new Error('Iframe message handler not initialized');
|
|
@@ -662,10 +664,11 @@ class DynamicWalletClient extends IframeManager {
|
|
|
662
664
|
accountAddress: accountAddress,
|
|
663
665
|
password: password,
|
|
664
666
|
signedSessionId,
|
|
665
|
-
authToken
|
|
667
|
+
authToken,
|
|
668
|
+
mfaToken
|
|
666
669
|
});
|
|
667
670
|
}
|
|
668
|
-
async reshare({ accountAddress, oldThresholdSignatureScheme, newThresholdSignatureScheme, password, signedSessionId, authToken }) {
|
|
671
|
+
async reshare({ accountAddress, oldThresholdSignatureScheme, newThresholdSignatureScheme, password, signedSessionId, authToken, mfaToken }) {
|
|
669
672
|
await this.initializeMessageTransport();
|
|
670
673
|
if (!this.iframeMessageHandler) {
|
|
671
674
|
throw new Error('Iframe message handler not initialized');
|
|
@@ -677,10 +680,11 @@ class DynamicWalletClient extends IframeManager {
|
|
|
677
680
|
newThresholdSignatureScheme,
|
|
678
681
|
password,
|
|
679
682
|
signedSessionId,
|
|
680
|
-
authToken
|
|
683
|
+
authToken,
|
|
684
|
+
mfaToken
|
|
681
685
|
});
|
|
682
686
|
}
|
|
683
|
-
async exportPrivateKey({ accountAddress, displayContainer, password, signedSessionId, authToken }) {
|
|
687
|
+
async exportPrivateKey({ accountAddress, displayContainer, password, signedSessionId, authToken, mfaToken }) {
|
|
684
688
|
const { iframeDisplay } = await this.initializeIframeDisplayForContainer({
|
|
685
689
|
container: displayContainer
|
|
686
690
|
});
|
|
@@ -692,7 +696,8 @@ class DynamicWalletClient extends IframeManager {
|
|
|
692
696
|
accountAddress,
|
|
693
697
|
password,
|
|
694
698
|
signedSessionId,
|
|
695
|
-
authToken
|
|
699
|
+
authToken,
|
|
700
|
+
mfaToken
|
|
696
701
|
});
|
|
697
702
|
}
|
|
698
703
|
async verifyPassword({ accountAddress, password, walletOperation = core.WalletOperation.NO_OPERATION, signedSessionId, authToken }) {
|
package/index.esm.js
CHANGED
|
@@ -43,6 +43,9 @@ class iframeMessageHandler {
|
|
|
43
43
|
async backupKeySharesToGoogleDrive(request) {
|
|
44
44
|
await this.requestChannel.request('backupKeySharesToGoogleDrive', request);
|
|
45
45
|
}
|
|
46
|
+
async delegateKeyShares(request) {
|
|
47
|
+
return this.requestChannel.request('delegateKeyShares', request);
|
|
48
|
+
}
|
|
46
49
|
async restoreBackupFromGoogleDrive(request) {
|
|
47
50
|
return this.requestChannel.request('restoreBackupFromGoogleDrive', request);
|
|
48
51
|
}
|
|
@@ -225,7 +228,12 @@ class IframeManager {
|
|
|
225
228
|
const context = _extends({}, this.getIframeContext(), {
|
|
226
229
|
attempt: IframeManager.iframeLoadAttempts
|
|
227
230
|
});
|
|
228
|
-
|
|
231
|
+
// Set up timeout that will trigger iframe error, a retry will be triggered on this iframe error
|
|
232
|
+
const iframeTimeoutId = setTimeout(()=>{
|
|
233
|
+
if (iframe.onerror) {
|
|
234
|
+
iframe.onerror('Iframe load timeout');
|
|
235
|
+
}
|
|
236
|
+
}, IframeManager.iframeLoadTimeout);
|
|
229
237
|
messageListener = this.createMessageListener(iframe, iframeTimeoutId, resolve);
|
|
230
238
|
window.addEventListener('message', messageListener);
|
|
231
239
|
this.configureIframe(iframe);
|
|
@@ -268,30 +276,6 @@ class IframeManager {
|
|
|
268
276
|
}
|
|
269
277
|
};
|
|
270
278
|
}
|
|
271
|
-
setupIframeTimeoutWithRetry(messageListener, reject, iframe, attemptLoad, context) {
|
|
272
|
-
return setTimeout(()=>{
|
|
273
|
-
if (messageListener) {
|
|
274
|
-
window.removeEventListener('message', messageListener);
|
|
275
|
-
}
|
|
276
|
-
// Check if we should retry
|
|
277
|
-
if (IframeManager.iframeLoadAttempts <= IframeManager.maxRetryAttempts) {
|
|
278
|
-
this.logger.warn(`(loadIframe) Iframe load timeout on attempt ${IframeManager.iframeLoadAttempts}, retrying... Context: ${JSON.stringify(context)}`);
|
|
279
|
-
// Clean up current attempt
|
|
280
|
-
if (iframe.parentNode) {
|
|
281
|
-
iframe.parentNode.removeChild(iframe);
|
|
282
|
-
}
|
|
283
|
-
// retry if timeout
|
|
284
|
-
this.resetSharedIframe().then(()=>{
|
|
285
|
-
attemptLoad();
|
|
286
|
-
});
|
|
287
|
-
} else {
|
|
288
|
-
// Max retries reached, give up
|
|
289
|
-
this.resetSharedIframe();
|
|
290
|
-
this.logger.error(`(loadIframe) Iframe load timeout after ${IframeManager.maxRetryAttempts + 1} attempts, giving up. Context: ${JSON.stringify(context)}`);
|
|
291
|
-
reject(new Error(`(loadIframe) Iframe load timeout after ${IframeManager.maxRetryAttempts + 1} attempts, this could be network issues, incorrect iframe domain, or CORS errors that prevents iframe from being loaded or sending handshake message, context: ${JSON.stringify(context)}`));
|
|
292
|
-
}
|
|
293
|
-
}, IframeManager.iframeLoadTimeout);
|
|
294
|
-
}
|
|
295
279
|
getIframeContext() {
|
|
296
280
|
var _this_sdkVersion;
|
|
297
281
|
return {
|
|
@@ -557,7 +541,7 @@ class DynamicWalletClient extends IframeManager {
|
|
|
557
541
|
authToken
|
|
558
542
|
});
|
|
559
543
|
}
|
|
560
|
-
async signMessage({ message, accountAddress, password = undefined, signedSessionId, authToken }) {
|
|
544
|
+
async signMessage({ message, accountAddress, password = undefined, signedSessionId, authToken, mfaToken }) {
|
|
561
545
|
await this.initializeMessageTransport();
|
|
562
546
|
if (!this.iframeMessageHandler) {
|
|
563
547
|
throw new Error('Iframe message handler not initialized');
|
|
@@ -568,10 +552,11 @@ class DynamicWalletClient extends IframeManager {
|
|
|
568
552
|
accountAddress,
|
|
569
553
|
password,
|
|
570
554
|
signedSessionId,
|
|
571
|
-
authToken
|
|
555
|
+
authToken,
|
|
556
|
+
mfaToken
|
|
572
557
|
});
|
|
573
558
|
}
|
|
574
|
-
async signRawMessage({ message, accountAddress, password = undefined, signedSessionId, authToken }) {
|
|
559
|
+
async signRawMessage({ message, accountAddress, password = undefined, signedSessionId, authToken, mfaToken }) {
|
|
575
560
|
await this.initializeMessageTransport();
|
|
576
561
|
if (!this.iframeMessageHandler) {
|
|
577
562
|
throw new Error('Iframe message handler not initialized');
|
|
@@ -582,7 +567,8 @@ class DynamicWalletClient extends IframeManager {
|
|
|
582
567
|
accountAddress,
|
|
583
568
|
password,
|
|
584
569
|
signedSessionId,
|
|
585
|
-
authToken
|
|
570
|
+
authToken,
|
|
571
|
+
mfaToken
|
|
586
572
|
});
|
|
587
573
|
}
|
|
588
574
|
/**
|
|
@@ -595,7 +581,7 @@ class DynamicWalletClient extends IframeManager {
|
|
|
595
581
|
* SUI:
|
|
596
582
|
* const txBytes = await txb.build({ client });
|
|
597
583
|
* const txString = Buffer.from(txBytes).toString("hex");
|
|
598
|
-
*/ async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId, authToken }) {
|
|
584
|
+
*/ async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId, authToken, mfaToken }) {
|
|
599
585
|
await this.initializeMessageTransport();
|
|
600
586
|
if (!this.iframeMessageHandler) {
|
|
601
587
|
throw new Error('Iframe message handler not initialized');
|
|
@@ -606,10 +592,11 @@ class DynamicWalletClient extends IframeManager {
|
|
|
606
592
|
transaction,
|
|
607
593
|
password,
|
|
608
594
|
signedSessionId,
|
|
609
|
-
authToken
|
|
595
|
+
authToken,
|
|
596
|
+
mfaToken
|
|
610
597
|
});
|
|
611
598
|
}
|
|
612
|
-
async signTypedData({ accountAddress, typedData, password = undefined, signedSessionId, authToken }) {
|
|
599
|
+
async signTypedData({ accountAddress, typedData, password = undefined, signedSessionId, authToken, mfaToken }) {
|
|
613
600
|
await this.initializeMessageTransport();
|
|
614
601
|
if (!this.iframeMessageHandler) {
|
|
615
602
|
throw new Error('Iframe message handler not initialized');
|
|
@@ -620,7 +607,8 @@ class DynamicWalletClient extends IframeManager {
|
|
|
620
607
|
typedData: JSON.stringify(typedData),
|
|
621
608
|
password,
|
|
622
609
|
signedSessionId,
|
|
623
|
-
authToken
|
|
610
|
+
authToken,
|
|
611
|
+
mfaToken
|
|
624
612
|
});
|
|
625
613
|
}
|
|
626
614
|
async backupKeySharesToGoogleDrive({ accountAddress, password = undefined, signedSessionId, authToken }) {
|
|
@@ -636,6 +624,20 @@ class DynamicWalletClient extends IframeManager {
|
|
|
636
624
|
authToken
|
|
637
625
|
});
|
|
638
626
|
}
|
|
627
|
+
async delegateKeyShares({ accountAddress, password, signedSessionId, authToken, mfaToken }) {
|
|
628
|
+
await this.initializeMessageTransport();
|
|
629
|
+
if (!this.iframeMessageHandler) {
|
|
630
|
+
throw new Error('Iframe message handler not initialized');
|
|
631
|
+
}
|
|
632
|
+
return this.iframeMessageHandler.delegateKeyShares({
|
|
633
|
+
chainName: this.chainName,
|
|
634
|
+
accountAddress,
|
|
635
|
+
password,
|
|
636
|
+
signedSessionId,
|
|
637
|
+
authToken,
|
|
638
|
+
mfaToken
|
|
639
|
+
});
|
|
640
|
+
}
|
|
639
641
|
async restoreBackupFromGoogleDrive({ accountAddress, displayContainer, password, signedSessionId, authToken }) {
|
|
640
642
|
const { iframeDisplay } = await this.initializeIframeDisplayForContainer({
|
|
641
643
|
container: displayContainer
|
|
@@ -651,7 +653,7 @@ class DynamicWalletClient extends IframeManager {
|
|
|
651
653
|
authToken
|
|
652
654
|
});
|
|
653
655
|
}
|
|
654
|
-
async refreshWalletAccountShares({ accountAddress, password, signedSessionId, authToken }) {
|
|
656
|
+
async refreshWalletAccountShares({ accountAddress, password, signedSessionId, authToken, mfaToken }) {
|
|
655
657
|
await this.initializeMessageTransport();
|
|
656
658
|
if (!this.iframeMessageHandler) {
|
|
657
659
|
throw new Error('Iframe message handler not initialized');
|
|
@@ -661,10 +663,11 @@ class DynamicWalletClient extends IframeManager {
|
|
|
661
663
|
accountAddress: accountAddress,
|
|
662
664
|
password: password,
|
|
663
665
|
signedSessionId,
|
|
664
|
-
authToken
|
|
666
|
+
authToken,
|
|
667
|
+
mfaToken
|
|
665
668
|
});
|
|
666
669
|
}
|
|
667
|
-
async reshare({ accountAddress, oldThresholdSignatureScheme, newThresholdSignatureScheme, password, signedSessionId, authToken }) {
|
|
670
|
+
async reshare({ accountAddress, oldThresholdSignatureScheme, newThresholdSignatureScheme, password, signedSessionId, authToken, mfaToken }) {
|
|
668
671
|
await this.initializeMessageTransport();
|
|
669
672
|
if (!this.iframeMessageHandler) {
|
|
670
673
|
throw new Error('Iframe message handler not initialized');
|
|
@@ -676,10 +679,11 @@ class DynamicWalletClient extends IframeManager {
|
|
|
676
679
|
newThresholdSignatureScheme,
|
|
677
680
|
password,
|
|
678
681
|
signedSessionId,
|
|
679
|
-
authToken
|
|
682
|
+
authToken,
|
|
683
|
+
mfaToken
|
|
680
684
|
});
|
|
681
685
|
}
|
|
682
|
-
async exportPrivateKey({ accountAddress, displayContainer, password, signedSessionId, authToken }) {
|
|
686
|
+
async exportPrivateKey({ accountAddress, displayContainer, password, signedSessionId, authToken, mfaToken }) {
|
|
683
687
|
const { iframeDisplay } = await this.initializeIframeDisplayForContainer({
|
|
684
688
|
container: displayContainer
|
|
685
689
|
});
|
|
@@ -691,7 +695,8 @@ class DynamicWalletClient extends IframeManager {
|
|
|
691
695
|
accountAddress,
|
|
692
696
|
password,
|
|
693
697
|
signedSessionId,
|
|
694
|
-
authToken
|
|
698
|
+
authToken,
|
|
699
|
+
mfaToken
|
|
695
700
|
});
|
|
696
701
|
}
|
|
697
702
|
async verifyPassword({ accountAddress, password, walletOperation = WalletOperation.NO_OPERATION, signedSessionId, authToken }) {
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/browser-wallet-client",
|
|
3
|
-
"version": "0.0.0-beta.
|
|
3
|
+
"version": "0.0.0-beta.290.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@dynamic-labs-wallet/core": "0.0.0-beta.
|
|
8
|
-
"@dynamic-labs/logger": "^4.
|
|
9
|
-
"@dynamic-labs/message-transport": "^4.
|
|
7
|
+
"@dynamic-labs-wallet/core": "0.0.0-beta.290.1",
|
|
8
|
+
"@dynamic-labs/logger": "^4.25.3",
|
|
9
|
+
"@dynamic-labs/message-transport": "^4.25.3",
|
|
10
10
|
"uuid": "11.1.0"
|
|
11
11
|
},
|
|
12
12
|
"nx": {
|
package/src/client/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BackupKeySharesToGoogleDriveRequest, CreateWalletAccountRequest, CreateWalletAccountResponse, ExportClientKeysharesRequest, GetWalletResponse, ImportPrivateKeyRequest, IsPasswordEncryptedRequest, OfflineExportPrivateKeyResponse, RefreshWalletAccountSharesRequest, RequiresPasswordForOperationRequest, ReshareRequest, SignMessageRequest, SignRawMessageRequest, SignTransactionRequest, SignTypedDataRequest, UpdatePasswordRequest, VerifyPasswordRequest } from '@dynamic-labs-wallet/core';
|
|
1
|
+
import type { BackupKeySharesToGoogleDriveRequest, CreateWalletAccountRequest, CreateWalletAccountResponse, DelegateKeySharesRequest, ExportClientKeysharesRequest, GetWalletResponse, ImportPrivateKeyRequest, IsPasswordEncryptedRequest, OfflineExportPrivateKeyResponse, RefreshWalletAccountSharesRequest, RequiresPasswordForOperationRequest, ReshareRequest, SignMessageRequest, SignRawMessageRequest, SignTransactionRequest, SignTypedDataRequest, UpdatePasswordRequest, VerifyPasswordRequest } from '@dynamic-labs-wallet/core';
|
|
2
2
|
import { WalletOperation } from '@dynamic-labs-wallet/core';
|
|
3
3
|
import { IframeManager } from './iframeManager';
|
|
4
4
|
export declare class DynamicWalletClient extends IframeManager {
|
|
@@ -15,14 +15,14 @@ export declare class DynamicWalletClient extends IframeManager {
|
|
|
15
15
|
getWallet({ accountAddress, walletOperation, signedSessionId, authToken, }: {
|
|
16
16
|
accountAddress: string;
|
|
17
17
|
walletOperation?: WalletOperation;
|
|
18
|
-
signedSessionId
|
|
18
|
+
signedSessionId: string;
|
|
19
19
|
authToken?: string;
|
|
20
20
|
}): Promise<GetWalletResponse>;
|
|
21
21
|
createWalletAccount({ thresholdSignatureScheme, password, signedSessionId, authToken, }: Omit<CreateWalletAccountRequest, 'chainName'>): Promise<CreateWalletAccountResponse>;
|
|
22
22
|
requiresPasswordForOperation({ accountAddress, walletOperation, authToken, }: Omit<RequiresPasswordForOperationRequest, 'chainName'>): Promise<boolean>;
|
|
23
23
|
isPasswordEncrypted({ accountAddress, authToken, }: Omit<IsPasswordEncryptedRequest, 'chainName'>): Promise<boolean>;
|
|
24
|
-
signMessage({ message, accountAddress, password, signedSessionId, authToken, }: Omit<SignMessageRequest, 'chainName'>): Promise<string>;
|
|
25
|
-
signRawMessage({ message, accountAddress, password, signedSessionId, authToken, }: Omit<SignRawMessageRequest, 'chainName'>): Promise<string>;
|
|
24
|
+
signMessage({ message, accountAddress, password, signedSessionId, authToken, mfaToken, }: Omit<SignMessageRequest, 'chainName'>): Promise<string>;
|
|
25
|
+
signRawMessage({ message, accountAddress, password, signedSessionId, authToken, mfaToken, }: Omit<SignRawMessageRequest, 'chainName'>): Promise<string>;
|
|
26
26
|
/**
|
|
27
27
|
* Signs a transaction and returns the signature, @transaction is a string of the serialized transaction
|
|
28
28
|
* EVM:
|
|
@@ -34,24 +34,26 @@ export declare class DynamicWalletClient extends IframeManager {
|
|
|
34
34
|
* const txBytes = await txb.build({ client });
|
|
35
35
|
* const txString = Buffer.from(txBytes).toString("hex");
|
|
36
36
|
*/
|
|
37
|
-
signTransaction({ senderAddress, transaction, password, signedSessionId, authToken, }: Omit<SignTransactionRequest, 'chainName'>): Promise<string>;
|
|
38
|
-
signTypedData({ accountAddress, typedData, password, signedSessionId, authToken, }: Omit<SignTypedDataRequest, 'chainName'>): Promise<string>;
|
|
37
|
+
signTransaction({ senderAddress, transaction, password, signedSessionId, authToken, mfaToken, }: Omit<SignTransactionRequest, 'chainName'>): Promise<string>;
|
|
38
|
+
signTypedData({ accountAddress, typedData, password, signedSessionId, authToken, mfaToken, }: Omit<SignTypedDataRequest, 'chainName'>): Promise<string>;
|
|
39
39
|
backupKeySharesToGoogleDrive({ accountAddress, password, signedSessionId, authToken, }: Omit<BackupKeySharesToGoogleDriveRequest, 'chainName'>): Promise<void>;
|
|
40
|
+
delegateKeyShares({ accountAddress, password, signedSessionId, authToken, mfaToken, }: Omit<DelegateKeySharesRequest, 'chainName'>): Promise<void>;
|
|
40
41
|
restoreBackupFromGoogleDrive({ accountAddress, displayContainer, password, signedSessionId, authToken, }: {
|
|
41
42
|
accountAddress: string;
|
|
42
43
|
displayContainer: HTMLElement;
|
|
43
44
|
password?: string;
|
|
44
|
-
signedSessionId
|
|
45
|
+
signedSessionId: string;
|
|
45
46
|
authToken?: string;
|
|
46
47
|
}): Promise<void>;
|
|
47
|
-
refreshWalletAccountShares({ accountAddress, password, signedSessionId, authToken, }: Omit<RefreshWalletAccountSharesRequest, 'chainName'>): Promise<void>;
|
|
48
|
-
reshare({ accountAddress, oldThresholdSignatureScheme, newThresholdSignatureScheme, password, signedSessionId, authToken, }: Omit<ReshareRequest, 'chainName'>): Promise<void>;
|
|
49
|
-
exportPrivateKey({ accountAddress, displayContainer, password, signedSessionId, authToken, }: {
|
|
48
|
+
refreshWalletAccountShares({ accountAddress, password, signedSessionId, authToken, mfaToken, }: Omit<RefreshWalletAccountSharesRequest, 'chainName'>): Promise<void>;
|
|
49
|
+
reshare({ accountAddress, oldThresholdSignatureScheme, newThresholdSignatureScheme, password, signedSessionId, authToken, mfaToken, }: Omit<ReshareRequest, 'chainName'>): Promise<void>;
|
|
50
|
+
exportPrivateKey({ accountAddress, displayContainer, password, signedSessionId, authToken, mfaToken, }: {
|
|
50
51
|
accountAddress: string;
|
|
51
52
|
displayContainer: HTMLElement;
|
|
52
53
|
password?: string;
|
|
53
|
-
signedSessionId
|
|
54
|
+
signedSessionId: string;
|
|
54
55
|
authToken?: string;
|
|
56
|
+
mfaToken?: string;
|
|
55
57
|
}): Promise<void>;
|
|
56
58
|
verifyPassword({ accountAddress, password, walletOperation, signedSessionId, authToken, }: Omit<VerifyPasswordRequest, 'chainName'>): Promise<void>;
|
|
57
59
|
updatePassword({ accountAddress, existingPassword, newPassword, signedSessionId, authToken, }: Omit<UpdatePasswordRequest, 'chainName'>): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mCAAmC,EACnC,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,iBAAiB,EACjB,uBAAuB,EACvB,0BAA0B,EAC1B,+BAA+B,EAC/B,iCAAiC,EACjC,mCAAmC,EACnC,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,mBAAoB,SAAQ,aAAa;gBACxC,EACV,aAAa,EACb,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,KAAK,GACN,EAAE;QACD,aAAa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;IAYK,UAAU,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAW1C,SAAS,CAAC,EACd,cAAc,EACd,eAA8C,EAC9C,eAAe,EACf,SAAS,GACV,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC,eAAe,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mCAAmC,EACnC,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,iBAAiB,EACjB,uBAAuB,EACvB,0BAA0B,EAC1B,+BAA+B,EAC/B,iCAAiC,EACjC,mCAAmC,EACnC,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,mBAAoB,SAAQ,aAAa;gBACxC,EACV,aAAa,EACb,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,KAAK,GACN,EAAE;QACD,aAAa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;IAYK,UAAU,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAW1C,SAAS,CAAC,EACd,cAAc,EACd,eAA8C,EAC9C,eAAe,EACf,SAAS,GACV,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC,eAAe,EAAE,MAAM,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;IAeK,mBAAmB,CAAC,EACxB,wBAAwB,EACxB,QAAoB,EACpB,eAAe,EACf,SAAS,GACV,EAAE,IAAI,CACL,0BAA0B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AgBrD,cAAc,CAAC,EACnB,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,SAAS,GACV,EAAE,IAAI,CAAC,qBAAqB,EAAE,WAAW,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBrD,gBAAgB,CAAC,EACrB,UAAU,EACV,wBAAwB,EACxB,eAAe,EACf,SAAS,GACV,EAAE,IAAI,CACL,uBAAuB,EACvB,WAAW,CACZ,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAelC,qBAAqB,CAAC,EAC1B,cAAc,EACd,QAAQ,EACR,eAAe,EACf,SAAS,GACV,EAAE,IAAI,CAAC,4BAA4B,EAAE,WAAW,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAelE;;OAEG;IACG,uBAAuB,CAAC,EAC5B,SAAS,EACT,cAAc,GACf,EAAE;QACD,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,GAAG,OAAO,CAAC,+BAA+B,CAAC;CAoB7C"}
|
|
@@ -56,7 +56,6 @@ export declare class IframeManager {
|
|
|
56
56
|
private assignExistingIframe;
|
|
57
57
|
private createIframeLoadPromise;
|
|
58
58
|
private setupIframeEventHandlersWithRetry;
|
|
59
|
-
private setupIframeTimeoutWithRetry;
|
|
60
59
|
private getIframeContext;
|
|
61
60
|
private createMessageListener;
|
|
62
61
|
private configureIframe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IframeManager.d.ts","sourceRoot":"","sources":["../../../src/client/iframeManager/IframeManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,iCAAiC,EACvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAI3E,qBAAa,aAAa;IACxB,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,MAAM,wCAAU;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,C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Aa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;IAmBK,UAAU;IAIhB;;;OAGG;IACH,6BAA6B,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9C;;;OAGG;YACW,+BAA+B;IAS7C;;OAEG;cACa,0BAA0B;IAgC1C;;OAEG;YACW,aAAa;IAY3B;;OAEG;YACW,iBAAiB;YAcjB,UAAU;IAkBxB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,uBAAuB;IAuD/B,OAAO,CAAC,iCAAiC;IA0DzC,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,qBAAqB;IA2B7B,OAAO,CAAC,eAAe;IAkBvB,OAAO,CAAC,eAAe;IAcvB;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAyG9B;;;;;;;;OAQG;IACG,mCAAmC,CAAC,EACxC,SAAS,GACV,EAAE;QACD,SAAS,EAAE,WAAW,CAAC;KACxB,GAAG,OAAO,CAAC;QACV,MAAM,EAAE,iBAAiB,CAAC;QAC1B,aAAa,EAAE,oBAAoB,CAAC;QACpC,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,CAAC;IAiCW,OAAO;CAqBrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type MessageTransportWithDefaultOrigin, type RequestChannel } from '@dynamic-labs/message-transport';
|
|
2
|
-
import type { IframeRequestMessages, GetWalletResponse, CreateWalletAccountResponse, SignMessageRequest, RequiresPasswordForOperationRequest, SignTransactionRequest, IsPasswordEncryptedRequest, BackupKeySharesToGoogleDriveRequest, RestoreBackupFromGoogleDriveRequest, RefreshWalletAccountSharesRequest, ReshareRequest, ExportPrivateKeyRequest, VerifyPasswordRequest, UpdatePasswordRequest, ImportPrivateKeyRequest, ExportClientKeysharesRequest, OfflineExportPrivateKeyRequest, OfflineExportPrivateKeyResponse, SignRawMessageRequest, GetWalletsRequest, CreateWalletAccountRequest, GetWalletRequest, SignTypedDataRequest } from '@dynamic-labs-wallet/core';
|
|
2
|
+
import type { IframeRequestMessages, GetWalletResponse, CreateWalletAccountResponse, SignMessageRequest, RequiresPasswordForOperationRequest, SignTransactionRequest, IsPasswordEncryptedRequest, BackupKeySharesToGoogleDriveRequest, RestoreBackupFromGoogleDriveRequest, RefreshWalletAccountSharesRequest, ReshareRequest, ExportPrivateKeyRequest, VerifyPasswordRequest, UpdatePasswordRequest, ImportPrivateKeyRequest, ExportClientKeysharesRequest, OfflineExportPrivateKeyRequest, OfflineExportPrivateKeyResponse, SignRawMessageRequest, GetWalletsRequest, CreateWalletAccountRequest, GetWalletRequest, SignTypedDataRequest, DelegateKeySharesRequest } from '@dynamic-labs-wallet/core';
|
|
3
3
|
export declare class iframeMessageHandler {
|
|
4
4
|
requestChannel: RequestChannel<IframeRequestMessages>;
|
|
5
5
|
constructor(messageTransport: MessageTransportWithDefaultOrigin);
|
|
@@ -12,6 +12,7 @@ export declare class iframeMessageHandler {
|
|
|
12
12
|
signTransaction(request: SignTransactionRequest): Promise<string>;
|
|
13
13
|
isPasswordEncrypted(request: IsPasswordEncryptedRequest): Promise<boolean>;
|
|
14
14
|
backupKeySharesToGoogleDrive(request: BackupKeySharesToGoogleDriveRequest): Promise<void>;
|
|
15
|
+
delegateKeyShares(request: DelegateKeySharesRequest): Promise<void>;
|
|
15
16
|
restoreBackupFromGoogleDrive(request: RestoreBackupFromGoogleDriveRequest): Promise<void>;
|
|
16
17
|
refreshWalletAccountShares(request: RefreshWalletAccountSharesRequest): Promise<void>;
|
|
17
18
|
reshare(request: ReshareRequest): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iframeMessageHandler.d.ts","sourceRoot":"","sources":["../../src/services/iframeMessageHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iCAAiC,EACtC,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,2BAA2B,EAC3B,kBAAkB,EAClB,mCAAmC,EACnC,sBAAsB,EACtB,0BAA0B,EAC1B,mCAAmC,EACnC,mCAAmC,EACnC,iCAAiC,EACjC,cAAc,EACd,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,qBAAqB,EACrB,iBAAiB,EACjB,0BAA0B,EAC1B,gBAAgB,EAChB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"iframeMessageHandler.d.ts","sourceRoot":"","sources":["../../src/services/iframeMessageHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iCAAiC,EACtC,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,2BAA2B,EAC3B,kBAAkB,EAClB,mCAAmC,EACnC,sBAAsB,EACtB,0BAA0B,EAC1B,mCAAmC,EACnC,mCAAmC,EACnC,iCAAiC,EACjC,cAAc,EACd,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,qBAAqB,EACrB,iBAAiB,EACjB,0BAA0B,EAC1B,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AAEnC,qBAAa,oBAAoB;IAC/B,cAAc,EAAE,cAAc,CAAC,qBAAqB,CAAC,CAAC;gBAE1C,gBAAgB,EAAE,iCAAiC;IAKzD,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAIpE,SAAS,CAAC,OAAO,EAAE,gB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