@dynamic-labs/ethereum-core 4.4.2-preview.0 → 4.4.2
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 +11 -5
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/index.cjs +2 -0
- package/src/index.js +1 -0
- package/src/utils/index.d.ts +1 -0
- package/src/utils/parseAddress/index.d.ts +1 -0
- package/src/utils/parseAddress/parseAddress.cjs +17 -0
- package/src/utils/parseAddress/parseAddress.d.ts +1 -0
- package/src/utils/parseAddress/parseAddress.js +13 -0
- package/src/wallet/EthereumWallet.cjs +4 -0
- package/src/wallet/EthereumWallet.d.ts +2 -1
- package/src/wallet/EthereumWallet.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
|
|
2
|
-
### [4.4.2
|
|
2
|
+
### [4.4.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.1...v4.4.2) (2025-01-30)
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
### Features
|
|
6
6
|
|
|
7
|
-
* add support for
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
* add support for Bitget BTC ([#7915](https://github.com/dynamic-labs/dynamic-auth/issues/7915)) ([3fe23f7](https://github.com/dynamic-labs/dynamic-auth/commit/3fe23f739818ef0f5d504c34f237d1d115e4f50c))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* add backpackeclipse to walletbook fallbacks ([#7932](https://github.com/dynamic-labs/dynamic-auth/issues/7932)) ([eeaa7da](https://github.com/dynamic-labs/dynamic-auth/commit/eeaa7da629cb06ffc856f2e7f99beefcb8553bbd))
|
|
13
|
+
* otp verified should always be true ([#7921](https://github.com/dynamic-labs/dynamic-auth/issues/7921)) ([ac884d6](https://github.com/dynamic-labs/dynamic-auth/commit/ac884d6475152778aabd72d2c923b3c0b7745b00))
|
|
14
|
+
* **qntm-2814:** return checksum address from coinbase and metamask ([#7927](https://github.com/dynamic-labs/dynamic-auth/issues/7927)) ([3169d4d](https://github.com/dynamic-labs/dynamic-auth/commit/3169d4dd717b840c3654d15bacb20780d515269b))
|
|
15
|
+
* fix: creation of embedded wallet sessions with external auth
|
|
16
|
+
|
|
11
17
|
|
|
12
18
|
### [4.4.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.0...v4.4.1) (2025-01-27)
|
|
13
19
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum-core",
|
|
3
|
-
"version": "4.4.2
|
|
3
|
+
"version": "4.4.2",
|
|
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
|
|
26
|
-
"@dynamic-labs/logger": "4.4.2
|
|
27
|
-
"@dynamic-labs/rpc-providers": "4.4.2
|
|
28
|
-
"@dynamic-labs/types": "4.4.2
|
|
29
|
-
"@dynamic-labs/utils": "4.4.2
|
|
30
|
-
"@dynamic-labs/wallet-book": "4.4.2
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "4.4.2
|
|
25
|
+
"@dynamic-labs/assert-package-version": "4.4.2",
|
|
26
|
+
"@dynamic-labs/logger": "4.4.2",
|
|
27
|
+
"@dynamic-labs/rpc-providers": "4.4.2",
|
|
28
|
+
"@dynamic-labs/types": "4.4.2",
|
|
29
|
+
"@dynamic-labs/utils": "4.4.2",
|
|
30
|
+
"@dynamic-labs/wallet-book": "4.4.2",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "4.4.2"
|
|
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
|
|
package/src/utils/index.d.ts
CHANGED
|
@@ -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;
|
|
@@ -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).
|