@dynamic-labs/waas-evm 4.22.2 → 4.22.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/CHANGELOG.md +9 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/DynamicWaasEVMConnector.cjs +12 -12
- package/src/DynamicWaasEVMConnector.d.ts +2 -2
- package/src/DynamicWaasEVMConnector.js +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.22.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.3...v4.22.4) (2025-07-08)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* intialize waas wallet client in react sdk ([#9125](https://github.com/dynamic-labs/dynamic-auth/issues/9125)) ([c59a3d6](https://github.com/dynamic-labs/dynamic-auth/commit/c59a3d6aeeb3cc001949354a218f1fafc08bd448))
|
|
8
|
+
|
|
9
|
+
### [4.22.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.2...v4.22.3) (2025-07-08)
|
|
10
|
+
|
|
2
11
|
### [4.22.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.1...v4.22.2) (2025-07-08)
|
|
3
12
|
|
|
4
13
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/waas-evm",
|
|
3
|
-
"version": "4.22.
|
|
3
|
+
"version": "4.22.4",
|
|
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",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@dynamic-labs/sdk-api-core": "0.0.706",
|
|
22
22
|
"viem": "^2.28.4",
|
|
23
|
-
"@dynamic-labs/assert-package-version": "4.22.
|
|
24
|
-
"@dynamic-labs/ethereum-core": "4.22.
|
|
25
|
-
"@dynamic-labs/logger": "4.22.
|
|
26
|
-
"@dynamic-labs/types": "4.22.
|
|
27
|
-
"@dynamic-labs/utils": "4.22.
|
|
28
|
-
"@dynamic-labs/waas": "4.22.
|
|
29
|
-
"@dynamic-labs/wallet-connector-core": "4.22.
|
|
23
|
+
"@dynamic-labs/assert-package-version": "4.22.4",
|
|
24
|
+
"@dynamic-labs/ethereum-core": "4.22.4",
|
|
25
|
+
"@dynamic-labs/logger": "4.22.4",
|
|
26
|
+
"@dynamic-labs/types": "4.22.4",
|
|
27
|
+
"@dynamic-labs/utils": "4.22.4",
|
|
28
|
+
"@dynamic-labs/waas": "4.22.4",
|
|
29
|
+
"@dynamic-labs/wallet-connector-core": "4.22.4"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {}
|
|
32
32
|
}
|
|
@@ -143,7 +143,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
143
143
|
validateActiveWallet(expectedAddress) {
|
|
144
144
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
145
145
|
var _a, _b, _c;
|
|
146
|
-
const walletClient = this.getWaasWalletClient();
|
|
146
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
147
147
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
148
148
|
const targetWallet = yield walletClient.getWallet({
|
|
149
149
|
accountAddress: expectedAddress,
|
|
@@ -162,7 +162,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
162
162
|
getViemAccount(_a) {
|
|
163
163
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, }) {
|
|
164
164
|
var _b;
|
|
165
|
-
const client = this.getWaasWalletClient();
|
|
165
|
+
const client = yield this.getWaasWalletClient();
|
|
166
166
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
167
167
|
return accounts.toAccount({
|
|
168
168
|
address: accountAddress,
|
|
@@ -225,7 +225,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
225
225
|
createWalletAccount() {
|
|
226
226
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ thresholdSignatureScheme = 'TWO_OF_TWO', } = {}) {
|
|
227
227
|
var _a, _b;
|
|
228
|
-
const walletClient = this.getWaasWalletClient();
|
|
228
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
229
229
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
230
230
|
const createdWallet = yield walletClient.createWalletAccount({
|
|
231
231
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -251,7 +251,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
251
251
|
exportPrivateKey() {
|
|
252
252
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, displayContainer, password, } = {}) {
|
|
253
253
|
var _a, _b;
|
|
254
|
-
const walletClient = this.getWaasWalletClient();
|
|
254
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
255
255
|
const targetAccountAddress = accountAddress || ((_a = this.getActiveAccount()) === null || _a === void 0 ? void 0 : _a.address);
|
|
256
256
|
if (!targetAccountAddress) {
|
|
257
257
|
throw new Error('Account address is required');
|
|
@@ -274,7 +274,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
274
274
|
importPrivateKey(_a) {
|
|
275
275
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ privateKey, thresholdSignatureScheme = 'TWO_OF_TWO', }) {
|
|
276
276
|
var _b, _c;
|
|
277
|
-
const walletClient = this.getWaasWalletClient();
|
|
277
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
278
278
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
279
279
|
if (!signedSessionId) {
|
|
280
280
|
throw new Error('Signed session ID is required');
|
|
@@ -295,7 +295,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
295
295
|
}
|
|
296
296
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
297
297
|
this.setActiveAccount(accountAddress);
|
|
298
|
-
const walletClient = this.getWaasWalletClient();
|
|
298
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
299
299
|
yield walletClient.exportClientKeyshares({
|
|
300
300
|
accountAddress,
|
|
301
301
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
@@ -311,7 +311,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
311
311
|
throw new Error('Account address is required');
|
|
312
312
|
}
|
|
313
313
|
this.setActiveAccount(accountAddress);
|
|
314
|
-
const walletClient = this.getWaasWalletClient();
|
|
314
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
315
315
|
return walletClient.backupKeySharesToGoogleDrive({
|
|
316
316
|
accountAddress,
|
|
317
317
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -326,7 +326,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
326
326
|
throw new Error('Account address is required');
|
|
327
327
|
}
|
|
328
328
|
this.setActiveAccount(accountAddress);
|
|
329
|
-
const walletClient = this.getWaasWalletClient();
|
|
329
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
330
330
|
return walletClient.refreshWalletAccountShares({
|
|
331
331
|
accountAddress,
|
|
332
332
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -341,7 +341,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
341
341
|
throw new Error('Account address is required');
|
|
342
342
|
}
|
|
343
343
|
this.setActiveAccount(accountAddress);
|
|
344
|
-
const walletClient = this.getWaasWalletClient();
|
|
344
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
345
345
|
return walletClient.updatePassword({
|
|
346
346
|
accountAddress,
|
|
347
347
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -360,7 +360,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
360
360
|
throw new Error('Message must be 64 characters long');
|
|
361
361
|
}
|
|
362
362
|
this.setActiveAccount(accountAddress);
|
|
363
|
-
const walletClient = this.getWaasWalletClient();
|
|
363
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
364
364
|
return walletClient.signRawMessage({
|
|
365
365
|
accountAddress,
|
|
366
366
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -451,7 +451,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
451
451
|
throw new Error('Required clients not found');
|
|
452
452
|
}
|
|
453
453
|
const { address } = signer.account;
|
|
454
|
-
const walletClient = this.getWaasWalletClient();
|
|
454
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
455
455
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
456
456
|
const signature = yield walletClient.signRawMessage({
|
|
457
457
|
accountAddress: address,
|
|
@@ -497,7 +497,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
497
497
|
}
|
|
498
498
|
endSession() {
|
|
499
499
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
500
|
-
const waasEvmClient = this.getWaasWalletClient();
|
|
500
|
+
const waasEvmClient = yield this.getWaasWalletClient();
|
|
501
501
|
if (!waasEvmClient) {
|
|
502
502
|
return;
|
|
503
503
|
}
|
|
@@ -26,8 +26,8 @@ declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
|
|
|
26
26
|
setBaseApiUrl(baseApiUrl: string): void;
|
|
27
27
|
setRelayUrl(relayUrl: string): void;
|
|
28
28
|
setGetSignedSessionIdFunction(getSignedSessionId: () => Promise<string>): void;
|
|
29
|
-
createDynamicWaasClient(): import("@dynamic-labs-wallet/browser-wallet-client").DynamicWalletClient
|
|
30
|
-
getWaasWalletClient(): import("@dynamic-labs-wallet/browser-wallet-client").DynamicWalletClient
|
|
29
|
+
createDynamicWaasClient(): Promise<import("@dynamic-labs-wallet/browser-wallet-client").DynamicWalletClient>;
|
|
30
|
+
getWaasWalletClient(): Promise<import("@dynamic-labs-wallet/browser-wallet-client").DynamicWalletClient>;
|
|
31
31
|
}) & typeof EthereumWalletConnector;
|
|
32
32
|
export declare class DynamicWaasEVMConnector extends DynamicWaasEVMConnector_base implements IDynamicWaasConnector {
|
|
33
33
|
name: string;
|
|
@@ -139,7 +139,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
139
139
|
validateActiveWallet(expectedAddress) {
|
|
140
140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
141
141
|
var _a, _b, _c;
|
|
142
|
-
const walletClient = this.getWaasWalletClient();
|
|
142
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
143
143
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
144
144
|
const targetWallet = yield walletClient.getWallet({
|
|
145
145
|
accountAddress: expectedAddress,
|
|
@@ -158,7 +158,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
158
158
|
getViemAccount(_a) {
|
|
159
159
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, }) {
|
|
160
160
|
var _b;
|
|
161
|
-
const client = this.getWaasWalletClient();
|
|
161
|
+
const client = yield this.getWaasWalletClient();
|
|
162
162
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
163
163
|
return toAccount({
|
|
164
164
|
address: accountAddress,
|
|
@@ -221,7 +221,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
221
221
|
createWalletAccount() {
|
|
222
222
|
return __awaiter(this, arguments, void 0, function* ({ thresholdSignatureScheme = 'TWO_OF_TWO', } = {}) {
|
|
223
223
|
var _a, _b;
|
|
224
|
-
const walletClient = this.getWaasWalletClient();
|
|
224
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
225
225
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
226
226
|
const createdWallet = yield walletClient.createWalletAccount({
|
|
227
227
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -247,7 +247,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
247
247
|
exportPrivateKey() {
|
|
248
248
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, displayContainer, password, } = {}) {
|
|
249
249
|
var _a, _b;
|
|
250
|
-
const walletClient = this.getWaasWalletClient();
|
|
250
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
251
251
|
const targetAccountAddress = accountAddress || ((_a = this.getActiveAccount()) === null || _a === void 0 ? void 0 : _a.address);
|
|
252
252
|
if (!targetAccountAddress) {
|
|
253
253
|
throw new Error('Account address is required');
|
|
@@ -270,7 +270,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
270
270
|
importPrivateKey(_a) {
|
|
271
271
|
return __awaiter(this, arguments, void 0, function* ({ privateKey, thresholdSignatureScheme = 'TWO_OF_TWO', }) {
|
|
272
272
|
var _b, _c;
|
|
273
|
-
const walletClient = this.getWaasWalletClient();
|
|
273
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
274
274
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
275
275
|
if (!signedSessionId) {
|
|
276
276
|
throw new Error('Signed session ID is required');
|
|
@@ -291,7 +291,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
291
291
|
}
|
|
292
292
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
293
293
|
this.setActiveAccount(accountAddress);
|
|
294
|
-
const walletClient = this.getWaasWalletClient();
|
|
294
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
295
295
|
yield walletClient.exportClientKeyshares({
|
|
296
296
|
accountAddress,
|
|
297
297
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
@@ -307,7 +307,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
307
307
|
throw new Error('Account address is required');
|
|
308
308
|
}
|
|
309
309
|
this.setActiveAccount(accountAddress);
|
|
310
|
-
const walletClient = this.getWaasWalletClient();
|
|
310
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
311
311
|
return walletClient.backupKeySharesToGoogleDrive({
|
|
312
312
|
accountAddress,
|
|
313
313
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -322,7 +322,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
322
322
|
throw new Error('Account address is required');
|
|
323
323
|
}
|
|
324
324
|
this.setActiveAccount(accountAddress);
|
|
325
|
-
const walletClient = this.getWaasWalletClient();
|
|
325
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
326
326
|
return walletClient.refreshWalletAccountShares({
|
|
327
327
|
accountAddress,
|
|
328
328
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -337,7 +337,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
337
337
|
throw new Error('Account address is required');
|
|
338
338
|
}
|
|
339
339
|
this.setActiveAccount(accountAddress);
|
|
340
|
-
const walletClient = this.getWaasWalletClient();
|
|
340
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
341
341
|
return walletClient.updatePassword({
|
|
342
342
|
accountAddress,
|
|
343
343
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -356,7 +356,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
356
356
|
throw new Error('Message must be 64 characters long');
|
|
357
357
|
}
|
|
358
358
|
this.setActiveAccount(accountAddress);
|
|
359
|
-
const walletClient = this.getWaasWalletClient();
|
|
359
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
360
360
|
return walletClient.signRawMessage({
|
|
361
361
|
accountAddress,
|
|
362
362
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -447,7 +447,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
447
447
|
throw new Error('Required clients not found');
|
|
448
448
|
}
|
|
449
449
|
const { address } = signer.account;
|
|
450
|
-
const walletClient = this.getWaasWalletClient();
|
|
450
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
451
451
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
452
452
|
const signature = yield walletClient.signRawMessage({
|
|
453
453
|
accountAddress: address,
|
|
@@ -493,7 +493,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
493
493
|
}
|
|
494
494
|
endSession() {
|
|
495
495
|
return __awaiter(this, void 0, void 0, function* () {
|
|
496
|
-
const waasEvmClient = this.getWaasWalletClient();
|
|
496
|
+
const waasEvmClient = yield this.getWaasWalletClient();
|
|
497
497
|
if (!waasEvmClient) {
|
|
498
498
|
return;
|
|
499
499
|
}
|