@ant-design/web3-assets 1.10.0 → 1.10.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 +9 -0
- package/dist/esm/chains/ethereum.js +14 -14
- package/dist/esm/solana/chains.js +3 -3
- package/dist/esm/tokens/eth.js +1 -1
- package/dist/esm/tokens/usdc.js +1 -1
- package/dist/esm/tokens/usdt.js +1 -1
- package/dist/esm/wallets/backpack.js +1 -1
- package/dist/esm/wallets/coinbase-wallet.js +1 -1
- package/dist/esm/wallets/im-token.js +11 -10
- package/dist/esm/wallets/meta-mask.js +11 -10
- package/dist/esm/wallets/mobile-wallet.js +1 -1
- package/dist/esm/wallets/okx-wallet.js +1 -1
- package/dist/esm/wallets/phantom.js +1 -1
- package/dist/esm/wallets/safeheron.js +1 -1
- package/dist/esm/wallets/token-pocket.js +1 -1
- package/dist/esm/wallets/trust.js +1 -1
- package/dist/esm/wallets/unisat-wallet.js +1 -1
- package/dist/esm/wallets/wallet-connect.js +1 -1
- package/dist/esm/wallets/xverse.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChainIds, ChainType, createGetBrowserLink } from '@ant-design/web3-common';
|
|
2
2
|
import { ArbitrumCircleColorful, AvalancheCircleColorful, BSCCircleColorful, EthereumCircleColorful, EthereumColorful, EthereumFilled, EtherscanCircleColorful, HardhatColorful, OkxWalletColorful, OptimismCircleColorful, PolygonCircleColorful, ScrollColorful } from '@ant-design/web3-icons';
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
export
|
|
4
|
+
export const Mainnet = {
|
|
5
5
|
id: ChainIds.Mainnet,
|
|
6
6
|
name: 'Ethereum',
|
|
7
7
|
type: ChainType.EVM,
|
|
@@ -21,7 +21,7 @@ export var Mainnet = {
|
|
|
21
21
|
/**
|
|
22
22
|
* @deprecated use sepolia or holesky instead
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export const Goerli = {
|
|
25
25
|
id: ChainIds.Goerli,
|
|
26
26
|
name: 'Goerli',
|
|
27
27
|
type: ChainType.EVM,
|
|
@@ -36,7 +36,7 @@ export var Goerli = {
|
|
|
36
36
|
decimals: 18
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export const Sepolia = {
|
|
40
40
|
id: ChainIds.Sepolia,
|
|
41
41
|
name: 'Sepolia',
|
|
42
42
|
type: ChainType.EVM,
|
|
@@ -51,7 +51,7 @@ export var Sepolia = {
|
|
|
51
51
|
decimals: 18
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
export
|
|
54
|
+
export const Holesky = {
|
|
55
55
|
id: ChainIds.Holesky,
|
|
56
56
|
name: 'Holesky',
|
|
57
57
|
type: ChainType.EVM,
|
|
@@ -66,7 +66,7 @@ export var Holesky = {
|
|
|
66
66
|
decimals: 18
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
export
|
|
69
|
+
export const Polygon = {
|
|
70
70
|
id: ChainIds.Polygon,
|
|
71
71
|
name: 'Polygon',
|
|
72
72
|
type: ChainType.EVM,
|
|
@@ -81,7 +81,7 @@ export var Polygon = {
|
|
|
81
81
|
decimals: 18
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
|
-
export
|
|
84
|
+
export const BSC = {
|
|
85
85
|
id: ChainIds.BSC,
|
|
86
86
|
name: 'BNB Smart Chain',
|
|
87
87
|
type: ChainType.EVM,
|
|
@@ -96,7 +96,7 @@ export var BSC = {
|
|
|
96
96
|
symbol: 'BNB'
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
-
export
|
|
99
|
+
export const Arbitrum = {
|
|
100
100
|
id: ChainIds.Arbitrum,
|
|
101
101
|
name: 'Arbitrum One',
|
|
102
102
|
type: ChainType.EVM,
|
|
@@ -111,7 +111,7 @@ export var Arbitrum = {
|
|
|
111
111
|
decimals: 18
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
|
-
export
|
|
114
|
+
export const Optimism = {
|
|
115
115
|
id: ChainIds.Optimism,
|
|
116
116
|
name: 'OP Mainnet',
|
|
117
117
|
type: ChainType.EVM,
|
|
@@ -126,7 +126,7 @@ export var Optimism = {
|
|
|
126
126
|
decimals: 18
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
|
-
export
|
|
129
|
+
export const Avalanche = {
|
|
130
130
|
id: ChainIds.Avalanche,
|
|
131
131
|
name: 'Avalanche',
|
|
132
132
|
type: ChainType.EVM,
|
|
@@ -143,7 +143,7 @@ export var Avalanche = {
|
|
|
143
143
|
};
|
|
144
144
|
|
|
145
145
|
// OKX X1: https://www.okx.com/cn/x1/docs/developer/build-on-x1/quickstart
|
|
146
|
-
export
|
|
146
|
+
export const X1Testnet = {
|
|
147
147
|
id: ChainIds.X1Testnet,
|
|
148
148
|
name: 'X1 testnet',
|
|
149
149
|
type: ChainType.EVM,
|
|
@@ -158,7 +158,7 @@ export var X1Testnet = {
|
|
|
158
158
|
decimals: 18
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
|
-
export
|
|
161
|
+
export const Scroll = {
|
|
162
162
|
id: ChainIds.Scroll,
|
|
163
163
|
name: 'Scroll',
|
|
164
164
|
type: ChainType.EVM,
|
|
@@ -173,7 +173,7 @@ export var Scroll = {
|
|
|
173
173
|
decimals: 18
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
|
-
export
|
|
176
|
+
export const ScrollSepolia = {
|
|
177
177
|
id: ChainIds.ScrollSepolia,
|
|
178
178
|
name: 'Scroll Sepolia Testnet',
|
|
179
179
|
type: ChainType.EVM,
|
|
@@ -188,7 +188,7 @@ export var ScrollSepolia = {
|
|
|
188
188
|
decimals: 18
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
|
-
export
|
|
191
|
+
export const Hardhat = {
|
|
192
192
|
id: ChainIds.Hardhat,
|
|
193
193
|
name: 'Hardhat',
|
|
194
194
|
type: ChainType.EVM,
|
|
@@ -200,7 +200,7 @@ export var Hardhat = {
|
|
|
200
200
|
decimals: 18
|
|
201
201
|
}
|
|
202
202
|
};
|
|
203
|
-
export
|
|
203
|
+
export const Localhost = {
|
|
204
204
|
id: ChainIds.Localhost,
|
|
205
205
|
name: 'Localhost',
|
|
206
206
|
type: ChainType.EVM,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createGetBrowserLink, SolanaChainIds } from '@ant-design/web3-common';
|
|
2
2
|
import { SolanaColorful } from '@ant-design/web3-icons';
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
export
|
|
4
|
+
export const Solana = {
|
|
5
5
|
id: SolanaChainIds.MainnetBeta,
|
|
6
6
|
name: 'Solana',
|
|
7
7
|
icon: /*#__PURE__*/_jsx(SolanaColorful, {}),
|
|
@@ -15,7 +15,7 @@ export var Solana = {
|
|
|
15
15
|
decimals: 9
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export const SolanaDevnet = {
|
|
19
19
|
id: SolanaChainIds.Devnet,
|
|
20
20
|
name: 'Solana Devnet',
|
|
21
21
|
icon: /*#__PURE__*/_jsx(SolanaColorful, {}),
|
|
@@ -29,7 +29,7 @@ export var SolanaDevnet = {
|
|
|
29
29
|
decimals: 9
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export const SolanaTestnet = {
|
|
33
33
|
id: SolanaChainIds.Testnet,
|
|
34
34
|
name: 'Solana Testnet',
|
|
35
35
|
icon: /*#__PURE__*/_jsx(SolanaColorful, {}),
|
package/dist/esm/tokens/eth.js
CHANGED
package/dist/esm/tokens/usdc.js
CHANGED
|
@@ -2,7 +2,7 @@ import { UsdcColorful } from '@ant-design/web3-icons';
|
|
|
2
2
|
import { Arbitrum, Avalanche, Mainnet, Optimism, Polygon } from "../chains/ethereum";
|
|
3
3
|
import { Solana } from "../solana";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
export
|
|
5
|
+
export const USDC = {
|
|
6
6
|
name: 'USDC',
|
|
7
7
|
symbol: 'USDC',
|
|
8
8
|
decimal: 6,
|
package/dist/esm/tokens/usdt.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { USDTColorful } from '@ant-design/web3-icons';
|
|
2
2
|
import { Arbitrum, BSC, Mainnet, Optimism, Polygon } from "../chains/ethereum";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
export
|
|
4
|
+
export const USDT = {
|
|
5
5
|
name: 'Tether USD',
|
|
6
6
|
symbol: 'USDT',
|
|
7
7
|
decimal: 6,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BackpackColorful, ChromeCircleColorful } from '@ant-design/web3-icons';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
export
|
|
3
|
+
export const metadata_Backpack = {
|
|
4
4
|
icon: /*#__PURE__*/_jsx(BackpackColorful, {}),
|
|
5
5
|
name: 'Backpack',
|
|
6
6
|
remark: 'Backpack Wallet',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChromeCircleColorful, CoinbaseWalletCircleColorful } from '@ant-design/web3-icons';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
export
|
|
3
|
+
export const metadata_CoinbaseWallet = {
|
|
4
4
|
icon: /*#__PURE__*/_jsx(CoinbaseWalletCircleColorful, {}),
|
|
5
5
|
name: 'Coinbase Wallet',
|
|
6
6
|
remark: 'Coinbase Wallet',
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { ChainType } from '@ant-design/web3-common';
|
|
2
2
|
import { ImTokenColorful } from '@ant-design/web3-icons';
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
export
|
|
4
|
+
export const metadata_imToken = {
|
|
5
5
|
icon: /*#__PURE__*/_jsx(ImTokenColorful, {}),
|
|
6
6
|
name: 'imToken',
|
|
7
7
|
remark: 'Connect with mobile APP',
|
|
8
8
|
app: {
|
|
9
9
|
link: 'https://token.im/download'
|
|
10
10
|
},
|
|
11
|
-
transferQRCodeFormatter:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
tokenAddress =
|
|
17
|
-
decimal
|
|
11
|
+
transferQRCodeFormatter: params => {
|
|
12
|
+
const {
|
|
13
|
+
toAddress,
|
|
14
|
+
chainId,
|
|
15
|
+
amount,
|
|
16
|
+
tokenAddress = '',
|
|
17
|
+
decimal
|
|
18
|
+
} = params;
|
|
18
19
|
if (tokenAddress) {
|
|
19
|
-
return
|
|
20
|
+
return `ethereum:${toAddress}@${chainId}?contractAddress=${tokenAddress}&decimal=${decimal}&value=${amount}`;
|
|
20
21
|
} else {
|
|
21
|
-
return
|
|
22
|
+
return `ethereum:${toAddress}@${chainId}?decimal=18&value=${amount}`;
|
|
22
23
|
}
|
|
23
24
|
},
|
|
24
25
|
supportChainTypes: [ChainType.EVM]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChainType } from '@ant-design/web3-common';
|
|
2
2
|
import { ChromeCircleColorful, MetaMaskColorful } from '@ant-design/web3-icons';
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
export
|
|
4
|
+
export const metadata_MetaMask = {
|
|
5
5
|
icon: /*#__PURE__*/_jsx(MetaMaskColorful, {}),
|
|
6
6
|
name: 'MetaMask',
|
|
7
7
|
remark: 'MetaMask Wallet',
|
|
@@ -16,17 +16,18 @@ export var metadata_MetaMask = {
|
|
|
16
16
|
description: 'Access your wallet right from your favorite web browser.'
|
|
17
17
|
}],
|
|
18
18
|
group: 'Popular',
|
|
19
|
-
transferQRCodeFormatter:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
tokenAddress =
|
|
25
|
-
decimal
|
|
19
|
+
transferQRCodeFormatter: params => {
|
|
20
|
+
const {
|
|
21
|
+
toAddress,
|
|
22
|
+
chainId,
|
|
23
|
+
amount,
|
|
24
|
+
tokenAddress = '',
|
|
25
|
+
decimal
|
|
26
|
+
} = params;
|
|
26
27
|
if (tokenAddress) {
|
|
27
|
-
return
|
|
28
|
+
return `ethereum:${tokenAddress}@${chainId}/transfer?address=${toAddress}&uint256=${Number(amount) * Math.pow(10, 18 - decimal)}`;
|
|
28
29
|
} else {
|
|
29
|
-
return
|
|
30
|
+
return `ethereum:${toAddress}@${chainId}?value=${amount}`;
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
supportChainTypes: [ChainType.EVM]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ScanColorful } from '@ant-design/web3-icons';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
export
|
|
3
|
+
export const metadata_MobileConnect = {
|
|
4
4
|
icon: /*#__PURE__*/_jsx(ScanColorful, {}),
|
|
5
5
|
name: 'Scan QR Code',
|
|
6
6
|
remark: 'Connect with mobile APP',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChromeCircleColorful, OkxWalletColorful } from '@ant-design/web3-icons';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
export
|
|
3
|
+
export const metadata_OkxWallet = {
|
|
4
4
|
icon: /*#__PURE__*/_jsx(OkxWalletColorful, {}),
|
|
5
5
|
name: 'OKX Wallet',
|
|
6
6
|
remark: 'OKX Wallet',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChromeCircleColorful, PhantomColorful } from '@ant-design/web3-icons';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
export
|
|
3
|
+
export const metadata_Phantom = {
|
|
4
4
|
icon: /*#__PURE__*/_jsx(PhantomColorful, {}),
|
|
5
5
|
name: 'Phantom',
|
|
6
6
|
remark: 'Phantom Wallet',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChromeCircleColorful, SafeheronColorful } from '@ant-design/web3-icons';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
export
|
|
3
|
+
export const metadata_Safeheron = {
|
|
4
4
|
icon: /*#__PURE__*/_jsx(SafeheronColorful, {}),
|
|
5
5
|
name: 'Safeheron',
|
|
6
6
|
remark: 'Safeheron Wallet',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChainType } from '@ant-design/web3-common';
|
|
2
2
|
import { ChromeCircleColorful, TokenPocketColorful } from '@ant-design/web3-icons';
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
export
|
|
4
|
+
export const metadata_TokenPocket = {
|
|
5
5
|
icon: /*#__PURE__*/_jsx(TokenPocketColorful, {}),
|
|
6
6
|
name: 'TokenPocket',
|
|
7
7
|
remark: 'TokenPocket',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChromeCircleColorful, TrustWalletColorful } from '@ant-design/web3-icons';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
export
|
|
3
|
+
export const metadata_Trust = {
|
|
4
4
|
icon: /*#__PURE__*/_jsx(TrustWalletColorful, {}),
|
|
5
5
|
name: 'Trust',
|
|
6
6
|
remark: 'Trust Wallet',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChromeCircleColorful, UnisatColorful } from '@ant-design/web3-icons';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
export
|
|
3
|
+
export const metadata_Unisat = {
|
|
4
4
|
icon: /*#__PURE__*/_jsx(UnisatColorful, {}),
|
|
5
5
|
name: 'Unisat Wallet',
|
|
6
6
|
remark: 'Unisat Wallet',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WalletConnectColorful } from '@ant-design/web3-icons';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
export
|
|
3
|
+
export const metadata_WalletConnect = {
|
|
4
4
|
icon: /*#__PURE__*/_jsx(WalletConnectColorful, {}),
|
|
5
5
|
name: 'WalletConnect',
|
|
6
6
|
remark: 'Connect with mobile APP',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChromeCircleColorful, XverseColorful } from '@ant-design/web3-icons';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
export
|
|
3
|
+
export const metadata_Xverse = {
|
|
4
4
|
icon: /*#__PURE__*/_jsx(XverseColorful, {}),
|
|
5
5
|
name: 'Xverse',
|
|
6
6
|
remark: 'Xverse Wallet',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ant-design/web3-assets",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"url": "https://github.com/ant-design/ant-design-web3"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@ant-design/web3-icons": "1.8.
|
|
68
|
-
"@ant-design/web3-common": "1.12.
|
|
67
|
+
"@ant-design/web3-icons": "1.8.1",
|
|
68
|
+
"@ant-design/web3-common": "1.12.1"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@types/react": "^18.3.3",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"father": "^4.4.4",
|
|
74
74
|
"react": "^18.2.0",
|
|
75
75
|
"react-dom": "^18.2.0",
|
|
76
|
-
"typescript": "^5.5.
|
|
76
|
+
"typescript": "^5.5.4"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"react": ">=17.0.0",
|