@dynamic-labs/waas-svm 4.9.2-preview.0 → 4.9.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,5 +1,32 @@
1
1
 
2
- ### [4.9.2-preview.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.1...v4.9.2-preview.0) (2025-03-11)
2
+ ### [4.9.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.2...v4.9.3) (2025-03-14)
3
+
4
+
5
+ ### Features
6
+
7
+ * allow adding extra text to ToS and PP footer using custom css ([#8290](https://github.com/dynamic-labs/dynamic-auth/issues/8290)) ([0f6eb26](https://github.com/dynamic-labs/dynamic-auth/commit/0f6eb2666ea93a32360710ba5ac14eac53e07e2d))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * log out if there is a mismatch in user and wallet state ([#8300](https://github.com/dynamic-labs/dynamic-auth/issues/8300)) ([82ec2ad](https://github.com/dynamic-labs/dynamic-auth/commit/82ec2add1682a576d00dfe13aa1b9cccecf96688))
13
+ * sol sponsored tx for v3 ([#8288](https://github.com/dynamic-labs/dynamic-auth/issues/8288)) ([c466fba](https://github.com/dynamic-labs/dynamic-auth/commit/c466fba417d39641631e29104ec9c156dfdf7647))
14
+ * v3 existing wallet could not log in again ([#8282](https://github.com/dynamic-labs/dynamic-auth/issues/8282)) ([c2d68ad](https://github.com/dynamic-labs/dynamic-auth/commit/c2d68adf575fcce371e438076184ef590f346c9f))
15
+
16
+ ### [4.9.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.1...v4.9.2) (2025-03-12)
17
+
18
+
19
+ ### Features
20
+
21
+ * **QNTM-2951:** update sdk styles ([#8214](https://github.com/dynamic-labs/dynamic-auth/issues/8214)) ([45cefa8](https://github.com/dynamic-labs/dynamic-auth/commit/45cefa82bdaad769c63ffeab4fb48f88ac855461))
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * embedded widget race condition that would show both embedded and non-embedded widgets at the same time ([#8208](https://github.com/dynamic-labs/dynamic-auth/issues/8208)) ([031fb77](https://github.com/dynamic-labs/dynamic-auth/commit/031fb775c10daa383bf56ab7ba5fa4cf6ae9451c))
27
+ * **iframe-setup:** require the initial parent url when using an iframe ([#8268](https://github.com/dynamic-labs/dynamic-auth/issues/8268)) ([258e8a1](https://github.com/dynamic-labs/dynamic-auth/commit/258e8a128c31b8695518f9943bc74de9fce63196))
28
+ * improve WalletConnect experience ([#8201](https://github.com/dynamic-labs/dynamic-auth/issues/8201)) ([a09b16d](https://github.com/dynamic-labs/dynamic-auth/commit/a09b16de2ccd3cbba89f70a8ded4b7656f09f807)), closes [#8202](https://github.com/dynamic-labs/dynamic-auth/issues/8202) [#8207](https://github.com/dynamic-labs/dynamic-auth/issues/8207)
29
+ * prevent closing modal when mfa view is required ([#8156](https://github.com/dynamic-labs/dynamic-auth/issues/8156)) ([c34b245](https://github.com/dynamic-labs/dynamic-auth/commit/c34b24509e3f96046e72150b055d9c820f98706f))
3
30
 
4
31
  ### [4.9.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.0...v4.9.1) (2025-03-11)
5
32
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.9.2-preview.0";
6
+ var version = "4.9.3";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.9.2-preview.0";
2
+ var version = "4.9.3";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/waas-svm",
3
- "version": "4.9.2-preview.0",
3
+ "version": "4.9.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",
@@ -18,16 +18,16 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs-wallet/svm": "0.0.33",
21
+ "@dynamic-labs-wallet/svm": "0.0.43",
22
22
  "@solana/web3.js": "1.98.0",
23
23
  "eventemitter3": "5.0.1",
24
- "@dynamic-labs/assert-package-version": "4.9.2-preview.0",
25
- "@dynamic-labs/logger": "4.9.2-preview.0",
26
- "@dynamic-labs/rpc-providers": "4.9.2-preview.0",
27
- "@dynamic-labs/solana-core": "4.9.2-preview.0",
28
- "@dynamic-labs/types": "4.9.2-preview.0",
29
- "@dynamic-labs/utils": "4.9.2-preview.0",
30
- "@dynamic-labs/wallet-connector-core": "4.9.2-preview.0"
24
+ "@dynamic-labs/assert-package-version": "4.9.3",
25
+ "@dynamic-labs/logger": "4.9.3",
26
+ "@dynamic-labs/rpc-providers": "4.9.3",
27
+ "@dynamic-labs/solana-core": "4.9.3",
28
+ "@dynamic-labs/types": "4.9.3",
29
+ "@dynamic-labs/utils": "4.9.3",
30
+ "@dynamic-labs/wallet-connector-core": "4.9.3"
31
31
  },
32
32
  "peerDependencies": {}
33
33
  }
@@ -30,6 +30,9 @@ class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
30
30
  setBaseApiUrl(baseApiUrl) {
31
31
  this.baseApiUrl = baseApiUrl;
32
32
  }
33
+ setRelayUrl(relayUrl) {
34
+ this.relayUrl = relayUrl;
35
+ }
33
36
  setActiveAccountAddress(accountAddress) {
34
37
  this.activeAccountAddress = accountAddress;
35
38
  }
@@ -45,7 +48,7 @@ class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
45
48
  return new svm.DynamicSvmWalletClient({
46
49
  authToken,
47
50
  baseApiUrl: this.baseApiUrl,
48
- baseMPCRelayApiUrl: 'relay.dynamic-preprod.xyz',
51
+ baseMPCRelayApiUrl: this.relayUrl || 'relay.dynamic-preprod.xyz',
49
52
  environmentId: this.environmentId,
50
53
  });
51
54
  }
@@ -71,10 +74,10 @@ class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
71
74
  });
72
75
  }
73
76
  createWalletAccount() {
74
- return _tslib.__awaiter(this, void 0, void 0, function* () {
77
+ return _tslib.__awaiter(this, arguments, void 0, function* ({ thresholdSignatureScheme = 'TWO_OF_TWO', } = {}) {
75
78
  const walletClient = this.getWaasWalletClient();
76
79
  const createdWallet = yield walletClient.createWalletAccount({
77
- thresholdSignatureScheme: 'TWO_OF_THREE',
80
+ thresholdSignatureScheme: thresholdSignatureScheme,
78
81
  });
79
82
  return createdWallet;
80
83
  });
@@ -82,6 +85,9 @@ class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
82
85
  signMessage(message) {
83
86
  return _tslib.__awaiter(this, void 0, void 0, function* () {
84
87
  const walletClient = this.getWaasWalletClient();
88
+ if (!this.activeAccountAddress) {
89
+ throw new Error('Active account address is required');
90
+ }
85
91
  const signedMessage = yield walletClient.signMessage({
86
92
  accountAddress: this.activeAccountAddress,
87
93
  message,
@@ -131,7 +137,10 @@ class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
131
137
  }
132
138
  const connection = this.getWalletClient();
133
139
  const signedTransaction = yield this.signTransaction(transaction);
134
- const signature = yield connection.sendRawTransaction(signedTransaction.serialize(), options);
140
+ const signature = yield connection.sendRawTransaction(signedTransaction.serialize({
141
+ requireAllSignatures: false,
142
+ verifySignatures: true,
143
+ }), options);
135
144
  // Listen for transaction confirmation with timeout
136
145
  return new Promise((resolve, reject) => {
137
146
  const timeout = setTimeout(() => {
@@ -1,7 +1,8 @@
1
1
  import { DynamicSvmWalletClient } from '@dynamic-labs-wallet/svm';
2
2
  import { Connection, Transaction, VersionedTransaction, SendOptions } from '@solana/web3.js';
3
3
  import { ISolanaSigner, SolanaWalletConnector, SolanaWalletConnectorOpts } from '@dynamic-labs/solana-core';
4
- export declare class DynamicWaasSVMConnector extends SolanaWalletConnector {
4
+ import { IDynamicWaasConnector } from '@dynamic-labs/wallet-connector-core';
5
+ export declare class DynamicWaasSVMConnector extends SolanaWalletConnector implements IDynamicWaasConnector {
5
6
  connect(): Promise<void>;
6
7
  name: string;
7
8
  overrideKey: string;
@@ -11,15 +12,19 @@ export declare class DynamicWaasSVMConnector extends SolanaWalletConnector {
11
12
  private dynamicWaasClient;
12
13
  activeAccountAddress: string | undefined;
13
14
  private baseApiUrl?;
15
+ private relayUrl?;
14
16
  constructor(props: SolanaWalletConnectorOpts);
15
17
  setGetAuthTokenFunction(getAuthToken: () => string): void;
16
18
  setEnvironmentId(environmentId: string): void;
17
19
  setBaseApiUrl(baseApiUrl: string): void;
20
+ setRelayUrl(relayUrl: string): void;
18
21
  private setActiveAccountAddress;
19
22
  createDynamicWaasClient(): DynamicSvmWalletClient;
20
23
  getWaasWalletClient(): DynamicSvmWalletClient;
21
24
  validateActiveWallet(expectedAddress: string): Promise<void>;
22
- createWalletAccount(): Promise<{
25
+ createWalletAccount({ thresholdSignatureScheme, }?: {
26
+ thresholdSignatureScheme?: string;
27
+ }): Promise<{
23
28
  accountAddress: string;
24
29
  rawPublicKey: Uint8Array;
25
30
  clientKeyShares: any[];
@@ -26,6 +26,9 @@ class DynamicWaasSVMConnector extends SolanaWalletConnector {
26
26
  setBaseApiUrl(baseApiUrl) {
27
27
  this.baseApiUrl = baseApiUrl;
28
28
  }
29
+ setRelayUrl(relayUrl) {
30
+ this.relayUrl = relayUrl;
31
+ }
29
32
  setActiveAccountAddress(accountAddress) {
30
33
  this.activeAccountAddress = accountAddress;
31
34
  }
@@ -41,7 +44,7 @@ class DynamicWaasSVMConnector extends SolanaWalletConnector {
41
44
  return new DynamicSvmWalletClient({
42
45
  authToken,
43
46
  baseApiUrl: this.baseApiUrl,
44
- baseMPCRelayApiUrl: 'relay.dynamic-preprod.xyz',
47
+ baseMPCRelayApiUrl: this.relayUrl || 'relay.dynamic-preprod.xyz',
45
48
  environmentId: this.environmentId,
46
49
  });
47
50
  }
@@ -67,10 +70,10 @@ class DynamicWaasSVMConnector extends SolanaWalletConnector {
67
70
  });
68
71
  }
69
72
  createWalletAccount() {
70
- return __awaiter(this, void 0, void 0, function* () {
73
+ return __awaiter(this, arguments, void 0, function* ({ thresholdSignatureScheme = 'TWO_OF_TWO', } = {}) {
71
74
  const walletClient = this.getWaasWalletClient();
72
75
  const createdWallet = yield walletClient.createWalletAccount({
73
- thresholdSignatureScheme: 'TWO_OF_THREE',
76
+ thresholdSignatureScheme: thresholdSignatureScheme,
74
77
  });
75
78
  return createdWallet;
76
79
  });
@@ -78,6 +81,9 @@ class DynamicWaasSVMConnector extends SolanaWalletConnector {
78
81
  signMessage(message) {
79
82
  return __awaiter(this, void 0, void 0, function* () {
80
83
  const walletClient = this.getWaasWalletClient();
84
+ if (!this.activeAccountAddress) {
85
+ throw new Error('Active account address is required');
86
+ }
81
87
  const signedMessage = yield walletClient.signMessage({
82
88
  accountAddress: this.activeAccountAddress,
83
89
  message,
@@ -127,7 +133,10 @@ class DynamicWaasSVMConnector extends SolanaWalletConnector {
127
133
  }
128
134
  const connection = this.getWalletClient();
129
135
  const signedTransaction = yield this.signTransaction(transaction);
130
- const signature = yield connection.sendRawTransaction(signedTransaction.serialize(), options);
136
+ const signature = yield connection.sendRawTransaction(signedTransaction.serialize({
137
+ requireAllSignatures: false,
138
+ verifySignatures: true,
139
+ }), options);
131
140
  // Listen for transaction confirmation with timeout
132
141
  return new Promise((resolve, reject) => {
133
142
  const timeout = setTimeout(() => {