diff --git a/package.json b/package.json index 1fe464c..e0bd028 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,7 @@ "format": "biome check --write", "prepublishOnly": "npm run build" }, - "files": [ - "src/*.ts", - "dist/lib*", - "dist/cli*" - ], + "files": ["src/*.ts", "dist/lib*", "dist/cli*"], "bin": "./dist/cli.js", "main": "./dist/lib.js", "module": "./dist/lib.mjs", @@ -45,18 +41,11 @@ "vitest": "^2.1.4" }, "tsup": { - "entry": [ - "src/action.ts", - "src/lib.ts", - "src/cli.ts" - ], + "entry": ["src/action.ts", "src/lib.ts", "src/cli.ts"], "splitting": false, "sourcemap": false, "clean": true, "dts": true, - "format": [ - "esm", - "cjs" - ] + "format": ["esm", "cjs"] } } diff --git a/src/chainIds.ts b/src/chainIds.ts index 4744d8b..50453f4 100644 --- a/src/chainIds.ts +++ b/src/chainIds.ts @@ -24,6 +24,32 @@ import { zksync, } from "viem/chains"; +export const ChainList = { + mainnet: mainnet, + polygon: polygon, + polygon_amoy: polygonAmoy, + avalanche: avalanche, + avalanche_fuji: avalancheFuji, + arbitrum: arbitrum, + arbitrum_sepolia: arbitrumSepolia, + fantom: fantom, + fantom_testnet: fantomTestnet, + optimism: optimism, + optimism_sepolia: optimismSepolia, + harmony: harmonyOne, + sepolia: sepolia, + scroll: scroll, + scroll_sepolia: scrollSepolia, + metis: metis, + base: base, + base_sepolia: baseSepolia, + bnb: bsc, + gnosis: gnosis, + zkEVM: polygonZkEvm, + celo: celo, + zksync: zksync, +}; + export const ChainId = { mainnet: mainnet.id, polygon: polygon.id, diff --git a/src/lib.ts b/src/lib.ts index 389be83..3b81825 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -1,5 +1,5 @@ import { networkMap } from "./alchemyIds"; -import { ChainId } from "./chainIds"; +import { ChainId, ChainList } from "./chainIds"; type SupportedChainIds = (typeof ChainId)[keyof typeof ChainId]; @@ -91,4 +91,4 @@ export const getRPCUrl = ( } }; -export { ChainId }; +export { ChainId, ChainList };