@ant-design/web3-assets 1.11.8 → 1.12.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 +22 -0
- package/dist/esm/solana/chains.js +2 -2
- package/dist/esm/wallets/im-token.js +1 -2
- package/dist/esm/wallets/index.d.ts +1 -0
- package/dist/esm/wallets/index.js +2 -1
- package/dist/esm/wallets/meta-mask.js +2 -3
- package/dist/esm/wallets/okx-wallet.js +1 -0
- package/dist/esm/wallets/phantom.js +4 -1
- package/dist/esm/wallets/solflare.d.ts +2 -0
- package/dist/esm/wallets/solflare.js +18 -0
- package/dist/lib/solana/chains.js +2 -2
- package/dist/lib/wallets/im-token.js +1 -2
- package/dist/lib/wallets/index.d.ts +1 -0
- package/dist/lib/wallets/index.js +11 -0
- package/dist/lib/wallets/meta-mask.js +2 -3
- package/dist/lib/wallets/okx-wallet.js +1 -0
- package/dist/lib/wallets/phantom.js +4 -1
- package/dist/lib/wallets/solflare.d.ts +2 -0
- package/dist/lib/wallets/solflare.js +24 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @ant-design/web3-assets
|
|
2
2
|
|
|
3
|
+
## 1.12.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [1f08bd4]
|
|
8
|
+
- Updated dependencies [0f83657]
|
|
9
|
+
- @ant-design/web3-icons@1.13.0
|
|
10
|
+
- @ant-design/web3-common@1.19.0
|
|
11
|
+
|
|
12
|
+
## 1.12.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- b6f1f1d: feat: support UniversalLink for support connect some wallet in mobile
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [b6f1f1d]
|
|
21
|
+
- Updated dependencies [b6f1f1d]
|
|
22
|
+
- @ant-design/web3-common@1.18.0
|
|
23
|
+
- @ant-design/web3-icons@1.12.0
|
|
24
|
+
|
|
3
25
|
## 1.11.8
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -21,7 +21,7 @@ export const SolanaDevnet = {
|
|
|
21
21
|
icon: /*#__PURE__*/_jsx(SolanaColorful, {}),
|
|
22
22
|
browser: {
|
|
23
23
|
icon: /*#__PURE__*/_jsx(SolanaColorful, {}),
|
|
24
|
-
getBrowserLink: (address, type) => createGetBrowserLink('https://explorer.solana.com')(address, type)
|
|
24
|
+
getBrowserLink: (address, type) => `${createGetBrowserLink('https://explorer.solana.com')(address, type)}?cluster=devnet`
|
|
25
25
|
},
|
|
26
26
|
nativeCurrency: {
|
|
27
27
|
name: 'Solana',
|
|
@@ -35,7 +35,7 @@ export const SolanaTestnet = {
|
|
|
35
35
|
icon: /*#__PURE__*/_jsx(SolanaColorful, {}),
|
|
36
36
|
browser: {
|
|
37
37
|
icon: /*#__PURE__*/_jsx(SolanaColorful, {}),
|
|
38
|
-
getBrowserLink: (address, type) => createGetBrowserLink('https://explorer.solana.com')(address, type)
|
|
38
|
+
getBrowserLink: (address, type) => `${createGetBrowserLink('https://explorer.solana.com')(address, type)}?cluster=testnet`
|
|
39
39
|
},
|
|
40
40
|
nativeCurrency: {
|
|
41
41
|
name: 'Solana',
|
|
@@ -18,9 +18,8 @@ export const metadata_imToken = {
|
|
|
18
18
|
} = params;
|
|
19
19
|
if (tokenAddress) {
|
|
20
20
|
return `ethereum:${toAddress}@${chainId}?contractAddress=${tokenAddress}&decimal=${decimal}&value=${amount}`;
|
|
21
|
-
} else {
|
|
22
|
-
return `ethereum:${toAddress}@${chainId}?decimal=18&value=${amount}`;
|
|
23
21
|
}
|
|
22
|
+
return `ethereum:${toAddress}@${chainId}?decimal=18&value=${amount}`;
|
|
24
23
|
},
|
|
25
24
|
supportChainTypes: [ChainType.EVM]
|
|
26
25
|
};
|
|
@@ -25,10 +25,9 @@ export const metadata_MetaMask = {
|
|
|
25
25
|
decimal
|
|
26
26
|
} = params;
|
|
27
27
|
if (tokenAddress) {
|
|
28
|
-
return `ethereum:${tokenAddress}@${chainId}/transfer?address=${toAddress}&uint256=${Number(amount) *
|
|
29
|
-
} else {
|
|
30
|
-
return `ethereum:${toAddress}@${chainId}?value=${amount}`;
|
|
28
|
+
return `ethereum:${tokenAddress}@${chainId}/transfer?address=${toAddress}&uint256=${Number(amount) * 10 ** (18 - decimal)}`;
|
|
31
29
|
}
|
|
30
|
+
return `ethereum:${toAddress}@${chainId}?value=${amount}`;
|
|
32
31
|
},
|
|
33
32
|
supportChainTypes: [ChainType.EVM]
|
|
34
33
|
};
|
|
@@ -13,5 +13,8 @@ export const metadata_Phantom = {
|
|
|
13
13
|
browserName: 'Chrome',
|
|
14
14
|
link: 'https://chromewebstore.google.com/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa',
|
|
15
15
|
description: 'Access your wallet right from your favorite web browser.'
|
|
16
|
-
}]
|
|
16
|
+
}],
|
|
17
|
+
deeplink: {
|
|
18
|
+
urlTemplate: 'https://phantom.com/ul/browse/${url}?ref=${ref}'
|
|
19
|
+
}
|
|
17
20
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChromeCircleColorful, SolflareColorful } from '@ant-design/web3-icons';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export const metadata_Solflare = {
|
|
4
|
+
icon: /*#__PURE__*/_jsx(SolflareColorful, {}),
|
|
5
|
+
name: 'Solflare',
|
|
6
|
+
remark: 'Solflare Wallet',
|
|
7
|
+
app: {
|
|
8
|
+
link: 'https://solflare.com/'
|
|
9
|
+
},
|
|
10
|
+
extensions: [{
|
|
11
|
+
key: 'Chrome',
|
|
12
|
+
browserIcon: /*#__PURE__*/_jsx(ChromeCircleColorful, {}),
|
|
13
|
+
browserName: 'Chrome',
|
|
14
|
+
link: 'https://chromewebstore.google.com/detail/solflare-wallet/bhhhlbepdkbapadjdnnojkbgioiodbic',
|
|
15
|
+
description: 'Access your wallet right from your favorite web browser.'
|
|
16
|
+
}]
|
|
17
|
+
// TODO suport deeplink
|
|
18
|
+
};
|
|
@@ -27,7 +27,7 @@ const SolanaDevnet = exports.SolanaDevnet = {
|
|
|
27
27
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.SolanaColorful, {}),
|
|
28
28
|
browser: {
|
|
29
29
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.SolanaColorful, {}),
|
|
30
|
-
getBrowserLink: (address, type) => (0, _web3Common.createGetBrowserLink)('https://explorer.solana.com')(address, type)
|
|
30
|
+
getBrowserLink: (address, type) => `${(0, _web3Common.createGetBrowserLink)('https://explorer.solana.com')(address, type)}?cluster=devnet`
|
|
31
31
|
},
|
|
32
32
|
nativeCurrency: {
|
|
33
33
|
name: 'Solana',
|
|
@@ -41,7 +41,7 @@ const SolanaTestnet = exports.SolanaTestnet = {
|
|
|
41
41
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.SolanaColorful, {}),
|
|
42
42
|
browser: {
|
|
43
43
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.SolanaColorful, {}),
|
|
44
|
-
getBrowserLink: (address, type) => (0, _web3Common.createGetBrowserLink)('https://explorer.solana.com')(address, type)
|
|
44
|
+
getBrowserLink: (address, type) => `${(0, _web3Common.createGetBrowserLink)('https://explorer.solana.com')(address, type)}?cluster=testnet`
|
|
45
45
|
},
|
|
46
46
|
nativeCurrency: {
|
|
47
47
|
name: 'Solana',
|
|
@@ -24,9 +24,8 @@ const metadata_imToken = exports.metadata_imToken = {
|
|
|
24
24
|
} = params;
|
|
25
25
|
if (tokenAddress) {
|
|
26
26
|
return `ethereum:${toAddress}@${chainId}?contractAddress=${tokenAddress}&decimal=${decimal}&value=${amount}`;
|
|
27
|
-
} else {
|
|
28
|
-
return `ethereum:${toAddress}@${chainId}?decimal=18&value=${amount}`;
|
|
29
27
|
}
|
|
28
|
+
return `ethereum:${toAddress}@${chainId}?decimal=18&value=${amount}`;
|
|
30
29
|
},
|
|
31
30
|
supportChainTypes: [_web3Common.ChainType.EVM]
|
|
32
31
|
};
|
|
@@ -167,4 +167,15 @@ Object.keys(_suiet).forEach(function (key) {
|
|
|
167
167
|
return _suiet[key];
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
|
+
});
|
|
171
|
+
var _solflare = require("./solflare");
|
|
172
|
+
Object.keys(_solflare).forEach(function (key) {
|
|
173
|
+
if (key === "default" || key === "__esModule") return;
|
|
174
|
+
if (key in exports && exports[key] === _solflare[key]) return;
|
|
175
|
+
Object.defineProperty(exports, key, {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
get: function () {
|
|
178
|
+
return _solflare[key];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
170
181
|
});
|
|
@@ -31,10 +31,9 @@ const metadata_MetaMask = exports.metadata_MetaMask = {
|
|
|
31
31
|
decimal
|
|
32
32
|
} = params;
|
|
33
33
|
if (tokenAddress) {
|
|
34
|
-
return `ethereum:${tokenAddress}@${chainId}/transfer?address=${toAddress}&uint256=${Number(amount) *
|
|
35
|
-
} else {
|
|
36
|
-
return `ethereum:${toAddress}@${chainId}?value=${amount}`;
|
|
34
|
+
return `ethereum:${tokenAddress}@${chainId}/transfer?address=${toAddress}&uint256=${Number(amount) * 10 ** (18 - decimal)}`;
|
|
37
35
|
}
|
|
36
|
+
return `ethereum:${toAddress}@${chainId}?value=${amount}`;
|
|
38
37
|
},
|
|
39
38
|
supportChainTypes: [_web3Common.ChainType.EVM]
|
|
40
39
|
};
|
|
@@ -19,5 +19,8 @@ const metadata_Phantom = exports.metadata_Phantom = {
|
|
|
19
19
|
browserName: 'Chrome',
|
|
20
20
|
link: 'https://chromewebstore.google.com/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa',
|
|
21
21
|
description: 'Access your wallet right from your favorite web browser.'
|
|
22
|
-
}]
|
|
22
|
+
}],
|
|
23
|
+
deeplink: {
|
|
24
|
+
urlTemplate: 'https://phantom.com/ul/browse/${url}?ref=${ref}'
|
|
25
|
+
}
|
|
23
26
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.metadata_Solflare = void 0;
|
|
7
|
+
var _web3Icons = require("@ant-design/web3-icons");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const metadata_Solflare = exports.metadata_Solflare = {
|
|
10
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.SolflareColorful, {}),
|
|
11
|
+
name: 'Solflare',
|
|
12
|
+
remark: 'Solflare Wallet',
|
|
13
|
+
app: {
|
|
14
|
+
link: 'https://solflare.com/'
|
|
15
|
+
},
|
|
16
|
+
extensions: [{
|
|
17
|
+
key: 'Chrome',
|
|
18
|
+
browserIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Icons.ChromeCircleColorful, {}),
|
|
19
|
+
browserName: 'Chrome',
|
|
20
|
+
link: 'https://chromewebstore.google.com/detail/solflare-wallet/bhhhlbepdkbapadjdnnojkbgioiodbic',
|
|
21
|
+
description: 'Access your wallet right from your favorite web browser.'
|
|
22
|
+
}]
|
|
23
|
+
// TODO suport deeplink
|
|
24
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ant-design/web3-assets",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"url": "https://github.com/ant-design/ant-design-web3"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@ant-design/web3-
|
|
74
|
-
"@ant-design/web3-
|
|
73
|
+
"@ant-design/web3-icons": "1.13.0",
|
|
74
|
+
"@ant-design/web3-common": "1.19.0"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@types/react": "^18.3.5",
|