@dynamic-labs/waas-svm 4.19.1 → 4.19.3
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
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.19.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.19.2...v4.19.3) (2025-05-28)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* rerender issue with Slush wallet pop up appearing multiple times ([#8817](https://github.com/dynamic-labs/dynamic-auth/issues/8817)) ([bea0da6](https://github.com/dynamic-labs/dynamic-auth/commit/bea0da647bab983610ebbf18a6ca66ba0ac569bf))
|
|
8
|
+
|
|
9
|
+
### [4.19.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.19.1...v4.19.2) (2025-05-27)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* always set the current wallet address when creating WalletClient for that wallet ([#8800](https://github.com/dynamic-labs/dynamic-auth/issues/8800)) ([3282902](https://github.com/dynamic-labs/dynamic-auth/commit/3282902581d429b66c91c533f5573964174e43d6))
|
|
15
|
+
|
|
2
16
|
### [4.19.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.19.0...v4.19.1) (2025-05-26)
|
|
3
17
|
|
|
4
18
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/waas-svm",
|
|
3
|
-
"version": "4.19.
|
|
3
|
+
"version": "4.19.3",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"@solana/web3.js": "1.98.1",
|
|
23
23
|
"eventemitter3": "5.0.1",
|
|
24
24
|
"bs58": "5.0.0",
|
|
25
|
-
"@dynamic-labs/assert-package-version": "4.19.
|
|
26
|
-
"@dynamic-labs/logger": "4.19.
|
|
27
|
-
"@dynamic-labs/rpc-providers": "4.19.
|
|
28
|
-
"@dynamic-labs/solana-core": "4.19.
|
|
29
|
-
"@dynamic-labs/types": "4.19.
|
|
30
|
-
"@dynamic-labs/utils": "4.19.
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "4.19.
|
|
25
|
+
"@dynamic-labs/assert-package-version": "4.19.3",
|
|
26
|
+
"@dynamic-labs/logger": "4.19.3",
|
|
27
|
+
"@dynamic-labs/rpc-providers": "4.19.3",
|
|
28
|
+
"@dynamic-labs/solana-core": "4.19.3",
|
|
29
|
+
"@dynamic-labs/types": "4.19.3",
|
|
30
|
+
"@dynamic-labs/utils": "4.19.3",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "4.19.3"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {}
|
|
34
34
|
}
|
|
@@ -12,6 +12,21 @@ var utils = require('@dynamic-labs/utils');
|
|
|
12
12
|
var logger = require('../../utils/logger.cjs');
|
|
13
13
|
var DynamicWaasSVMSigner = require('../signer/DynamicWaasSVMSigner.cjs');
|
|
14
14
|
|
|
15
|
+
// This will need to be moved to a base class once we have base classes for waas connectors
|
|
16
|
+
class WaasExportHandler {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.iframeStamper = null;
|
|
19
|
+
}
|
|
20
|
+
setIframeStamper(iframe) {
|
|
21
|
+
this.iframeStamper = iframe;
|
|
22
|
+
}
|
|
23
|
+
clear() {
|
|
24
|
+
if (this.iframeStamper) {
|
|
25
|
+
this.iframeStamper.remove();
|
|
26
|
+
this.iframeStamper = null;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
15
30
|
class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
|
|
16
31
|
connect() {
|
|
17
32
|
throw new Error('Method not implemented.');
|
|
@@ -22,6 +37,7 @@ class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
|
|
|
22
37
|
this.overrideKey = 'dynamicwaas';
|
|
23
38
|
this.isEmbeddedWallet = true;
|
|
24
39
|
this.walletUiUtils = props.walletUiUtils;
|
|
40
|
+
this.__exportHandler = new WaasExportHandler();
|
|
25
41
|
}
|
|
26
42
|
setGetAuthTokenFunction(getAuthToken) {
|
|
27
43
|
this.getAuthToken = getAuthToken;
|
|
@@ -241,12 +257,16 @@ class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
|
|
|
241
257
|
if (!displayContainer) {
|
|
242
258
|
throw new Error('Missing display container for export private key');
|
|
243
259
|
}
|
|
260
|
+
this.__exportHandler.setIframeStamper(displayContainer);
|
|
244
261
|
yield walletClient.exportPrivateKey({
|
|
245
262
|
accountAddress: targetAccountAddress,
|
|
246
263
|
displayContainer,
|
|
247
264
|
});
|
|
248
265
|
});
|
|
249
266
|
}
|
|
267
|
+
getExportHandler() {
|
|
268
|
+
return this.__exportHandler;
|
|
269
|
+
}
|
|
250
270
|
importPrivateKey(_a) {
|
|
251
271
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ privateKey, thresholdSignatureScheme = 'TWO_OF_TWO', }) {
|
|
252
272
|
const walletClient = this.getWaasWalletClient();
|
|
@@ -14,6 +14,7 @@ export declare class DynamicWaasSVMConnector extends SolanaWalletConnector imple
|
|
|
14
14
|
private environmentId?;
|
|
15
15
|
private getAuthToken?;
|
|
16
16
|
private dynamicWaasClient;
|
|
17
|
+
private __exportHandler;
|
|
17
18
|
activeAccountAddress: string | undefined;
|
|
18
19
|
private baseApiUrl?;
|
|
19
20
|
private relayUrl?;
|
|
@@ -51,6 +52,9 @@ export declare class DynamicWaasSVMConnector extends SolanaWalletConnector imple
|
|
|
51
52
|
accountAddress?: string;
|
|
52
53
|
displayContainer?: HTMLIFrameElement;
|
|
53
54
|
}): Promise<void>;
|
|
55
|
+
getExportHandler(): {
|
|
56
|
+
clear: () => void;
|
|
57
|
+
};
|
|
54
58
|
importPrivateKey({ privateKey, thresholdSignatureScheme, }: {
|
|
55
59
|
privateKey: string;
|
|
56
60
|
thresholdSignatureScheme?: string;
|
|
@@ -8,6 +8,21 @@ import { DynamicError } from '@dynamic-labs/utils';
|
|
|
8
8
|
import { logger } from '../../utils/logger.js';
|
|
9
9
|
import { DynamicWaasSVMSigner } from '../signer/DynamicWaasSVMSigner.js';
|
|
10
10
|
|
|
11
|
+
// This will need to be moved to a base class once we have base classes for waas connectors
|
|
12
|
+
class WaasExportHandler {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.iframeStamper = null;
|
|
15
|
+
}
|
|
16
|
+
setIframeStamper(iframe) {
|
|
17
|
+
this.iframeStamper = iframe;
|
|
18
|
+
}
|
|
19
|
+
clear() {
|
|
20
|
+
if (this.iframeStamper) {
|
|
21
|
+
this.iframeStamper.remove();
|
|
22
|
+
this.iframeStamper = null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
11
26
|
class DynamicWaasSVMConnector extends SolanaWalletConnector {
|
|
12
27
|
connect() {
|
|
13
28
|
throw new Error('Method not implemented.');
|
|
@@ -18,6 +33,7 @@ class DynamicWaasSVMConnector extends SolanaWalletConnector {
|
|
|
18
33
|
this.overrideKey = 'dynamicwaas';
|
|
19
34
|
this.isEmbeddedWallet = true;
|
|
20
35
|
this.walletUiUtils = props.walletUiUtils;
|
|
36
|
+
this.__exportHandler = new WaasExportHandler();
|
|
21
37
|
}
|
|
22
38
|
setGetAuthTokenFunction(getAuthToken) {
|
|
23
39
|
this.getAuthToken = getAuthToken;
|
|
@@ -237,12 +253,16 @@ class DynamicWaasSVMConnector extends SolanaWalletConnector {
|
|
|
237
253
|
if (!displayContainer) {
|
|
238
254
|
throw new Error('Missing display container for export private key');
|
|
239
255
|
}
|
|
256
|
+
this.__exportHandler.setIframeStamper(displayContainer);
|
|
240
257
|
yield walletClient.exportPrivateKey({
|
|
241
258
|
accountAddress: targetAccountAddress,
|
|
242
259
|
displayContainer,
|
|
243
260
|
});
|
|
244
261
|
});
|
|
245
262
|
}
|
|
263
|
+
getExportHandler() {
|
|
264
|
+
return this.__exportHandler;
|
|
265
|
+
}
|
|
246
266
|
importPrivateKey(_a) {
|
|
247
267
|
return __awaiter(this, arguments, void 0, function* ({ privateKey, thresholdSignatureScheme = 'TWO_OF_TWO', }) {
|
|
248
268
|
const walletClient = this.getWaasWalletClient();
|