@dynamic-labs/waas-evm 4.90.0 → 4.91.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,21 @@
1
1
 
2
+ ## [4.91.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.90.0...v4.91.0) (2026-06-23)
3
+
4
+
5
+ ### Features
6
+
7
+ * **midnight:** add WaaS layer to @dynamic-labs/midnight ([#11006](https://github.com/dynamic-labs/dynamic-auth/issues/11006)) ([01b9d16](https://github.com/dynamic-labs/dynamic-auth/commit/01b9d16d0ba92a141a9be546ca00cca4029894d5))
8
+ * **sdk-react-core:** widget support for Midnight multi-address display + export hiding ([#11008](https://github.com/dynamic-labs/dynamic-auth/issues/11008)) ([87320b4](https://github.com/dynamic-labs/dynamic-auth/commit/87320b4d6e286b88e17f144641346e16a27e9e71))
9
+ * **waas:** wire session public key through host backup ops for keyshare diagnostics [DYNT-1280] ([#11675](https://github.com/dynamic-labs/dynamic-auth/issues/11675)) ([4f7981c](https://github.com/dynamic-labs/dynamic-auth/commit/4f7981c009930469dec7b3dec93f20f99bbe5498))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **ethereum-aa:** make ZeroDevConnector inert instead of throwing when ZeroDev config is absent ([#11610](https://github.com/dynamic-labs/dynamic-auth/issues/11610)) ([a3aab6a](https://github.com/dynamic-labs/dynamic-auth/commit/a3aab6a97e2e996f96b725f9336704b844f79603))
15
+ * **react-native-extension:** fall back to react-native-webview when embedded native module is unavailable ([#11683](https://github.com/dynamic-labs/dynamic-auth/issues/11683)) ([3f8d92c](https://github.com/dynamic-labs/dynamic-auth/commit/3f8d92ca0c327128b16e3355ab2f4e63d2c8e731))
16
+ * **sdk-react-core:** warn instead of throwing when ZeroDev connector is absent ([#11611](https://github.com/dynamic-labs/dynamic-auth/issues/11611)) ([5836252](https://github.com/dynamic-labs/dynamic-auth/commit/58362524e45205399c0fdc5b92414190d1929e0b))
17
+ * **waas-evm:** sign EOA transactions with the resolved chainId, not the connector default ([#11653](https://github.com/dynamic-labs/dynamic-auth/issues/11653)) ([e634098](https://github.com/dynamic-labs/dynamic-auth/commit/e634098f0f23f4c53f92a580db6f4aacbd6b1f92))
18
+
2
19
  ## [4.90.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.89.0...v4.90.0) (2026-06-19)
3
20
 
4
21
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.90.0";
6
+ var version = "4.91.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.90.0";
2
+ var version = "4.91.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.90.0",
3
+ "version": "4.91.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",
@@ -20,13 +20,13 @@
20
20
  "dependencies": {
21
21
  "@dynamic-labs/sdk-api-core": "0.0.1046",
22
22
  "viem": "^2.45.3",
23
- "@dynamic-labs/assert-package-version": "4.90.0",
24
- "@dynamic-labs/ethereum-core": "4.90.0",
25
- "@dynamic-labs/logger": "4.90.0",
26
- "@dynamic-labs/types": "4.90.0",
27
- "@dynamic-labs/utils": "4.90.0",
28
- "@dynamic-labs/waas": "4.90.0",
29
- "@dynamic-labs/wallet-connector-core": "4.90.0"
23
+ "@dynamic-labs/assert-package-version": "4.91.0",
24
+ "@dynamic-labs/ethereum-core": "4.91.0",
25
+ "@dynamic-labs/logger": "4.91.0",
26
+ "@dynamic-labs/types": "4.91.0",
27
+ "@dynamic-labs/utils": "4.91.0",
28
+ "@dynamic-labs/waas": "4.91.0",
29
+ "@dynamic-labs/wallet-connector-core": "4.91.0"
30
30
  },
31
31
  "peerDependencies": {}
32
32
  }
@@ -293,7 +293,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
293
293
  return signature;
294
294
  }),
295
295
  signTransaction: (transaction) => _tslib.__awaiter(this, void 0, void 0, function* () {
296
- var _g, _h;
296
+ var _g, _h, _j;
297
297
  const traceId = this.generateTraceId();
298
298
  const startTime = Date.now();
299
299
  this.instrument('[signTransaction] start', {
@@ -311,18 +311,24 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
311
311
  scope: sdkApiCore.TokenScope.Walletsign,
312
312
  }));
313
313
  const password = yield this.getPasswordIfNeeded({ accountAddress });
314
- // Ensure chainId is set so the signed transaction matches the RPC's chain (EIP-155).
314
+ // Ensure chainId is set so the signed transaction matches the chain it
315
+ // will be broadcast on (EIP-155). Prefer the chainId already on the
316
+ // transaction: viem populates it from the wallet client's bound chain,
317
+ // so an EOA wallet client resolved on a specific chain (e.g. via
318
+ // getWalletClient(chainId)) signs for THAT chain rather than the
319
+ // connector's globally-selected network. Fall back to currentChainId
320
+ // only when the transaction does not carry one.
315
321
  // Wrong chainId causes "invalid signature: Failed to recover the signer" on broadcast.
316
322
  // e.g. 1Money testnet requires chainId 1212101 (https://chainlist.org/chain/1212101).
317
- const { currentChainId } = this;
318
- const transactionWithChainId = currentChainId !== undefined
319
- ? Object.assign(Object.assign({}, transaction), { chainId: currentChainId }) : transaction;
323
+ const effectiveChainId = (_j = transaction.chainId) !== null && _j !== void 0 ? _j : this.currentChainId;
324
+ const transactionWithChainId = effectiveChainId !== undefined
325
+ ? Object.assign(Object.assign({}, transaction), { chainId: effectiveChainId }) : transaction;
320
326
  const tx = yield this.instrumentAsync({
321
327
  context: { chainName: 'EVM', startTime, traceId },
322
328
  fn: () => _tslib.__awaiter(this, void 0, void 0, function* () {
323
- var _j;
324
- return client.signTransaction(Object.assign(Object.assign({ authToken: (_j = this.getAuthToken) === null || _j === void 0 ? void 0 : _j.call(this) }, (currentChainId !== undefined && {
325
- chainId: currentChainId.toString(),
329
+ var _k;
330
+ return client.signTransaction(Object.assign(Object.assign({ authToken: (_k = this.getAuthToken) === null || _k === void 0 ? void 0 : _k.call(this) }, (effectiveChainId !== undefined && {
331
+ chainId: effectiveChainId.toString(),
326
332
  })), { elevatedAccessToken,
327
333
  mfaToken,
328
334
  password, senderAddress: accountAddress, signedSessionId, traceContext: {
@@ -336,7 +342,7 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
336
342
  return tx;
337
343
  }),
338
344
  signTypedData: (typedData) => _tslib.__awaiter(this, void 0, void 0, function* () {
339
- var _k, _l;
345
+ var _l, _m;
340
346
  const traceId = this.generateTraceId();
341
347
  const startTime = Date.now();
342
348
  this.instrument('[signTypedData] start', {
@@ -347,20 +353,20 @@ class DynamicWaasEVMConnector extends waas.withDynamicWaas(ethereumCore.Ethereum
347
353
  time: 0,
348
354
  traceId,
349
355
  });
350
- const mfaToken = yield ((_k = this.getMfaToken) === null || _k === void 0 ? void 0 : _k.call(this, {
356
+ const mfaToken = yield ((_l = this.getMfaToken) === null || _l === void 0 ? void 0 : _l.call(this, {
351
357
  mfaAction: sdkApiCore.MFAAction.WalletWaasSign,
352
358
  }));
353
- const elevatedAccessToken = yield ((_l = this.getElevatedAccessToken) === null || _l === void 0 ? void 0 : _l.call(this, {
359
+ const elevatedAccessToken = yield ((_m = this.getElevatedAccessToken) === null || _m === void 0 ? void 0 : _m.call(this, {
354
360
  scope: sdkApiCore.TokenScope.Walletsign,
355
361
  }));
356
362
  const password = yield this.getPasswordIfNeeded({ accountAddress });
357
363
  const signature = yield this.instrumentAsync({
358
364
  context: { chainName: 'EVM', startTime, traceId },
359
365
  fn: () => _tslib.__awaiter(this, void 0, void 0, function* () {
360
- var _m;
366
+ var _o;
361
367
  return client.signTypedData({
362
368
  accountAddress,
363
- authToken: (_m = this.getAuthToken) === null || _m === void 0 ? void 0 : _m.call(this),
369
+ authToken: (_o = this.getAuthToken) === null || _o === void 0 ? void 0 : _o.call(this),
364
370
  elevatedAccessToken,
365
371
  mfaToken,
366
372
  password,
@@ -21,6 +21,7 @@ declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
21
21
  overrideKey: string;
22
22
  isEmbeddedWallet: boolean;
23
23
  getSignedSessionId?: (() => Promise<string>) | undefined;
24
+ getSessionPublicKey?: (() => Promise<string | undefined>) | undefined;
24
25
  getMfaToken?: ((props?: {
25
26
  mfaAction?: MFAAction | undefined;
26
27
  } | undefined) => Promise<string | undefined>) | undefined;
@@ -29,6 +30,7 @@ declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
29
30
  getElevatedAccessToken?: ((props: {
30
31
  scope: TokenScope;
31
32
  }) => Promise<string | undefined>) | undefined;
33
+ onUnauthorized?: (() => void | Promise<void>) | undefined;
32
34
  environmentId?: string | undefined;
33
35
  baseApiUrl?: string | undefined;
34
36
  relayUrl?: string | undefined;
@@ -40,6 +42,7 @@ declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
40
42
  __exportHandler: WaasExportHandler;
41
43
  validateActiveWallet(expectedAddress: string): Promise<void>;
42
44
  setGetAuthTokenFunction(getAuthToken: () => string): void;
45
+ setOnUnauthorizedFunction(onUnauthorized: () => void | Promise<void>): void;
43
46
  setWaasAuthMode(authMode: "cookie" | "header"): void;
44
47
  setGetMfaTokenFunction(getMfaToken: (props?: {
45
48
  mfaAction?: MFAAction | undefined;
@@ -59,6 +62,7 @@ declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
59
62
  setBaseClientKeysharesRelayApiUrl(baseClientKeysharesRelayApiUrl?: string | undefined): void;
60
63
  setRelayUrl(relayUrl: string): void;
61
64
  setGetSignedSessionIdFunction(getSignedSessionId: () => Promise<string>): void;
65
+ setGetSessionPublicKeyFunction(getSessionPublicKey: () => Promise<string | undefined>): void;
62
66
  delegateKeyShares({ accountAddress, password, }: {
63
67
  accountAddress: string;
64
68
  password?: string | undefined;
@@ -169,6 +173,16 @@ declare const DynamicWaasEVMConnector_base: (abstract new (...args: any[]) => {
169
173
  fn: (timing: import("dist/packages/waas/utils/instrumentation").InstrumentationTimer) => Promise<T_1>;
170
174
  context?: Record<string, any> | undefined;
171
175
  }): Promise<T_1>;
176
+ getPrivateBalance(): Promise<{
177
+ unshielded: Record<string, string>;
178
+ shielded: Record<string, string>;
179
+ dust: {
180
+ balance: string;
181
+ cap: string;
182
+ };
183
+ address: string;
184
+ dustSynced: boolean;
185
+ }>;
172
186
  }) & typeof EthereumWalletConnector;
173
187
  export declare class DynamicWaasEVMConnector extends DynamicWaasEVMConnector_base implements IDynamicWaasConnector {
174
188
  name: string;
@@ -289,7 +289,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
289
289
  return signature;
290
290
  }),
291
291
  signTransaction: (transaction) => __awaiter(this, void 0, void 0, function* () {
292
- var _g, _h;
292
+ var _g, _h, _j;
293
293
  const traceId = this.generateTraceId();
294
294
  const startTime = Date.now();
295
295
  this.instrument('[signTransaction] start', {
@@ -307,18 +307,24 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
307
307
  scope: TokenScope.Walletsign,
308
308
  }));
309
309
  const password = yield this.getPasswordIfNeeded({ accountAddress });
310
- // Ensure chainId is set so the signed transaction matches the RPC's chain (EIP-155).
310
+ // Ensure chainId is set so the signed transaction matches the chain it
311
+ // will be broadcast on (EIP-155). Prefer the chainId already on the
312
+ // transaction: viem populates it from the wallet client's bound chain,
313
+ // so an EOA wallet client resolved on a specific chain (e.g. via
314
+ // getWalletClient(chainId)) signs for THAT chain rather than the
315
+ // connector's globally-selected network. Fall back to currentChainId
316
+ // only when the transaction does not carry one.
311
317
  // Wrong chainId causes "invalid signature: Failed to recover the signer" on broadcast.
312
318
  // e.g. 1Money testnet requires chainId 1212101 (https://chainlist.org/chain/1212101).
313
- const { currentChainId } = this;
314
- const transactionWithChainId = currentChainId !== undefined
315
- ? Object.assign(Object.assign({}, transaction), { chainId: currentChainId }) : transaction;
319
+ const effectiveChainId = (_j = transaction.chainId) !== null && _j !== void 0 ? _j : this.currentChainId;
320
+ const transactionWithChainId = effectiveChainId !== undefined
321
+ ? Object.assign(Object.assign({}, transaction), { chainId: effectiveChainId }) : transaction;
316
322
  const tx = yield this.instrumentAsync({
317
323
  context: { chainName: 'EVM', startTime, traceId },
318
324
  fn: () => __awaiter(this, void 0, void 0, function* () {
319
- var _j;
320
- return client.signTransaction(Object.assign(Object.assign({ authToken: (_j = this.getAuthToken) === null || _j === void 0 ? void 0 : _j.call(this) }, (currentChainId !== undefined && {
321
- chainId: currentChainId.toString(),
325
+ var _k;
326
+ return client.signTransaction(Object.assign(Object.assign({ authToken: (_k = this.getAuthToken) === null || _k === void 0 ? void 0 : _k.call(this) }, (effectiveChainId !== undefined && {
327
+ chainId: effectiveChainId.toString(),
322
328
  })), { elevatedAccessToken,
323
329
  mfaToken,
324
330
  password, senderAddress: accountAddress, signedSessionId, traceContext: {
@@ -332,7 +338,7 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
332
338
  return tx;
333
339
  }),
334
340
  signTypedData: (typedData) => __awaiter(this, void 0, void 0, function* () {
335
- var _k, _l;
341
+ var _l, _m;
336
342
  const traceId = this.generateTraceId();
337
343
  const startTime = Date.now();
338
344
  this.instrument('[signTypedData] start', {
@@ -343,20 +349,20 @@ class DynamicWaasEVMConnector extends withDynamicWaas(EthereumWalletConnector) {
343
349
  time: 0,
344
350
  traceId,
345
351
  });
346
- const mfaToken = yield ((_k = this.getMfaToken) === null || _k === void 0 ? void 0 : _k.call(this, {
352
+ const mfaToken = yield ((_l = this.getMfaToken) === null || _l === void 0 ? void 0 : _l.call(this, {
347
353
  mfaAction: MFAAction.WalletWaasSign,
348
354
  }));
349
- const elevatedAccessToken = yield ((_l = this.getElevatedAccessToken) === null || _l === void 0 ? void 0 : _l.call(this, {
355
+ const elevatedAccessToken = yield ((_m = this.getElevatedAccessToken) === null || _m === void 0 ? void 0 : _m.call(this, {
350
356
  scope: TokenScope.Walletsign,
351
357
  }));
352
358
  const password = yield this.getPasswordIfNeeded({ accountAddress });
353
359
  const signature = yield this.instrumentAsync({
354
360
  context: { chainName: 'EVM', startTime, traceId },
355
361
  fn: () => __awaiter(this, void 0, void 0, function* () {
356
- var _m;
362
+ var _o;
357
363
  return client.signTypedData({
358
364
  accountAddress,
359
- authToken: (_m = this.getAuthToken) === null || _m === void 0 ? void 0 : _m.call(this),
365
+ authToken: (_o = this.getAuthToken) === null || _o === void 0 ? void 0 : _o.call(this),
360
366
  elevatedAccessToken,
361
367
  mfaToken,
362
368
  password,