@dynamic-labs/embedded-wallet-evm 4.15.0 → 4.16.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,13 @@
1
1
 
2
+ ## [4.16.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.15.0...v4.16.0) (2025-05-03)
3
+
4
+
5
+ ### Features
6
+
7
+ * (GVTY-3020) add send balance to waas sui connector ([#8638](https://github.com/dynamic-labs/dynamic-auth/issues/8638)) ([97f0af0](https://github.com/dynamic-labs/dynamic-auth/commit/97f0af0504a0079ebf0958fde1f8edc34c035927))
8
+ * add isAtomicSupported and isPaymasterServiceSupported methods to EthereumWallet ([#8627](https://github.com/dynamic-labs/dynamic-auth/issues/8627)) ([df82b9e](https://github.com/dynamic-labs/dynamic-auth/commit/df82b9e86eafea9dd6c505227722450bc56d7c57))
9
+ * add solana mpc to global wallets ([#8605](https://github.com/dynamic-labs/dynamic-auth/issues/8605)) ([6261bf9](https://github.com/dynamic-labs/dynamic-auth/commit/6261bf9bec45b1d1afa13869cf5d10cda215783e))
10
+
2
11
  ## [4.15.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.14.0...v4.15.0) (2025-04-30)
3
12
 
4
13
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.15.0";
6
+ var version = "4.16.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.15.0";
2
+ var version = "4.16.0";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/embedded-wallet-evm",
3
- "version": "4.15.0",
3
+ "version": "4.16.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",
@@ -23,14 +23,14 @@
23
23
  "@turnkey/iframe-stamper": "2.0.0",
24
24
  "@turnkey/viem": "0.6.2",
25
25
  "@turnkey/webauthn-stamper": "0.5.0",
26
- "@dynamic-labs/assert-package-version": "4.15.0",
27
- "@dynamic-labs/embedded-wallet": "4.15.0",
28
- "@dynamic-labs/ethereum-core": "4.15.0",
29
- "@dynamic-labs/types": "4.15.0",
30
- "@dynamic-labs/utils": "4.15.0",
31
- "@dynamic-labs/wallet-book": "4.15.0",
32
- "@dynamic-labs/wallet-connector-core": "4.15.0",
33
- "@dynamic-labs/webauthn": "4.15.0"
26
+ "@dynamic-labs/assert-package-version": "4.16.0",
27
+ "@dynamic-labs/embedded-wallet": "4.16.0",
28
+ "@dynamic-labs/ethereum-core": "4.16.0",
29
+ "@dynamic-labs/types": "4.16.0",
30
+ "@dynamic-labs/utils": "4.16.0",
31
+ "@dynamic-labs/wallet-book": "4.16.0",
32
+ "@dynamic-labs/wallet-connector-core": "4.16.0",
33
+ "@dynamic-labs/webauthn": "4.16.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "viem": "^2.21.60"
@@ -451,6 +451,36 @@ class TurnkeyEVMWalletConnector extends embeddedWallet.TurnkeyWalletConnectorBas
451
451
  getEnabledNetworks() {
452
452
  return this.evmNetworks;
453
453
  }
454
+ isAtomicSupported(chainId) {
455
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
456
+ const walletClient = yield this.getWalletClient();
457
+ if (!walletClient) {
458
+ return false;
459
+ }
460
+ const capabilities = yield ethereumCore.getWalletCapabilities(walletClient);
461
+ const chainIdToCheck = chainId !== null && chainId !== void 0 ? chainId : (yield walletClient.getChainId());
462
+ embeddedWallet.logger.debug('[TurnkeyEVMWalletConnector] isAtomicSupported', {
463
+ capabilities,
464
+ chainId: chainIdToCheck,
465
+ });
466
+ return ethereumCore.hasAtomicStatusCapability(capabilities, chainIdToCheck);
467
+ });
468
+ }
469
+ isPaymasterServiceSupported(chainId) {
470
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
471
+ const walletClient = yield this.getWalletClient();
472
+ if (!walletClient) {
473
+ return false;
474
+ }
475
+ const capabilities = yield ethereumCore.getWalletCapabilities(walletClient);
476
+ const chainIdToCheck = chainId !== null && chainId !== void 0 ? chainId : (yield walletClient.getChainId());
477
+ embeddedWallet.logger.debug('[TurnkeyEVMWalletConnector] isPaymasterServiceSupported', {
478
+ capabilities,
479
+ chainId: chainIdToCheck,
480
+ });
481
+ return ethereumCore.hasPaymasterServiceCapability(capabilities, chainIdToCheck);
482
+ });
483
+ }
454
484
  }
455
485
  TurnkeyEVMWalletConnector.lastUsedChainIdStorageKey = 'turnkey-last-used-chain-id';
456
486
 
@@ -63,4 +63,6 @@ export declare class TurnkeyEVMWalletConnector extends TurnkeyWalletConnectorBas
63
63
  createUiTransaction(from: string): Promise<IUITransaction>;
64
64
  getBlockExplorerUrlsForCurrentNetwork(): Promise<string[]>;
65
65
  getEnabledNetworks(): GenericNetwork[];
66
+ isAtomicSupported(chainId?: number): Promise<boolean>;
67
+ isPaymasterServiceSupported(chainId?: number): Promise<boolean>;
66
68
  }
