@dynamic-labs/waas-evm 4.25.10 → 4.27.0
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 +31 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -9
- package/src/DynamicWaasEVMConnector.cjs +24 -5
- package/src/DynamicWaasEVMConnector.d.ts +7 -1
- package/src/DynamicWaasEVMConnector.js +24 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.27.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.26.0...v4.27.0) (2025-08-16)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add cookie option to waas connectors ([#9335](https://github.com/dynamic-labs/dynamic-auth/issues/9335)) ([2330f58](https://github.com/dynamic-labs/dynamic-auth/commit/2330f58b5eb35da8568c3114d2d2507a742ad22c))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* ensure consistent dynamic api url ([#9357](https://github.com/dynamic-labs/dynamic-auth/issues/9357)) ([0cb9bde](https://github.com/dynamic-labs/dynamic-auth/commit/0cb9bdeb7eb6e4d103dafecea337d1548a62b9b7))
|
|
13
|
+
|
|
14
|
+
## [4.26.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.10...v4.26.0) (2025-08-14)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* add forceRefresh to useTokenBalances ([#9320](https://github.com/dynamic-labs/dynamic-auth/issues/9320)) ([22c4035](https://github.com/dynamic-labs/dynamic-auth/commit/22c403546496ffb6b1ed846510a079efc65c5d57))
|
|
20
|
+
* add signMessageWithContext to support user operations with WaaS ([#9287](https://github.com/dynamic-labs/dynamic-auth/issues/9287)) ([744c158](https://github.com/dynamic-labs/dynamic-auth/commit/744c158a890346c624a101ba8b20911eefbdd1ef))
|
|
21
|
+
* add sui support to react native ([#9236](https://github.com/dynamic-labs/dynamic-auth/issues/9236)) ([301d821](https://github.com/dynamic-labs/dynamic-auth/commit/301d821b16eb1bc112609882ed0ae5e9f2477ace))
|
|
22
|
+
* add whitelistedContracts to token balance hooks ([#9324](https://github.com/dynamic-labs/dynamic-auth/issues/9324)) ([86596dd](https://github.com/dynamic-labs/dynamic-auth/commit/86596dd692152f82a2553b9824ce21781024dac1))
|
|
23
|
+
* pass policy context to sign authorization ([#9327](https://github.com/dynamic-labs/dynamic-auth/issues/9327)) ([3e6d009](https://github.com/dynamic-labs/dynamic-auth/commit/3e6d009ca3d50e01a665550fa803d07bd3038eb1))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* don't prompt passkeys twice when component renders ([#9340](https://github.com/dynamic-labs/dynamic-auth/issues/9340)) ([8fbdd28](https://github.com/dynamic-labs/dynamic-auth/commit/8fbdd287d1dd67fee4720f16a3d506f75d9dafe7))
|
|
29
|
+
* onAuthSuccess with primaryWallet null when signing up with embedded wallets v3 ([#9345](https://github.com/dynamic-labs/dynamic-auth/issues/9345)) ([14e54a0](https://github.com/dynamic-labs/dynamic-auth/commit/14e54a093395a46cb32282aebc172b26c243d42f))
|
|
30
|
+
* rename passkey not automatically updating UI ([#9339](https://github.com/dynamic-labs/dynamic-auth/issues/9339)) ([b9ef253](https://github.com/dynamic-labs/dynamic-auth/commit/b9ef2532152a228feebb1fb9811937d7a14d81b1))
|
|
31
|
+
* wallet kit being initiated internally multiple times ([#9344](https://github.com/dynamic-labs/dynamic-auth/issues/9344)) ([49a3664](https://github.com/dynamic-labs/dynamic-auth/commit/49a3664c5995b0104693ec87b41b8540dd19bdca))
|
|
32
|
+
|
|
2
33
|
### [4.25.10](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.9...v4.25.10) (2025-08-07)
|
|
3
34
|
|
|
4
35
|
|
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.
|
|
3
|
+
"version": "4.27.0",
|
|
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,15 +18,15 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
21
|
+
"@dynamic-labs/sdk-api-core": "0.0.753",
|
|
22
22
|
"viem": "^2.28.4",
|
|
23
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
24
|
-
"@dynamic-labs/ethereum-core": "4.
|
|
25
|
-
"@dynamic-labs/logger": "4.
|
|
26
|
-
"@dynamic-labs/types": "4.
|
|
27
|
-
"@dynamic-labs/utils": "4.
|
|
28
|
-
"@dynamic-labs/waas": "4.
|
|
29
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
23
|
+
"@dynamic-labs/assert-package-version": "4.27.0",
|
|
24
|
+
"@dynamic-labs/ethereum-core": "4.27.0",
|
|
25
|
+
"@dynamic-labs/logger": "4.27.0",
|
|
26
|
+
"@dynamic-labs/types": "4.27.0",
|
|
27
|
+
"@dynamic-labs/utils": "4.27.0",
|
|
28
|
+
"@dynamic-labs/waas": "4.27.0",
|
|
29
|
+
"@dynamic-labs/wallet-connector-core": "4.27.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {}
|
|
32
32
|
}
|
|
@@ -257,6 +257,23 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
257
257
|
var _a;
|
|
258
258
|
return (_a = this.getWalletClient()) === null || _a === void 0 ? void 0 : _a.signMessage({ message });
|
|
259
259
|
}
|
|
260
|
+
signMessageWithContext(_a) {
|
|
261
|
+
return _tslib.__awaiter(this, arguments, void 0, function* ({ message, context, }) {
|
|
262
|
+
var _b, _c, _d;
|
|
263
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
264
|
+
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
265
|
+
if (!signedSessionId) {
|
|
266
|
+
throw new utils.DynamicError('Signed session ID is required');
|
|
267
|
+
}
|
|
268
|
+
return walletClient.signMessage({
|
|
269
|
+
accountAddress: (_c = this.getActiveAccount()) === null || _c === void 0 ? void 0 : _c.address,
|
|
270
|
+
authToken: (_d = this.getAuthToken) === null || _d === void 0 ? void 0 : _d.call(this),
|
|
271
|
+
context,
|
|
272
|
+
message,
|
|
273
|
+
signedSessionId,
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
}
|
|
260
277
|
getSigner() {
|
|
261
278
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
262
279
|
return this.getWalletClient();
|
|
@@ -416,14 +433,16 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
|
|
|
416
433
|
const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this, {
|
|
417
434
|
mfaAction: sdkApiCore.MFAAction.WalletWaasSign,
|
|
418
435
|
}));
|
|
436
|
+
const authorization = {
|
|
437
|
+
address: contractAddress,
|
|
438
|
+
chainId,
|
|
439
|
+
nonce,
|
|
440
|
+
};
|
|
419
441
|
const signature = yield walletClient.signRawMessage({
|
|
420
442
|
accountAddress: address,
|
|
421
443
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
chainId,
|
|
425
|
-
nonce,
|
|
426
|
-
}).slice(2),
|
|
444
|
+
context: { eip7702Auth: authorization },
|
|
445
|
+
message: utils$1.hashAuthorization(authorization).slice(2),
|
|
427
446
|
mfaToken,
|
|
428
447
|
password,
|
|
429
448
|
signedSessionId,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Account, Hex, Transport, Chain as ViemChain, WalletClient } from 'viem';
|
|
2
2
|
import { LocalAccount, SignAuthorizationParameters, SignAuthorizationReturnType } from 'viem/accounts';
|
|
3
3
|
import { EthereumWalletConnector, EthereumWalletConnectorOpts, SwitchNetworkOps } from '@dynamic-labs/ethereum-core';
|
|
4
|
-
import { JwtVerifiedCredential, MFAAction } from '@dynamic-labs/sdk-api-core';
|
|
4
|
+
import { JwtVerifiedCredential, MFAAction, SignMessageContext } from '@dynamic-labs/sdk-api-core';
|
|
5
5
|
import { IUITransaction } from '@dynamic-labs/types';
|
|
6
6
|
import { WaasExportHandler } from '@dynamic-labs/waas';
|
|
7
7
|
import { IDynamicWaasConnector } from '@dynamic-labs/wallet-connector-core';
|
|
@@ -25,9 +25,11 @@ declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
|
|
|
25
25
|
relayUrl?: string | undefined;
|
|
26
26
|
dynamicWaasClient: import("@dynamic-labs-wallet/browser-wallet-client").DynamicWalletClient | undefined;
|
|
27
27
|
chainName: string;
|
|
28
|
+
authMode: "cookie" | "header";
|
|
28
29
|
__exportHandler: WaasExportHandler;
|
|
29
30
|
validateActiveWallet(expectedAddress: string): Promise<void>;
|
|
30
31
|
setGetAuthTokenFunction(getAuthToken: () => string): void;
|
|
32
|
+
setWaasAuthMode(authMode: "cookie" | "header"): void;
|
|
31
33
|
setGetMfaTokenFunction(getMfaToken: (props?: {
|
|
32
34
|
mfaAction?: MFAAction | undefined;
|
|
33
35
|
} | undefined) => Promise<string | undefined>): void;
|
|
@@ -123,6 +125,10 @@ export declare class DynamicWaasEVMConnector extends DynamicWaasEVMConnector_bas
|
|
|
123
125
|
}): Promise<LocalAccount>;
|
|
124
126
|
getWalletClient(chainId?: string): WalletClient<Transport, ViemChain, Account> | undefined;
|
|
125
127
|
signMessage(message: string): Promise<Hex>;
|
|
128
|
+
signMessageWithContext({ message, context, }: {
|
|
129
|
+
message: string;
|
|
130
|
+
context: SignMessageContext;
|
|
131
|
+
}): Promise<string>;
|
|
126
132
|
getSigner(): Promise<any>;
|
|
127
133
|
getWalletClientByAddress({ accountAddress, }: {
|
|
128
134
|
accountAddress: string;
|
|
@@ -253,6 +253,23 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
253
253
|
var _a;
|
|
254
254
|
return (_a = this.getWalletClient()) === null || _a === void 0 ? void 0 : _a.signMessage({ message });
|
|
255
255
|
}
|
|
256
|
+
signMessageWithContext(_a) {
|
|
257
|
+
return __awaiter(this, arguments, void 0, function* ({ message, context, }) {
|
|
258
|
+
var _b, _c, _d;
|
|
259
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
260
|
+
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
261
|
+
if (!signedSessionId) {
|
|
262
|
+
throw new DynamicError('Signed session ID is required');
|
|
263
|
+
}
|
|
264
|
+
return walletClient.signMessage({
|
|
265
|
+
accountAddress: (_c = this.getActiveAccount()) === null || _c === void 0 ? void 0 : _c.address,
|
|
266
|
+
authToken: (_d = this.getAuthToken) === null || _d === void 0 ? void 0 : _d.call(this),
|
|
267
|
+
context,
|
|
268
|
+
message,
|
|
269
|
+
signedSessionId,
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
}
|
|
256
273
|
getSigner() {
|
|
257
274
|
return __awaiter(this, void 0, void 0, function* () {
|
|
258
275
|
return this.getWalletClient();
|
|
@@ -412,14 +429,16 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
|
|
|
412
429
|
const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this, {
|
|
413
430
|
mfaAction: MFAAction.WalletWaasSign,
|
|
414
431
|
}));
|
|
432
|
+
const authorization = {
|
|
433
|
+
address: contractAddress,
|
|
434
|
+
chainId,
|
|
435
|
+
nonce,
|
|
436
|
+
};
|
|
415
437
|
const signature = yield walletClient.signRawMessage({
|
|
416
438
|
accountAddress: address,
|
|
417
439
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
chainId,
|
|
421
|
-
nonce,
|
|
422
|
-
}).slice(2),
|
|
440
|
+
context: { eip7702Auth: authorization },
|
|
441
|
+
message: hashAuthorization(authorization).slice(2),
|
|
423
442
|
mfaToken,
|
|
424
443
|
password,
|
|
425
444
|
signedSessionId,
|