@dynamic-labs/waas-evm 4.25.10 → 4.26.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 CHANGED
@@ -1,4 +1,23 @@
1
1
 
2
+ ## [4.26.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.10...v4.26.0) (2025-08-14)
3
+
4
+
5
+ ### Features
6
+
7
+ * add forceRefresh to useTokenBalances ([#9320](https://github.com/dynamic-labs/dynamic-auth/issues/9320)) ([22c4035](https://github.com/dynamic-labs/dynamic-auth/commit/22c403546496ffb6b1ed846510a079efc65c5d57))
8
+ * 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))
9
+ * 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))
10
+ * 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))
11
+ * 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))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * 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))
17
+ * 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))
18
+ * 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))
19
+ * 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))
20
+
2
21
  ### [4.25.10](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.9...v4.25.10) (2025-08-07)
3
22
 
4
23
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.25.10";
6
+ var version = "4.26.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.25.10";
2
+ var version = "4.26.0";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/waas-evm",
3
- "version": "4.25.10",
3
+ "version": "4.26.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.741",
21
+ "@dynamic-labs/sdk-api-core": "0.0.749",
22
22
  "viem": "^2.28.4",
23
- "@dynamic-labs/assert-package-version": "4.25.10",
24
- "@dynamic-labs/ethereum-core": "4.25.10",
25
- "@dynamic-labs/logger": "4.25.10",
26
- "@dynamic-labs/types": "4.25.10",
27
- "@dynamic-labs/utils": "4.25.10",
28
- "@dynamic-labs/waas": "4.25.10",
29
- "@dynamic-labs/wallet-connector-core": "4.25.10"
23
+ "@dynamic-labs/assert-package-version": "4.26.0",
24
+ "@dynamic-labs/ethereum-core": "4.26.0",
25
+ "@dynamic-labs/logger": "4.26.0",
26
+ "@dynamic-labs/types": "4.26.0",
27
+ "@dynamic-labs/utils": "4.26.0",
28
+ "@dynamic-labs/waas": "4.26.0",
29
+ "@dynamic-labs/wallet-connector-core": "4.26.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
- message: utils$1.hashAuthorization({
423
- address: contractAddress,
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';
@@ -123,6 +123,10 @@ export declare class DynamicWaasEVMConnector extends DynamicWaasEVMConnector_bas
123
123
  }): Promise<LocalAccount>;
124
124
  getWalletClient(chainId?: string): WalletClient<Transport, ViemChain, Account> | undefined;
125
125
  signMessage(message: string): Promise<Hex>;
126
+ signMessageWithContext({ message, context, }: {
127
+ message: string;
128
+ context: SignMessageContext;
129
+ }): Promise<string>;
126
130
  getSigner(): Promise<any>;
127
131
  getWalletClientByAddress({ accountAddress, }: {
128
132
  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
- message: hashAuthorization({
419
- address: contractAddress,
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,