@@ -8,7 +8,7 @@ import { http, formatEther } from 'viem';
8
8
  import { toAccount } from 'viem/accounts';
9
9
  import { hashAuthorization } from 'viem/experimental';
10
10
  import { parseEvmNetworks, DynamicError } from '@dynamic-labs/utils';
11
- import { EthereumWallet, createWalletClientWithUiConfirmation, getOrMapViemChain, createViemUiTransaction } from '@dynamic-labs/ethereum-core';
11
+ import { EthereumWallet, createWalletClientWithUiConfirmation, getOrMapViemChain, createViemUiTransaction, getWalletCapabilities, hasAtomicStatusCapability, hasPaymasterServiceCapability } from '@dynamic-labs/ethereum-core';
12
12
  import { getRpcUrlForChain, isSameAddress } from '@dynamic-labs/wallet-connector-core';
13
13
  import { TurnkeyWalletConnectorBase, logger, findTurnkeyVerifiedCredentialsWithSmartWalletRef, TURNKEY_SDK_SESSION_KEY_RETRYABLE_ERRORS } from '@dynamic-labs/embedded-wallet';
14
14
 
@@ -447,6 +447,36 @@ class TurnkeyEVMWalletConnector extends TurnkeyWalletConnectorBase {
447
447
  getEnabledNetworks() {
448
448
  return this.evmNetworks;
449
449
  }
450
+ isAtomicSupported(chainId) {
451
+ return __awaiter(this, void 0, void 0, function* () {
452
+ const walletClient = yield this.getWalletClient();
453
+ if (!walletClient) {
454
+ return false;
455
+ }
456
+ const capabilities = yield getWalletCapabilities(walletClient);
457
+ const chainIdToCheck = chainId !== null && chainId !== void 0 ? chainId : (yield walletClient.getChainId());
458
+ logger.debug('[TurnkeyEVMWalletConnector] isAtomicSupported', {
459
+ capabilities,
460
+ chainId: chainIdToCheck,
461
+ });
462
+ return hasAtomicStatusCapability(capabilities, chainIdToCheck);
463
+ });
464
+ }
465
+ isPaymasterServiceSupported(chainId) {
466
+ return __awaiter(this, void 0, void 0, function* () {
467
+ const walletClient = yield this.getWalletClient();
468
+ if (!walletClient) {
469
+ return false;
470
+ }
471
+ const capabilities = yield getWalletCapabilities(walletClient);
472
+ const chainIdToCheck = chainId !== null && chainId !== void 0 ? chainId : (yield walletClient.getChainId());
473
+ logger.debug('[TurnkeyEVMWalletConnector] isPaymasterServiceSupported', {
474
+ capabilities,
475
+ chainId: chainIdToCheck,
476
+ });
477
+ return hasPaymasterServiceCapability(capabilities, chainIdToCheck);
478
+ });
479
+ }
450
480
  }
451
481
  TurnkeyEVMWalletConnector.lastUsedChainIdStorageKey = 'turnkey-last-used-chain-id';
452
482