@peng_kai/kit 0.1.7 → 0.1.9

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/index.ts +19 -18
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@peng_kai/kit",
3
3
  "type": "module",
4
- "version": "0.1.7",
4
+ "version": "0.1.9",
5
5
  "description": "",
6
6
  "author": "",
7
7
  "license": "ISC",
package/utils/index.ts CHANGED
@@ -73,30 +73,31 @@ export function getScanBrowser(chain: string, hash: string, type: 'transaction'
73
73
  const _chain = chain.toUpperCase();
74
74
  const evmType = () => type === 'transaction' ? 'tx' : type;
75
75
  const urlFn = {
76
- TRON: () => `https://tronscan.org/#/${type}/${hash}`,
77
- ETH: () => `https://etherscan.io/${evmType()}/${hash}`,
78
- ETHEREUM: () => `https://etherscan.io/${evmType()}/${hash}`,
79
- BSC: () => `https://bscscan.com/${evmType()}/${hash}`,
80
- BINANCE: () => `https://bscscan.com/${evmType()}/${hash}`,
81
- BASE: () => `https://basescan.org/${evmType()}/${hash}`,
82
- HECO: () => `https://hecoscan.io/#/${evmType}/${hash}`,
83
- POLYGON: () => `https://polygonscan.com/${evmType()}/${hash}`,
84
- OKEXCHAIN: () => `https://www.okx.com/cn/explorer/oktc/${evmType()}/${hash}`,
85
- OPBNB: () => `https://opbnbscan.com/${evmType()}/${hash}`,
86
- APOTS: () => {
76
+ 'TRON': () => `https://tronscan.org/#/${type}/${hash}`,
77
+ 'ETH': () => `https://etherscan.io/${evmType()}/${hash}`,
78
+ 'ETHEREUM': () => `https://etherscan.io/${evmType()}/${hash}`,
79
+ 'BSC': () => `https://bscscan.com/${evmType()}/${hash}`,
80
+ 'BINANCE': () => `https://bscscan.com/${evmType()}/${hash}`,
81
+ 'BNB CHAIN': () => `https://bscscan.com/${evmType()}/${hash}`,
82
+ 'BASE': () => `https://basescan.org/${evmType()}/${hash}`,
83
+ 'HECO': () => `https://hecoscan.io/#/${evmType}/${hash}`,
84
+ 'POLYGON': () => `https://polygonscan.com/${evmType()}/${hash}`,
85
+ 'OKEXCHAIN': () => `https://www.okx.com/cn/explorer/oktc/${evmType()}/${hash}`,
86
+ 'OPBNB': () => `https://opbnbscan.com/${evmType()}/${hash}`,
87
+ 'APOTS': () => {
87
88
  const _type = (<TypeMap>{ transaction: 'txn', address: 'account' })[type] ?? type;
88
89
  return `https://explorer.aptoslabs.com/${_type}/${hash}`;
89
90
  },
90
- ARBITRUM: () => `https://arbiscan.io/${evmType()}/${hash}`,
91
- AVALANCHE: () => `https://subnets.avax.network/c-chain/${evmType()}/${hash}`,
92
- FANTOM: () => `https://ftmscan.com/${evmType()}/${hash}`,
93
- OPTIMISM: () => `https://optimistic.etherscan.io/${evmType()}/${hash}`,
94
- SUI: () => {
91
+ 'ARBITRUM': () => `https://arbiscan.io/${evmType()}/${hash}`,
92
+ 'AVALANCHE': () => `https://subnets.avax.network/c-chain/${evmType()}/${hash}`,
93
+ 'FANTOM': () => `https://ftmscan.com/${evmType()}/${hash}`,
94
+ 'OPTIMISM': () => `https://optimistic.etherscan.io/${evmType()}/${hash}`,
95
+ 'SUI': () => {
95
96
  const _type = (<TypeMap>{ transaction: 'txblock' })[type] ?? type;
96
97
  return `https://suiexplorer.com/${_type}/${hash}`;
97
98
  },
98
- ZKSYNC: () => `https://explorer.zksync.io/${evmType()}/${hash}`,
99
- SOLANA: () => {
99
+ 'ZKSYNC': () => `https://explorer.zksync.io/${evmType()}/${hash}`,
100
+ 'SOLANA': () => {
100
101
  const _type = (<TypeMap>{ address: 'account' })[type] ?? type;
101
102
  return `https://solscan.io/${_type}/${hash}`;
102
103
  },