@dynamic-labs/ethereum-core 4.4.2-preview.0 → 4.4.2-preview.1

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,15 @@
1
1
 
2
+ ### [4.4.2-preview.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.2...v4.4.2-preview.1) (2025-01-30)
3
+
4
+
5
+ ### Features
6
+
7
+ * add support for 7702 on ZeroDevConnector ([144e99a](https://github.com/dynamic-labs/dynamic-auth/commit/144e99a673abbe4c775ec2124375925e96f76071))
8
+ * implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([9622d1e](https://github.com/dynamic-labs/dynamic-auth/commit/9622d1e0e42bb3401fffbdda7b735db1736717ce))
9
+ * implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([7f367b8](https://github.com/dynamic-labs/dynamic-auth/commit/7f367b8bc9d6a0ece0268867bf9c7754d75d7949))
10
+ * implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([2019c4c](https://github.com/dynamic-labs/dynamic-auth/commit/2019c4cb89e4a042dc1c896a71b803db572e1842))
11
+ * override kernel address and add auth to localstorage ([1074ebc](https://github.com/dynamic-labs/dynamic-auth/commit/1074ebc0f3eca26fb868fd7acc9e3ac7c1048007))
12
+
2
13
  ### [4.4.2-preview.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.1...v4.4.2-preview.0) (2025-01-28)
3
14
 
4
15
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.4.2-preview.0";
6
+ var version = "4.4.2-preview.1";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.4.2-preview.0";
2
+ var version = "4.4.2-preview.1";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum-core",
3
- "version": "4.4.2-preview.0",
3
+ "version": "4.4.2-preview.1",
4
4
  "description": "Core package for utilities and types for viem",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -22,12 +22,12 @@
22
22
  },
23
23
  "peerDependencies": {
24
24
  "viem": "^2.21.55",
25
- "@dynamic-labs/assert-package-version": "4.4.2-preview.0",
26
- "@dynamic-labs/logger": "4.4.2-preview.0",
27
- "@dynamic-labs/rpc-providers": "4.4.2-preview.0",
28
- "@dynamic-labs/types": "4.4.2-preview.0",
29
- "@dynamic-labs/utils": "4.4.2-preview.0",
30
- "@dynamic-labs/wallet-book": "4.4.2-preview.0",
31
- "@dynamic-labs/wallet-connector-core": "4.4.2-preview.0"
25
+ "@dynamic-labs/assert-package-version": "4.4.2-preview.1",
26
+ "@dynamic-labs/logger": "4.4.2-preview.1",
27
+ "@dynamic-labs/rpc-providers": "4.4.2-preview.1",
28
+ "@dynamic-labs/types": "4.4.2-preview.1",
29
+ "@dynamic-labs/utils": "4.4.2-preview.1",
30
+ "@dynamic-labs/wallet-book": "4.4.2-preview.1",
31
+ "@dynamic-labs/wallet-connector-core": "4.4.2-preview.1"
32
32
  }
33
33
  }
package/src/index.cjs CHANGED
@@ -25,6 +25,7 @@ var interceptTransport = require('./utils/viem/interceptTransport/interceptTrans
25
25
  var findEvmNetwork = require('./utils/findEvmNetwork/findEvmNetwork.cjs');
26
26
  var getNameservice = require('./utils/getNameservice/getNameservice.cjs');
27
27
  var validateAddressFormat = require('./utils/validateAddressFormat/validateAddressFormat.cjs');
28
+ var parseAddress = require('./utils/parseAddress/parseAddress.cjs');
28
29
  var EthereumWallet = require('./wallet/EthereumWallet.cjs');
29
30
  var isEthereumWallet = require('./wallet/isEthereumWallet/isEthereumWallet.cjs');
30
31
 
@@ -50,6 +51,7 @@ exports.interceptTransport = interceptTransport.interceptTransport;
50
51
  exports.findEvmNetwork = findEvmNetwork.findEvmNetwork;
51
52
  exports.getNameservice = getNameservice.getNameservice;
52
53
  exports.validateAddressFormat = validateAddressFormat.validateAddressFormat;
54
+ exports.parseAddress = parseAddress.parseAddress;
53
55
  exports.EthereumWallet = EthereumWallet.EthereumWallet;
54
56
  exports.isEthereumWallet = isEthereumWallet.isEthereumWallet;
55
57
  Object.keys(rpcProviders).forEach(function (k) {
package/src/index.js CHANGED
@@ -21,6 +21,7 @@ export { interceptTransport } from './utils/viem/interceptTransport/interceptTra
21
21
  export { findEvmNetwork } from './utils/findEvmNetwork/findEvmNetwork.js';
22
22
  export { getNameservice } from './utils/getNameservice/getNameservice.js';
23
23
  export { validateAddressFormat } from './utils/validateAddressFormat/validateAddressFormat.js';
24
+ export { parseAddress } from './utils/parseAddress/parseAddress.js';
24
25
  export { EthereumWallet } from './wallet/EthereumWallet.js';
25
26
  export { isEthereumWallet } from './wallet/isEthereumWallet/isEthereumWallet.js';
26
27
 
@@ -2,3 +2,4 @@ export * from './viem';
2
2
  export { findEvmNetwork } from './findEvmNetwork';
3
3
  export { getNameservice } from './getNameservice';
4
4
  export { validateAddressFormat } from './validateAddressFormat';
5
+ export { parseAddress } from './parseAddress';
@@ -0,0 +1 @@
1
+ export { parseAddress } from './parseAddress';
@@ -0,0 +1,17 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var viem = require('viem');
7
+
8
+ const parseAddress = (address) => {
9
+ try {
10
+ return viem.getAddress(address);
11
+ }
12
+ catch (error) {
13
+ return address;
14
+ }
15
+ };
16
+
17
+ exports.parseAddress = parseAddress;
@@ -0,0 +1 @@
1
+ export declare const parseAddress: (address: string) => string;
@@ -0,0 +1,13 @@
1
+ 'use client'
2
+ import { getAddress } from 'viem';
3
+
4
+ const parseAddress = (address) => {
5
+ try {
6
+ return getAddress(address);
7
+ }
8
+ catch (error) {
9
+ return address;
10
+ }
11
+ };
12
+
13
+ export { parseAddress };
@@ -14,8 +14,12 @@ var interceptTransport = require('../utils/viem/interceptTransport/interceptTran
14
14
  var abi = require('../utils/viem/erc20/abi.cjs');
15
15
  require('viem/accounts');
16
16
  var getOrMapViemChain = require('../utils/viem/getOrMapViemChain/getOrMapViemChain.cjs');
17
+ var parseAddress = require('../utils/parseAddress/parseAddress.cjs');
17
18
 
18
19
  class EthereumWallet extends walletConnectorCore.Wallet {
20
+ constructor(props) {
21
+ super(Object.assign(Object.assign({}, props), { address: parseAddress.parseAddress(props.address) }));
22
+ }
19
23
  /**
20
24
  * Sends the native balance of the wallet to the given address.
21
25
  * @param amount - The amount of balance to send (in ETH).
@@ -1,7 +1,8 @@
1
1
  import { Account, Chain, PublicClient, Transport, WalletClient } from 'viem';
2
- import { Wallet } from '@dynamic-labs/wallet-connector-core';
2
+ import { Wallet, WalletProps } from '@dynamic-labs/wallet-connector-core';
3
3
  import { EthereumWalletConnector } from '../connector';
4
4
  export declare class EthereumWallet extends Wallet<EthereumWalletConnector> {
5
+ constructor(props: WalletProps<EthereumWalletConnector>);
5
6
  /**
6
7
  * Sends the native balance of the wallet to the given address.
7
8
  * @param amount - The amount of balance to send (in ETH).
@@ -10,8 +10,12 @@ import { interceptTransport } from '../utils/viem/interceptTransport/interceptTr
10
10
  import { erc20Abi } from '../utils/viem/erc20/abi.js';
11
11
  import 'viem/accounts';
12
12
  import { getChain } from '../utils/viem/getOrMapViemChain/getOrMapViemChain.js';
13
+ import { parseAddress } from '../utils/parseAddress/parseAddress.js';
13
14
 
14
15
  class EthereumWallet extends Wallet {
16
+ constructor(props) {
17
+ super(Object.assign(Object.assign({}, props), { address: parseAddress(props.address) }));
18
+ }
15
19
  /**
16
20
  * Sends the native balance of the wallet to the given address.
17
21
  * @param amount - The amount of balance to send (in ETH).