@ant-design/web3-assets 0.1.0-alpha.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 +0 -0
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/esm/chains.d.ts +7 -0
- package/dist/esm/chains.d.ts.map +1 -0
- package/dist/esm/chains.js +63 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/wallets/index.d.ts +2 -0
- package/dist/esm/wallets/index.d.ts.map +1 -0
- package/dist/esm/wallets/index.js +2 -0
- package/dist/esm/wallets/meta-mask.d.ts +2 -0
- package/dist/esm/wallets/meta-mask.d.ts.map +1 -0
- package/dist/esm/wallets/meta-mask.js +18 -0
- package/dist/esm/wallets/wallet-connect.d.ts +2 -0
- package/dist/esm/wallets/wallet-connect.d.ts.map +1 -0
- package/dist/esm/wallets/wallet-connect.js +11 -0
- package/dist/lib/chains.d.ts +7 -0
- package/dist/lib/chains.js +75 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +27 -0
- package/dist/lib/wallets/index.d.ts +2 -0
- package/dist/lib/wallets/index.js +27 -0
- package/dist/lib/wallets/meta-mask.d.ts +2 -0
- package/dist/lib/wallets/meta-mask.js +25 -0
- package/dist/lib/wallets/wallet-connect.d.ts +2 -0
- package/dist/lib/wallets/wallet-connect.js +18 -0
- package/package.json +43 -0
package/CHANGELOG.md
ADDED
|
File without changes
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Ant Design Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Chain } from '@ant-design/web3-common';
|
|
2
|
+
export declare const Mainnet: Chain;
|
|
3
|
+
export declare const Goerli: Chain;
|
|
4
|
+
export declare const Polygon: Chain;
|
|
5
|
+
export declare const BSC: Chain;
|
|
6
|
+
export declare const Arbitrum: Chain;
|
|
7
|
+
export declare const Optimism: Chain;
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ChainIds } from '@ant-design/web3-common';
|
|
2
|
+
import { EthereumColorful, OptimismColorful, BSCColorful, ArbitrumColorful, PolygonColorful } from '@ant-design/web3-icons';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
export var Mainnet = {
|
|
5
|
+
id: ChainIds.Mainnet,
|
|
6
|
+
name: 'Ethereum',
|
|
7
|
+
icon: /*#__PURE__*/_jsx(EthereumColorful, {}),
|
|
8
|
+
nativeCurrency: {
|
|
9
|
+
name: 'Ether',
|
|
10
|
+
symbol: 'ETH',
|
|
11
|
+
decimals: 18
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
export var Goerli = {
|
|
15
|
+
id: ChainIds.Goerli,
|
|
16
|
+
name: 'Goerli',
|
|
17
|
+
icon: /*#__PURE__*/_jsx(EthereumColorful, {}),
|
|
18
|
+
nativeCurrency: {
|
|
19
|
+
name: 'Ether',
|
|
20
|
+
symbol: 'ETH',
|
|
21
|
+
decimals: 18
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export var Polygon = {
|
|
25
|
+
id: ChainIds.Polygon,
|
|
26
|
+
name: 'Polygon',
|
|
27
|
+
icon: /*#__PURE__*/_jsx(PolygonColorful, {}),
|
|
28
|
+
nativeCurrency: {
|
|
29
|
+
name: 'MATIC',
|
|
30
|
+
symbol: 'MATIC',
|
|
31
|
+
decimals: 18
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export var BSC = {
|
|
35
|
+
id: ChainIds.BSC,
|
|
36
|
+
name: 'BNB Smart Chain',
|
|
37
|
+
icon: /*#__PURE__*/_jsx(BSCColorful, {}),
|
|
38
|
+
nativeCurrency: {
|
|
39
|
+
decimals: 18,
|
|
40
|
+
name: 'BNB',
|
|
41
|
+
symbol: 'BNB'
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
export var Arbitrum = {
|
|
45
|
+
id: ChainIds.Arbitrum,
|
|
46
|
+
name: 'Arbitrum One',
|
|
47
|
+
icon: /*#__PURE__*/_jsx(ArbitrumColorful, {}),
|
|
48
|
+
nativeCurrency: {
|
|
49
|
+
name: 'Ether',
|
|
50
|
+
symbol: 'ETH',
|
|
51
|
+
decimals: 18
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
export var Optimism = {
|
|
55
|
+
id: ChainIds.Optimism,
|
|
56
|
+
name: 'OP Mainnet',
|
|
57
|
+
icon: /*#__PURE__*/_jsx(OptimismColorful, {}),
|
|
58
|
+
nativeCurrency: {
|
|
59
|
+
name: 'Ether',
|
|
60
|
+
symbol: 'ETH',
|
|
61
|
+
decimals: 18
|
|
62
|
+
}
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta-mask.d.ts","sourceRoot":"","sources":["meta-mask.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,eAAO,MAAM,iBAAiB,EAAE,cAiB/B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MetaMaskColorful, ChromeColorful } from '@ant-design/web3-icons';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export var metadata_MetaMask = {
|
|
4
|
+
icon: /*#__PURE__*/_jsx(MetaMaskColorful, {}),
|
|
5
|
+
name: 'MetaMask',
|
|
6
|
+
remark: 'MetaMask Wallet',
|
|
7
|
+
app: {
|
|
8
|
+
link: 'https://metamask.io/'
|
|
9
|
+
},
|
|
10
|
+
extensions: [{
|
|
11
|
+
key: 'Chrome',
|
|
12
|
+
browserIcon: /*#__PURE__*/_jsx(ChromeColorful, {}),
|
|
13
|
+
browserName: 'Chrome',
|
|
14
|
+
link: 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn',
|
|
15
|
+
description: 'Access your wallet right from your favorite web browser.'
|
|
16
|
+
}],
|
|
17
|
+
group: 'Popular'
|
|
18
|
+
};
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WalletConnectColorful } from '@ant-design/web3-icons';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export var metadata_WalletConnect = {
|
|
4
|
+
icon: /*#__PURE__*/_jsx(WalletConnectColorful, {}),
|
|
5
|
+
name: 'WalletConnect',
|
|
6
|
+
remark: 'Connect with mobile APP',
|
|
7
|
+
app: {
|
|
8
|
+
link: 'https://walletconnect.com/'
|
|
9
|
+
},
|
|
10
|
+
group: 'Popular'
|
|
11
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Chain } from '@ant-design/web3-common';
|
|
2
|
+
export declare const Mainnet: Chain;
|
|
3
|
+
export declare const Goerli: Chain;
|
|
4
|
+
export declare const Polygon: Chain;
|
|
5
|
+
export declare const BSC: Chain;
|
|
6
|
+
export declare const Arbitrum: Chain;
|
|
7
|
+
export declare const Optimism: Chain;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Polygon = exports.Optimism = exports.Mainnet = exports.Goerli = exports.BSC = exports.Arbitrum = void 0;
|
|
7
|
+
var _web3Common = require("@ant-design/web3-common");
|
|
8
|
+
var _web3Icons = require("@ant-design/web3-icons");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
const Mainnet = {
|
|
11
|
+
id: _web3Common.ChainIds.Mainnet,
|
|
12
|
+
name: 'Ethereum',
|
|
13
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.EthereumColorful, {}),
|
|
14
|
+
nativeCurrency: {
|
|
15
|
+
name: 'Ether',
|
|
16
|
+
symbol: 'ETH',
|
|
17
|
+
decimals: 18
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.Mainnet = Mainnet;
|
|
21
|
+
const Goerli = {
|
|
22
|
+
id: _web3Common.ChainIds.Goerli,
|
|
23
|
+
name: 'Goerli',
|
|
24
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.EthereumColorful, {}),
|
|
25
|
+
nativeCurrency: {
|
|
26
|
+
name: 'Ether',
|
|
27
|
+
symbol: 'ETH',
|
|
28
|
+
decimals: 18
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.Goerli = Goerli;
|
|
32
|
+
const Polygon = {
|
|
33
|
+
id: _web3Common.ChainIds.Polygon,
|
|
34
|
+
name: 'Polygon',
|
|
35
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.PolygonColorful, {}),
|
|
36
|
+
nativeCurrency: {
|
|
37
|
+
name: 'MATIC',
|
|
38
|
+
symbol: 'MATIC',
|
|
39
|
+
decimals: 18
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.Polygon = Polygon;
|
|
43
|
+
const BSC = {
|
|
44
|
+
id: _web3Common.ChainIds.BSC,
|
|
45
|
+
name: 'BNB Smart Chain',
|
|
46
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.BSCColorful, {}),
|
|
47
|
+
nativeCurrency: {
|
|
48
|
+
decimals: 18,
|
|
49
|
+
name: 'BNB',
|
|
50
|
+
symbol: 'BNB'
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
exports.BSC = BSC;
|
|
54
|
+
const Arbitrum = {
|
|
55
|
+
id: _web3Common.ChainIds.Arbitrum,
|
|
56
|
+
name: 'Arbitrum One',
|
|
57
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.ArbitrumColorful, {}),
|
|
58
|
+
nativeCurrency: {
|
|
59
|
+
name: 'Ether',
|
|
60
|
+
symbol: 'ETH',
|
|
61
|
+
decimals: 18
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
exports.Arbitrum = Arbitrum;
|
|
65
|
+
const Optimism = {
|
|
66
|
+
id: _web3Common.ChainIds.Optimism,
|
|
67
|
+
name: 'OP Mainnet',
|
|
68
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.OptimismColorful, {}),
|
|
69
|
+
nativeCurrency: {
|
|
70
|
+
name: 'Ether',
|
|
71
|
+
symbol: 'ETH',
|
|
72
|
+
decimals: 18
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
exports.Optimism = Optimism;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _wallets = require("./wallets");
|
|
7
|
+
Object.keys(_wallets).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _wallets[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _wallets[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _chains = require("./chains");
|
|
18
|
+
Object.keys(_chains).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _chains[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _chains[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _metaMask = require("./meta-mask");
|
|
7
|
+
Object.keys(_metaMask).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _metaMask[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _metaMask[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _walletConnect = require("./wallet-connect");
|
|
18
|
+
Object.keys(_walletConnect).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _walletConnect[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _walletConnect[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.metadata_MetaMask = void 0;
|
|
7
|
+
var _web3Icons = require("@ant-design/web3-icons");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const metadata_MetaMask = {
|
|
10
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.MetaMaskColorful, {}),
|
|
11
|
+
name: 'MetaMask',
|
|
12
|
+
remark: 'MetaMask Wallet',
|
|
13
|
+
app: {
|
|
14
|
+
link: 'https://metamask.io/'
|
|
15
|
+
},
|
|
16
|
+
extensions: [{
|
|
17
|
+
key: 'Chrome',
|
|
18
|
+
browserIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.ChromeColorful, {}),
|
|
19
|
+
browserName: 'Chrome',
|
|
20
|
+
link: 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn',
|
|
21
|
+
description: 'Access your wallet right from your favorite web browser.'
|
|
22
|
+
}],
|
|
23
|
+
group: 'Popular'
|
|
24
|
+
};
|
|
25
|
+
exports.metadata_MetaMask = metadata_MetaMask;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.metadata_WalletConnect = void 0;
|
|
7
|
+
var _web3Icons = require("@ant-design/web3-icons");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const metadata_WalletConnect = {
|
|
10
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.WalletConnectColorful, {}),
|
|
11
|
+
name: 'WalletConnect',
|
|
12
|
+
remark: 'Connect with mobile APP',
|
|
13
|
+
app: {
|
|
14
|
+
link: 'https://walletconnect.com/'
|
|
15
|
+
},
|
|
16
|
+
group: 'Popular'
|
|
17
|
+
};
|
|
18
|
+
exports.metadata_WalletConnect = metadata_WalletConnect;
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ant-design/web3-assets",
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"exports": {
|
|
5
|
+
"import": "./dist/esm/index.js",
|
|
6
|
+
"require": "./dist/lib/index.js",
|
|
7
|
+
"types": "./dist/esm/index.d.ts"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"CHANGELOG.md",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@ant-design/web3-common": "0.1.0-alpha.1",
|
|
16
|
+
"@ant-design/web3-icons": "0.1.0-alpha.1"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/react": "^18.2.20",
|
|
20
|
+
"@types/react-dom": "^18.2.7",
|
|
21
|
+
"father": "^4.1.9",
|
|
22
|
+
"react": "^18.2.0",
|
|
23
|
+
"react-dom": "^18.2.0",
|
|
24
|
+
"typescript": "^5.0.4"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": ">=17.0.0",
|
|
28
|
+
"react-dom": ">=17.0.0"
|
|
29
|
+
},
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"browserslist": [
|
|
34
|
+
"last 2 versions",
|
|
35
|
+
"Firefox ESR",
|
|
36
|
+
"> 1%",
|
|
37
|
+
"ie >= 11"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"dev": "father dev",
|
|
41
|
+
"build": "father build"
|
|
42
|
+
}
|
|
43
|
+
}
|