{"id":19854126,"url":"https://github.com/depayfi/web3-blockchains","last_synced_at":"2025-07-13T08:08:25.357Z","repository":{"id":39636467,"uuid":"378843599","full_name":"DePayFi/web3-blockchains","owner":"DePayFi","description":"⛓ JavaScript library containing aggregated information and abstractions for Web3 blockchains.","archived":false,"fork":false,"pushed_at":"2025-05-30T20:22:18.000Z","size":694,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-08T08:50:08.516Z","etag":null,"topics":["blockchains","javascript","library"],"latest_commit_sha":null,"homepage":"https://depay.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DePayFi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":"https://link.depay.com/6KFBECVsokSt0UKOAug8CI"}},"created_at":"2021-06-21T07:27:09.000Z","updated_at":"2025-05-30T20:22:11.000Z","dependencies_parsed_at":"2024-02-09T07:24:37.522Z","dependency_job_id":"44a5f5e6-e012-4e38-8e62-fa5bb584d95a","html_url":"https://github.com/DePayFi/web3-blockchains","commit_stats":{"total_commits":137,"total_committers":3,"mean_commits":"45.666666666666664","dds":"0.26277372262773724","last_synced_commit":"0b639e444bbc7eebb4482c147d5059f37b5ae698"},"previous_names":["depayfi/depay-web3-blockchains","depayfi/depay-blockchains"],"tags_count":115,"template":false,"template_full_name":null,"purl":"pkg:github/DePayFi/web3-blockchains","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DePayFi%2Fweb3-blockchains","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DePayFi%2Fweb3-blockchains/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DePayFi%2Fweb3-blockchains/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DePayFi%2Fweb3-blockchains/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DePayFi","download_url":"https://codeload.github.com/DePayFi/web3-blockchains/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DePayFi%2Fweb3-blockchains/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265108514,"owners_count":23712466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchains","javascript","library"],"created_at":"2024-11-12T14:08:36.989Z","updated_at":"2025-07-13T08:08:25.334Z","avatar_url":"https://github.com/DePayFi.png","language":"JavaScript","readme":"## Quickstart\n\n```\nyarn add @depay/web3-blockchains\n```\n\nor \n\n```\nnpm install --save @depay/web3-blockchains\n```\n\n```javascript\nimport Blockchains from '@depay/web3-blockchains'\n\nBlockchains.all\n// [\n//   { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' },\n//   { name: 'bsc', id: '0x38', label: 'Binance Smart Chain', logo: '...' },\n//   ...\n// ]\n\nBlockchains.findByName('ethereum')\n// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }\n\nBlockchains.findById('0x1')\n// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }\n\nBlockchains.findByNetworkId(1)\n// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }\n```\n\nor \n\n```javascript\nimport { all, findByName, findById, findByNetworkId } from '@depay/web3-blockchains'\n\nall\n// [\n//   { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' },\n//   { name: 'bsc', id: '0x38', label: 'Binance Smart Chain', logo: '...' },\n//   ...\n// ]\n\nfindByName('ethereum')\n// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }\n\nfindById('0x1')\n// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }\n\nfindByNetworkId(1)\n// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }\n```\n\nor \n\n```javascript\nimport Blockchains from '@depay/web3-blockchains'\n\nBlockchains['ethereums']\n// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }\n```\n\n## Support\n\nThis library supports the following blockchains:\n\n- [Ethereum](https://ethereum.org)\n- [BNB Smart Chain](https://www.binance.org/smartChain)\n- [Polygon](https://polygon.technology)\n- [Solana](https://solana.com)\n- [Fantom](https://fantom.foundation)\n- [Arbitrum](https://arbitrum.io)\n- [Avalanche](https://www.avax.network)\n- [Gnosis](https://gnosis.io)\n- [Optimism](https://www.optimism.io)\n- [Base](https://base.org)\n- [Worldchain](https://worldcoin.org/world-chain)\n\n## Data Structure\n\nBlockchain data is provided in the following structure:\n\n```javascript\n{\n  name: String, // e.g. ethereum, bsc ...\n  id: String, // e.g. 0x1, 0x38, ...\n  networkId: String, // 1, 56, ...\n  namespace: String, // eip155, solana, ...\n  label: String, // Ethereum, Binance Smart Chain ...\n  fullName: String, // Ethereum Mainnet, Binance Smart Chain Mainnet ...\n  logo: String, // base64 data or URL (logo for colored or dark background)\n  logoBackgroundColor: String // hex color\n  logoWhiteBackground: String // base64 data or url (logos for white background)\n  currency: { Object\n    name: String, // Ether, Binance Coin, ...\n    symbol: String, // ETH, BNB, ...\n    decimals: String, // 18\n    address: String, // address or placeholder address\n    logo: String, // base64 data or URL,\n  },\n  wrapped: { Object\n    address: String, // address of the wrapped native scurrency\n    decimals: Integer, // 18 \n    logo: String, // base64 data or URL\n  },\n  stables: { Object\n    usd: [ Array\n      { Object\n        address: String, // 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\n        decimals: Integer, // 18\n      }, ...\n    ]\n  },\n  explorer: String (URL), // https://etherscan.io, https://bncscan.com, ...\n  explorerUrlFor: Function ({ transaction || token }) returns String, // https://etherscan.io/tx/..., https://etherscan.io/token/...\n  endpoints: [ Array\n    String (URL), // https://rpc.ankr.com/eth\n  ],\n  sockets: [ // Array || undefined\n    String (URL), // wss://mainnet-beta.solflare.network\n  ],\n  tokens: [ Array\n    { Object\n      address: String, // 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\n      symbol: String, // USDC\n      name: String, // USD Coin\n      decimals: Integer, // 6\n      logo: String(URL|Data URL), // https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x853d955aCEf822Db058eb8505911ED77F175b99e/logo.png \n      type: String, // 20\n    }, \n  ],\n  zero: String, // 0x0000000000000000000000000000000000000000\n  maxInt: String, // 115792089237316195423570985008687907853269984665640564039457584007913129639935\n  permit2: String, // 0x000000000022D473030F116dDEE9F6B43aC78BA3 (Permit2 contract address)\n  blockTime: Integer, // in ms e.g. ethereum 12000 (12s)\n}\n```\n\n### explorerUrlFor\n\n#### Transaction\n\n```javascript\nblockchain.explorerUrlFor({ transaction: '0x51ae8875028b7ed004253f679076851abbd3a49e26faf8d7dac6bb283ca10536' })\n// https://etherscan.io/tx/0x51ae8875028b7ed004253f679076851abbd3a49e26faf8d7dac6bb283ca10536\n```\n\n#### Token\n\n```javascript\nblockchain.explorerUrlFor({ token: '0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb' })\n// https://etherscan.io/token/0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb\n```\n\n#### Address\n\n```javascript\nblockchain.explorerUrlFor({ address: '0x08B277154218CCF3380CAE48d630DA13462E3950' })\n// https://etherscan.io/address/0x08B277154218CCF3380CAE48d630DA13462E3950\n```\n\n## Functionalities\n\n### all: Retreive all information for all blockchains\n\n```javascript\nimport Blockchains from '@depay/web3-blockchains'\n\nBlockchains.all\n// [\n//   { name: 'ethereum', id: '0x1', networkId: '1', label: 'Ethereum', logo: '...' },\n//   { name: 'bsc', id: '0x38', networkId: '56', label: 'Binance Smart Chain', logo: '...' },\n//   ...\n// ]\n\n```\n\n### findById: Get blockchain by blockchain id\n\n```javascript\nimport Blockchains from '@depay/web3-blockchains'\n\nBlockchains.findById('0x1')\n// { name: 'ethereum', id: '0x1', networkId: '1', label: 'Ethereum', logo: '...' }\n\nBlockchains.findById('0x38')\n// { name: 'bsc', id: '0x38', networkId: '56', label: 'Binance Smart Chain', logo: '...' }\n```\n\n### findByName: Get blockchain by blockchain name\n\n```javascript\nimport Blockchains from '@depay/web3-blockchains'\n\nBlockchains.findByName('ethereum')\n// { name: 'ethereum', id: '0x1', networkId: '1', label: 'Ethereum', logo: '...' }\n\nBlockchains.findByName('bsc')\n// { name: 'bsc', id: '0x38', networkId: '56', label: 'Binance Smart Chain', logo: '...' }\n```\n\n### findByNetworkId: Get blockchain by network id\n\n```javascript\nimport Blockchains from '@depay/web3-blockchains'\n\nBlockchains.findByNetworkId(1)\n// { name: 'ethereum', id: '0x1', networkId: '1', label: 'Ethereum', logo: '...' }\n\nBlockchains.findByNetworkId('56')\n// { name: 'bsc', id: '0x38', networkId: '56', label: 'Binance Smart Chain', logo: '...' }\n```\n\n## Development\n\n### Get started\n\n```\nyarn install\nyarn dev\n```\n","funding_links":["https://link.depay.com/6KFBECVsokSt0UKOAug8CI"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdepayfi%2Fweb3-blockchains","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdepayfi%2Fweb3-blockchains","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdepayfi%2Fweb3-blockchains/lists"}