{"_id":"@chanceprotocol/evm-chains-extended","name":"@chanceprotocol/evm-chains-extended","dist-tags":{"latest":"0.7.2-beta.4"},"versions":{"0.7.2-beta.4":{"name":"@chanceprotocol/evm-chains-extended","version":"0.7.2-beta.4","description":"Package to get chain data from ethereum-lists/chains with extra data such as blockExplorerUrls","author":{"name":"Chuck Bergeron","email":"chuck@chanceprotocol.com"},"license":"MIT","keywords":["evm","ethereum","chains","chainId","registry"],"publishConfig":{"access":"public"},"main":"dist/cjs/index.js","types":"dist/cjs/index.d.ts","unpkg":"dist/umd/index.min.js","homepage":"https://github.com/pooltogether/evm-chains-extended","repository":{"type":"git","url":"git+https://github.com/pooltogether/evm-chains-extended.git"},"bugs":{"url":"https://github.com/pooltogether/evm-chains-extended/issues"},"devDependencies":{"@types/bn.js":"4.11.6","@types/jest":"25.1.1","@types/node":"13.7.0","copy-webpack-plugin":"6.2.1","husky":"4.2.1","tsdx":"^0.12.3","tslib":"1.10.0","typescript":"3.7.5","webpack":"4.41.6","webpack-cli":"3.3.11"},"husky":{"hooks":{"pre-commit":"yarn lint"}},"dependencies":{"evm-chains":"^0.2.0"},"scripts":{"start":"tsdx watch --onSuccess \"yalc push\"","reinstall":"rm -rf node_modules && yarn install","clean":"rm -rf dist","build:cjs":"tsc -p tsconfig.cjs.json","build:umd":"webpack","build":"yarn clean && yarn build:cjs && yarn build:umd","test":"tsdx test ./test","lint":"tsdx lint src test"},"_id":"@chanceprotocol/evm-chains-extended@0.7.2-beta.4","_integrity":"sha512-jNk7Q9a8vJLa0ZkiOsJy8b7XVyNTmYY2xSTzeZKkyd8vJYa/7jviw0YZhhrXspdh/+DPn8M6Fuu1gneL0Ui4CA==","_resolved":"/tmp/aaf36d8c3fbd2eb4a34cb1085b48bd03/chanceprotocol-evm-chains-extended-0.7.2-beta.4.tgz","_from":"file:chanceprotocol-evm-chains-extended-0.7.2-beta.4.tgz","_nodeVersion":"16.15.1","_npmVersion":"9.6.5","dist":{"integrity":"sha512-jNk7Q9a8vJLa0ZkiOsJy8b7XVyNTmYY2xSTzeZKkyd8vJYa/7jviw0YZhhrXspdh/+DPn8M6Fuu1gneL0Ui4CA==","shasum":"f15172c3f5a103a34974666f947a442753ac34e3","tarball":"https://registry.npmjs.org/@chanceprotocol/evm-chains-extended/-/evm-chains-extended-0.7.2-beta.4.tgz","fileCount":40,"unpackedSize":249642,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFlDTLFYVIklsr3SIMP4b4WgfTodmsavGaqXkNNd8nkyAiBYqNLui84AXavVzHcm3XIrLEWJcBrdc6ftH/3SFn7gqw=="}]},"_npmUser":{"name":"chanceprotocol","email":"chance@netixsol.com"},"directories":{},"maintainers":[{"name":"chanceprotocol","email":"chance@netixsol.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/evm-chains-extended_0.7.2-beta.4_1692097283590_0.8925384421271065"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-15T11:01:23.505Z","0.7.2-beta.4":"2023-08-15T11:01:23.856Z","modified":"2023-08-15T11:01:24.122Z"},"maintainers":[{"name":"chanceprotocol","email":"chance@netixsol.com"}],"description":"Package to get chain data from ethereum-lists/chains with extra data such as blockExplorerUrls","homepage":"https://github.com/pooltogether/evm-chains-extended","keywords":["evm","ethereum","chains","chainId","registry"],"repository":{"type":"git","url":"git+https://github.com/pooltogether/evm-chains-extended.git"},"author":{"name":"Chuck Bergeron","email":"chuck@chanceprotocol.com"},"bugs":{"url":"https://github.com/pooltogether/evm-chains-extended/issues"},"license":"MIT","readme":"# evm-chains-extended\n\nPackage to query chain data from [ethereum-lists/chains](https://github.com/ethereum-lists/chains) with extended data necessary for EIP3085.\n\nMakes use of Pedro Gomes' [evm-chains](https://github.com/pedrouid/evm-chains) package for the initial data, then merges in the extended data.\n\nIncludes Block Explorer URLs and network logos for certain networks.\n\nThis package is meant as a holdover and may be deprecated in the future in favor of simply using `evm-chains`. That is dependent on EIPs such as: https://github.com/ethereum/EIPs/pull/3091\n\nNOTE: This also makes use of a silent interface pattern where missing networks will be returned undefined instead of throwing.\n\n## Install\n\n```sh\nnpm install --save evm-chains-extended\n\n#or\n\nyarn add evm-chains-extended\n```\n\n## API\n\n```typescript\nfunction getAllChains(): IChainDataExtended[] | undefined;\nfunction getChain(chainId: number): IChainDataExtended | undefined;\nfunction getChainByChainId(chainId: number): IChainDataExtended | undefined;\nfunction formatNetworkForAddEthereumChain(network: IChainDataExtended): IAddEthereumChainParameter;\n```\n\n## Logos\n\nTo use network logos import into your dapp:\n\n```typescript\nimport EthLogo from '@chanceprotocol/evm-chains-extended/dist/umd/images/ethereum-icon.png'\nimport BscLogo1 from '@chanceprotocol/evm-chains-extended/dist/umd/images/bsc-icon-1.png'\nimport BscLogo2 from '@chanceprotocol/evm-chains-extended/dist/umd/images/bsc-icon-2.png'\nimport OptimismLogo from '@chanceprotocol/evm-chains-extended/dist/umd/images/optimism-icon.png'\nimport PoALogo from '@chanceprotocol/evm-chains-extended/dist/umd/images/poa-icon.png'\nimport PolygonLogo from '@chanceprotocol/evm-chains-extended/dist/umd/images/polygon-icon.png'\nimport XDaiLogo from '@chanceprotocol/evm-chains-extended/dist/umd/images/xdai-logo.png'\n```\n\n```jsx\n// then:\n<img src={XDaiLogo} />\n```\n\n## Types\n\n```typescript\ninterface IChainDataExtended {\n  name: string;\n  chainId: number;\n  shortName: string;\n  chain: string;\n  network: string;\n  networkId: number;\n  nativeCurrency: {\n    name: string;\n    symbol: string;\n    decimals: number;\n  };\n  rpc: string[];\n  faucets: string[];\n  infoURL: string;\n  blockExplorerUrls: string[]\n}\n\n// format for EIP3085 wallet_addEthereumChain\ninterface IAddEthereumChainParameter {\n  chainId: string; // A 0x-prefixed hexadecimal string\n  chainName: string;\n  nativeCurrency: {\n    name: string;\n    symbol: string; // 2-6 characters long\n    decimals: number;\n  };\n  rpcUrls: string[];\n  blockExplorerUrls?: string[];\n  iconUrls?: string[]; // Currently ignored.\n}\n```\n\n## Data Source\n\n[https://github.com/ethereum-lists/chains](https://github.com/ethereum-lists/chains)\n","readmeFilename":"README.md"}