@dynamic-labs-wallet/browser-wallet-client 0.0.0-beta.164.3 → 0.0.0-beta.164.4
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 +12 -6
- package/index.esm.js +12 -6
- package/package.json +2 -2
- package/src/client/client.d.ts +11 -3
- package/src/client/client.d.ts.map +1 -1
package/index.cjs.js
CHANGED
|
@@ -415,23 +415,29 @@ class DynamicWalletClient {
|
|
|
415
415
|
password
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
|
-
async refreshWalletAccountShares(
|
|
418
|
+
async refreshWalletAccountShares({ accountAddress, password }) {
|
|
419
419
|
await this.initializeMessageTransport();
|
|
420
420
|
if (!this.iframeMessageHandler) {
|
|
421
421
|
throw new Error('Iframe message handler not initialized');
|
|
422
422
|
}
|
|
423
423
|
return this.iframeMessageHandler.refreshWalletAccountShares({
|
|
424
424
|
chainName: this.chainName,
|
|
425
|
-
accountAddress:
|
|
426
|
-
password:
|
|
425
|
+
accountAddress: accountAddress,
|
|
426
|
+
password: password
|
|
427
427
|
});
|
|
428
428
|
}
|
|
429
|
-
async reshare(
|
|
429
|
+
async reshare({ accountAddress, oldThresholdSignatureScheme, newThresholdSignatureScheme, password }) {
|
|
430
430
|
await this.initializeMessageTransport();
|
|
431
431
|
if (!this.iframeMessageHandler) {
|
|
432
432
|
throw new Error('Iframe message handler not initialized');
|
|
433
433
|
}
|
|
434
|
-
return this.iframeMessageHandler.reshare(
|
|
434
|
+
return this.iframeMessageHandler.reshare({
|
|
435
|
+
chainName: this.chainName,
|
|
436
|
+
accountAddress,
|
|
437
|
+
oldThresholdSignatureScheme,
|
|
438
|
+
newThresholdSignatureScheme,
|
|
439
|
+
password
|
|
440
|
+
});
|
|
435
441
|
}
|
|
436
442
|
async exportPrivateKey({ accountAddress, displayContainer, password }) {
|
|
437
443
|
const { iframeDisplay } = await this.initializeIframeDisplayForContainer({
|
|
@@ -513,7 +519,7 @@ class DynamicWalletClient {
|
|
|
513
519
|
cleanup() {
|
|
514
520
|
if (this.iframe) {
|
|
515
521
|
DynamicWalletClient.iframeInstanceCount--;
|
|
516
|
-
if (DynamicWalletClient.iframeInstanceCount === 0) {
|
|
522
|
+
if (DynamicWalletClient.sharedIframe && DynamicWalletClient.iframeInstanceCount === 0) {
|
|
517
523
|
document.body.removeChild(DynamicWalletClient.sharedIframe);
|
|
518
524
|
DynamicWalletClient.sharedIframe = null;
|
|
519
525
|
DynamicWalletClient.iframeLoadPromise = null;
|
package/index.esm.js
CHANGED
|
@@ -414,23 +414,29 @@ class DynamicWalletClient {
|
|
|
414
414
|
password
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
|
-
async refreshWalletAccountShares(
|
|
417
|
+
async refreshWalletAccountShares({ accountAddress, password }) {
|
|
418
418
|
await this.initializeMessageTransport();
|
|
419
419
|
if (!this.iframeMessageHandler) {
|
|
420
420
|
throw new Error('Iframe message handler not initialized');
|
|
421
421
|
}
|
|
422
422
|
return this.iframeMessageHandler.refreshWalletAccountShares({
|
|
423
423
|
chainName: this.chainName,
|
|
424
|
-
accountAddress:
|
|
425
|
-
password:
|
|
424
|
+
accountAddress: accountAddress,
|
|
425
|
+
password: password
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
|
-
async reshare(
|
|
428
|
+
async reshare({ accountAddress, oldThresholdSignatureScheme, newThresholdSignatureScheme, password }) {
|
|
429
429
|
await this.initializeMessageTransport();
|
|
430
430
|
if (!this.iframeMessageHandler) {
|
|
431
431
|
throw new Error('Iframe message handler not initialized');
|
|
432
432
|
}
|
|
433
|
-
return this.iframeMessageHandler.reshare(
|
|
433
|
+
return this.iframeMessageHandler.reshare({
|
|
434
|
+
chainName: this.chainName,
|
|
435
|
+
accountAddress,
|
|
436
|
+
oldThresholdSignatureScheme,
|
|
437
|
+
newThresholdSignatureScheme,
|
|
438
|
+
password
|
|
439
|
+
});
|
|
434
440
|
}
|
|
435
441
|
async exportPrivateKey({ accountAddress, displayContainer, password }) {
|
|
436
442
|
const { iframeDisplay } = await this.initializeIframeDisplayForContainer({
|
|
@@ -512,7 +518,7 @@ class DynamicWalletClient {
|
|
|
512
518
|
cleanup() {
|
|
513
519
|
if (this.iframe) {
|
|
514
520
|
DynamicWalletClient.iframeInstanceCount--;
|
|
515
|
-
if (DynamicWalletClient.iframeInstanceCount === 0) {
|
|
521
|
+
if (DynamicWalletClient.sharedIframe && DynamicWalletClient.iframeInstanceCount === 0) {
|
|
516
522
|
document.body.removeChild(DynamicWalletClient.sharedIframe);
|
|
517
523
|
DynamicWalletClient.sharedIframe = null;
|
|
518
524
|
DynamicWalletClient.iframeLoadPromise = null;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/browser-wallet-client",
|
|
3
|
-
"version": "0.0.0-beta.164.
|
|
3
|
+
"version": "0.0.0-beta.164.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@dynamic-labs-wallet/core": "0.0.0-beta.164.
|
|
6
|
+
"@dynamic-labs-wallet/core": "0.0.0-beta.164.4",
|
|
7
7
|
"@dynamic-labs/message-transport": "^4.9.9",
|
|
8
8
|
"@dynamic-labs/logger": "^4.9.9",
|
|
9
9
|
"@noble/hashes": "1.7.1"
|
package/src/client/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageTransportWithDefaultOrigin } from '@dynamic-labs/message-transport';
|
|
2
2
|
import { iframeMessageHandler } from '../services/iframeMessageHandler';
|
|
3
|
-
import type { ThresholdSignatureScheme, GetWalletResponse, CreateWalletAccountResponse, RequiresPasswordForOperationRequest, SignMessageRequest, IsPasswordEncryptedRequest, BackupKeySharesToGoogleDriveRequest,
|
|
3
|
+
import type { ThresholdSignatureScheme, GetWalletResponse, CreateWalletAccountResponse, RequiresPasswordForOperationRequest, SignMessageRequest, IsPasswordEncryptedRequest, BackupKeySharesToGoogleDriveRequest, VerifyPasswordRequest, UpdatePasswordRequest, ImportPrivateKeyRequest, ExportClientKeysharesRequest, OfflineExportPrivateKeyResponse, SignRawMessageRequest } from '@dynamic-labs-wallet/core';
|
|
4
4
|
import { WalletOperation } from '@dynamic-labs-wallet/core';
|
|
5
5
|
import { EcdsaKeygenResult, Ed25519KeygenResult } from '../../../internal/web';
|
|
6
6
|
export declare class DynamicWalletClient {
|
|
@@ -104,8 +104,16 @@ export declare class DynamicWalletClient {
|
|
|
104
104
|
displayContainer: HTMLElement;
|
|
105
105
|
password?: string;
|
|
106
106
|
}): Promise<void>;
|
|
107
|
-
refreshWalletAccountShares(
|
|
108
|
-
|
|
107
|
+
refreshWalletAccountShares({ accountAddress, password, }: {
|
|
108
|
+
accountAddress: string;
|
|
109
|
+
password?: string;
|
|
110
|
+
}): Promise<void>;
|
|
111
|
+
reshare({ accountAddress, oldThresholdSignatureScheme, newThresholdSignatureScheme, password, }: {
|
|
112
|
+
accountAddress: string;
|
|
113
|
+
oldThresholdSignatureScheme: ThresholdSignatureScheme;
|
|
114
|
+
newThresholdSignatureScheme: ThresholdSignatureScheme;
|
|
115
|
+
password?: string;
|
|
116
|
+
}): Promise<void>;
|
|
109
117
|
exportPrivateKey({ accountAddress, displayContainer, password, }: {
|
|
110
118
|
accountAddress: string;
|
|
111
119
|
displayContainer: HTMLElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,iCAAiC,EACvC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,2BAA2B,EAC3B,mCAAmC,EACnC,kBAAkB,EAClB,0BAA0B,EAC1B,mCAAmC,EACnC,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources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