@ant-design/web3-assets 0.1.0 → 0.1.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 CHANGED
@@ -1,5 +1,29 @@
1
1
  # @ant-design/web3-assets
2
2
 
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [a2119bf]
8
+ - @ant-design/web3-common@0.2.0
9
+
10
+ ## 0.1.1
11
+
12
+ ### Patch Changes
13
+
14
+ - 2d7ae4f: refactor: auto config wagmi provider chains
15
+ - 0df085f: feat: Add and update circle icons
16
+ - c15bfdf: feat: BrowserLink support get url from chain in @ant-design/web3-assets
17
+ - e4535ff: feat: add new wallet CoinbaseWallet
18
+ - Updated dependencies [2d7ae4f]
19
+ - Updated dependencies [0df085f]
20
+ - Updated dependencies [9bac342]
21
+ - Updated dependencies [3fbd1eb]
22
+ - Updated dependencies [39782e4]
23
+ - Updated dependencies [c15bfdf]
24
+ - @ant-design/web3-common@0.1.1
25
+ - @ant-design/web3-icons@0.2.0
26
+
3
27
  ## 0.1.0
4
28
 
5
29
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["chains.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAY,MAAM,yBAAyB,CAAC;AAU/D,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAKpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,KAKjB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC"}
1
+ {"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["chains.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAY,MAAM,yBAAyB,CAAC;AAY/D,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAKpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,KAKjB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC"}
@@ -1,11 +1,23 @@
1
1
  import { ChainIds } from '@ant-design/web3-common';
2
- import { EthereumColorful, OptimismColorful, BSCColorful, ArbitrumColorful, PolygonColorful } from '@ant-design/web3-icons';
2
+ import { EthereumCircleColorful, OptimismCircleColorful, BSCCircleColorful, ArbitrumCircleColorful, PolygonCircleColorful, EtherscanCircleColorful, EthereumFilled } from '@ant-design/web3-icons';
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  export var Mainnet = {
5
5
  id: ChainIds.Mainnet,
6
6
  name: 'Ethereum',
7
- icon: /*#__PURE__*/_jsx(EthereumColorful, {}),
7
+ icon: /*#__PURE__*/_jsx(EthereumCircleColorful, {}),
8
+ browser: {
9
+ icon: /*#__PURE__*/_jsx(EtherscanCircleColorful, {}),
10
+ getBrowserLink: function getBrowserLink(address, type) {
11
+ if (type === 'address') {
12
+ return "https://etherscan.io/address/".concat(address);
13
+ } else if (type === 'transaction') {
14
+ return "https://etherscan.io/tx/".concat(address);
15
+ }
16
+ throw new Error("getBrowserLink unsupported type ".concat(type));
17
+ }
18
+ },
8
19
  nativeCurrency: {
20
+ icon: /*#__PURE__*/_jsx(EthereumFilled, {}),
9
21
  name: 'Ether',
10
22
  symbol: 'ETH',
11
23
  decimals: 18
@@ -14,7 +26,7 @@ export var Mainnet = {
14
26
  export var Goerli = {
15
27
  id: ChainIds.Goerli,
16
28
  name: 'Goerli',
17
- icon: /*#__PURE__*/_jsx(EthereumColorful, {}),
29
+ icon: /*#__PURE__*/_jsx(EthereumCircleColorful, {}),
18
30
  nativeCurrency: {
19
31
  name: 'Ether',
20
32
  symbol: 'ETH',
@@ -24,7 +36,7 @@ export var Goerli = {
24
36
  export var Polygon = {
25
37
  id: ChainIds.Polygon,
26
38
  name: 'Polygon',
27
- icon: /*#__PURE__*/_jsx(PolygonColorful, {}),
39
+ icon: /*#__PURE__*/_jsx(PolygonCircleColorful, {}),
28
40
  nativeCurrency: {
29
41
  name: 'MATIC',
30
42
  symbol: 'MATIC',
@@ -34,7 +46,7 @@ export var Polygon = {
34
46
  export var BSC = {
35
47
  id: ChainIds.BSC,
36
48
  name: 'BNB Smart Chain',
37
- icon: /*#__PURE__*/_jsx(BSCColorful, {}),
49
+ icon: /*#__PURE__*/_jsx(BSCCircleColorful, {}),
38
50
  nativeCurrency: {
39
51
  decimals: 18,
40
52
  name: 'BNB',
@@ -44,7 +56,7 @@ export var BSC = {
44
56
  export var Arbitrum = {
45
57
  id: ChainIds.Arbitrum,
46
58
  name: 'Arbitrum One',
47
- icon: /*#__PURE__*/_jsx(ArbitrumColorful, {}),
59
+ icon: /*#__PURE__*/_jsx(ArbitrumCircleColorful, {}),
48
60
  nativeCurrency: {
49
61
  name: 'Ether',
50
62
  symbol: 'ETH',
@@ -54,7 +66,7 @@ export var Arbitrum = {
54
66
  export var Optimism = {
55
67
  id: ChainIds.Optimism,
56
68
  name: 'OP Mainnet',
57
- icon: /*#__PURE__*/_jsx(OptimismColorful, {}),
69
+ icon: /*#__PURE__*/_jsx(OptimismCircleColorful, {}),
58
70
  nativeCurrency: {
59
71
  name: 'Ether',
60
72
  symbol: 'ETH',
@@ -0,0 +1,2 @@
1
+ import type { WalletMetadata } from '@ant-design/web3-common';
2
+ export declare const metadata_CoinbaseWallet: WalletMetadata;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coinbase-wallet.d.ts","sourceRoot":"","sources":["coinbase-wallet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,eAAO,MAAM,uBAAuB,EAAE,cAgBrC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { CoinbaseWalletCircleColorful, ChromeCircleColorful } from '@ant-design/web3-icons';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ export var metadata_CoinbaseWallet = {
4
+ icon: /*#__PURE__*/_jsx(CoinbaseWalletCircleColorful, {}),
5
+ name: 'Coinbase Wallet',
6
+ remark: 'Coinbase Wallet',
7
+ app: {
8
+ link: 'https://www.coinbase.com/wallet'
9
+ },
10
+ extensions: [{
11
+ key: 'Chrome',
12
+ browserIcon: /*#__PURE__*/_jsx(ChromeCircleColorful, {}),
13
+ browserName: 'Chrome',
14
+ link: 'https://chromewebstore.google.com/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad',
15
+ description: 'Access your wallet right from your favorite web browser.'
16
+ }]
17
+ };
@@ -1,2 +1,3 @@
1
1
  export * from './meta-mask';
2
2
  export * from './wallet-connect';
3
+ export * from './coinbase-wallet';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from "./meta-mask";
2
- export * from "./wallet-connect";
2
+ export * from "./wallet-connect";
3
+ export * from "./coinbase-wallet";
@@ -1,4 +1,4 @@
1
- import { MetaMaskColorful, ChromeColorful } from '@ant-design/web3-icons';
1
+ import { MetaMaskColorful, ChromeCircleColorful } from '@ant-design/web3-icons';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  export var metadata_MetaMask = {
4
4
  icon: /*#__PURE__*/_jsx(MetaMaskColorful, {}),
@@ -9,7 +9,7 @@ export var metadata_MetaMask = {
9
9
  },
10
10
  extensions: [{
11
11
  key: 'Chrome',
12
- browserIcon: /*#__PURE__*/_jsx(ChromeColorful, {}),
12
+ browserIcon: /*#__PURE__*/_jsx(ChromeCircleColorful, {}),
13
13
  browserName: 'Chrome',
14
14
  link: 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn',
15
15
  description: 'Access your wallet right from your favorite web browser.'
@@ -1 +1 @@
1
- {"version":3,"file":"wallet-connect.d.ts","sourceRoot":"","sources":["wallet-connect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,eAAO,MAAM,sBAAsB,EAAE,cAQpC,CAAC"}
1
+ {"version":3,"file":"wallet-connect.d.ts","sourceRoot":"","sources":["wallet-connect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,eAAO,MAAM,sBAAsB,EAAE,cAOpC,CAAC"}
@@ -6,6 +6,5 @@ export var metadata_WalletConnect = {
6
6
  remark: 'Connect with mobile APP',
7
7
  app: {
8
8
  link: 'https://walletconnect.com/'
9
- },
10
- group: 'Popular'
9
+ }
11
10
  };
@@ -7,69 +7,75 @@ exports.Polygon = exports.Optimism = exports.Mainnet = exports.Goerli = exports.
7
7
  var _web3Common = require("@ant-design/web3-common");
8
8
  var _web3Icons = require("@ant-design/web3-icons");
9
9
  var _jsxRuntime = require("react/jsx-runtime");
10
- const Mainnet = {
10
+ const Mainnet = exports.Mainnet = {
11
11
  id: _web3Common.ChainIds.Mainnet,
12
12
  name: 'Ethereum',
13
- icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.EthereumColorful, {}),
13
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.EthereumCircleColorful, {}),
14
+ browser: {
15
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.EtherscanCircleColorful, {}),
16
+ getBrowserLink: (address, type) => {
17
+ if (type === 'address') {
18
+ return `https://etherscan.io/address/${address}`;
19
+ } else if (type === 'transaction') {
20
+ return `https://etherscan.io/tx/${address}`;
21
+ }
22
+ throw new Error(`getBrowserLink unsupported type ${type}`);
23
+ }
24
+ },
14
25
  nativeCurrency: {
26
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.EthereumFilled, {}),
15
27
  name: 'Ether',
16
28
  symbol: 'ETH',
17
29
  decimals: 18
18
30
  }
19
31
  };
20
- exports.Mainnet = Mainnet;
21
- const Goerli = {
32
+ const Goerli = exports.Goerli = {
22
33
  id: _web3Common.ChainIds.Goerli,
23
34
  name: 'Goerli',
24
- icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.EthereumColorful, {}),
35
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.EthereumCircleColorful, {}),
25
36
  nativeCurrency: {
26
37
  name: 'Ether',
27
38
  symbol: 'ETH',
28
39
  decimals: 18
29
40
  }
30
41
  };
31
- exports.Goerli = Goerli;
32
- const Polygon = {
42
+ const Polygon = exports.Polygon = {
33
43
  id: _web3Common.ChainIds.Polygon,
34
44
  name: 'Polygon',
35
- icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.PolygonColorful, {}),
45
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.PolygonCircleColorful, {}),
36
46
  nativeCurrency: {
37
47
  name: 'MATIC',
38
48
  symbol: 'MATIC',
39
49
  decimals: 18
40
50
  }
41
51
  };
42
- exports.Polygon = Polygon;
43
- const BSC = {
52
+ const BSC = exports.BSC = {
44
53
  id: _web3Common.ChainIds.BSC,
45
54
  name: 'BNB Smart Chain',
46
- icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.BSCColorful, {}),
55
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.BSCCircleColorful, {}),
47
56
  nativeCurrency: {
48
57
  decimals: 18,
49
58
  name: 'BNB',
50
59
  symbol: 'BNB'
51
60
  }
52
61
  };
53
- exports.BSC = BSC;
54
- const Arbitrum = {
62
+ const Arbitrum = exports.Arbitrum = {
55
63
  id: _web3Common.ChainIds.Arbitrum,
56
64
  name: 'Arbitrum One',
57
- icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.ArbitrumColorful, {}),
65
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.ArbitrumCircleColorful, {}),
58
66
  nativeCurrency: {
59
67
  name: 'Ether',
60
68
  symbol: 'ETH',
61
69
  decimals: 18
62
70
  }
63
71
  };
64
- exports.Arbitrum = Arbitrum;
65
- const Optimism = {
72
+ const Optimism = exports.Optimism = {
66
73
  id: _web3Common.ChainIds.Optimism,
67
74
  name: 'OP Mainnet',
68
- icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.OptimismColorful, {}),
75
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.OptimismCircleColorful, {}),
69
76
  nativeCurrency: {
70
77
  name: 'Ether',
71
78
  symbol: 'ETH',
72
79
  decimals: 18
73
80
  }
74
- };
75
- exports.Optimism = Optimism;
81
+ };
@@ -0,0 +1,2 @@
1
+ import type { WalletMetadata } from '@ant-design/web3-common';
2
+ export declare const metadata_CoinbaseWallet: WalletMetadata;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.metadata_CoinbaseWallet = void 0;
7
+ var _web3Icons = require("@ant-design/web3-icons");
8
+ var _jsxRuntime = require("react/jsx-runtime");
9
+ const metadata_CoinbaseWallet = exports.metadata_CoinbaseWallet = {
10
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.CoinbaseWalletCircleColorful, {}),
11
+ name: 'Coinbase Wallet',
12
+ remark: 'Coinbase Wallet',
13
+ app: {
14
+ link: 'https://www.coinbase.com/wallet'
15
+ },
16
+ extensions: [{
17
+ key: 'Chrome',
18
+ browserIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.ChromeCircleColorful, {}),
19
+ browserName: 'Chrome',
20
+ link: 'https://chromewebstore.google.com/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad',
21
+ description: 'Access your wallet right from your favorite web browser.'
22
+ }]
23
+ };
@@ -1,2 +1,3 @@
1
1
  export * from './meta-mask';
2
2
  export * from './wallet-connect';
3
+ export * from './coinbase-wallet';
@@ -24,4 +24,15 @@ Object.keys(_walletConnect).forEach(function (key) {
24
24
  return _walletConnect[key];
25
25
  }
26
26
  });
27
+ });
28
+ var _coinbaseWallet = require("./coinbase-wallet");
29
+ Object.keys(_coinbaseWallet).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _coinbaseWallet[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _coinbaseWallet[key];
36
+ }
37
+ });
27
38
  });
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.metadata_MetaMask = void 0;
7
7
  var _web3Icons = require("@ant-design/web3-icons");
8
8
  var _jsxRuntime = require("react/jsx-runtime");
9
- const metadata_MetaMask = {
9
+ const metadata_MetaMask = exports.metadata_MetaMask = {
10
10
  icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.MetaMaskColorful, {}),
11
11
  name: 'MetaMask',
12
12
  remark: 'MetaMask Wallet',
@@ -15,11 +15,10 @@ const metadata_MetaMask = {
15
15
  },
16
16
  extensions: [{
17
17
  key: 'Chrome',
18
- browserIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.ChromeColorful, {}),
18
+ browserIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.ChromeCircleColorful, {}),
19
19
  browserName: 'Chrome',
20
20
  link: 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn',
21
21
  description: 'Access your wallet right from your favorite web browser.'
22
22
  }],
23
23
  group: 'Popular'
24
- };
25
- exports.metadata_MetaMask = metadata_MetaMask;
24
+ };
@@ -6,13 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.metadata_WalletConnect = void 0;
7
7
  var _web3Icons = require("@ant-design/web3-icons");
8
8
  var _jsxRuntime = require("react/jsx-runtime");
9
- const metadata_WalletConnect = {
9
+ const metadata_WalletConnect = exports.metadata_WalletConnect = {
10
10
  icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.WalletConnectColorful, {}),
11
11
  name: 'WalletConnect',
12
12
  remark: 'Connect with mobile APP',
13
13
  app: {
14
14
  link: 'https://walletconnect.com/'
15
- },
16
- group: 'Popular'
17
- };
18
- exports.metadata_WalletConnect = metadata_WalletConnect;
15
+ }
16
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ant-design/web3-assets",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "exports": {
5
5
  "import": "./dist/esm/index.js",
6
6
  "require": "./dist/lib/index.js",
@@ -12,16 +12,16 @@
12
12
  "README.md"
13
13
  ],
14
14
  "dependencies": {
15
- "@ant-design/web3-icons": "0.1.0",
16
- "@ant-design/web3-common": "0.1.0"
15
+ "@ant-design/web3-common": "0.2.0",
16
+ "@ant-design/web3-icons": "0.2.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@types/react": "^18.2.20",
20
- "@types/react-dom": "^18.2.7",
21
- "father": "^4.1.9",
19
+ "@types/react": "^18.2.45",
20
+ "@types/react-dom": "^18.2.18",
21
+ "father": "^4.3.8",
22
22
  "react": "^18.2.0",
23
23
  "react-dom": "^18.2.0",
24
- "typescript": "^5.0.4"
24
+ "typescript": "^5.3.3"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": ">=17.0.0",