{"_id":"@0xhustler/stablecoins","name":"@0xhustler/stablecoins","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@0xhustler/stablecoins","version":"1.0.0","description":"A comprehensive library for obtaining stablecoin addresses across all major blockchain networks","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --clean","test":"vitest run","test:watch":"vitest","lint":"eslint src --ext .ts","prepublishOnly":"npm run build"},"keywords":["stablecoin","stablecoins","usdt","usdc","dai","crypto","blockchain","ethereum","base","arbitrum","polygon","optimism","avalanche","addresses","web3","defi"],"author":{"name":"0xHustler"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/0xHustler/stablecoins.git"},"devDependencies":{"@types/node":"^20.10.0","tsup":"^8.0.1","typescript":"^5.3.0","vitest":"^1.0.0"},"engines":{"node":">=16.0.0"},"gitHead":"5415954e6350152ee9ea0fa83597db05189421fd","_id":"@0xhustler/stablecoins@1.0.0","bugs":{"url":"https://github.com/0xHustler/stablecoins/issues"},"homepage":"https://github.com/0xHustler/stablecoins#readme","_nodeVersion":"20.18.3","_npmVersion":"11.8.0","dist":{"integrity":"sha512-h4j1lzqX/YvPENkNGRgflNuvuJgY9C/AhLBA0D4GSERdELMnxz6WO6rBXzgiN873PReUxKd0nmNEnLTvreCumQ==","shasum":"f2dbc95e638d0fe3ba25b8d482fadc48cdeee3d3","tarball":"https://registry.npmjs.org/@0xhustler/stablecoins/-/stablecoins-1.0.0.tgz","fileCount":6,"unpackedSize":63888,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCZ6nA/a2HXmekwgBoF472jmBFyoaCQ5crqPlyrn8qUSQIgBo0+RkLpZ/u6tLx9LvlUE5AU+M+s9qRwkvg5nGKIp5I="}]},"_npmUser":{"name":"0xhustler","email":"hustler0x@proton.me"},"directories":{},"maintainers":[{"name":"0xhustler","email":"hustler0x@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/stablecoins_1.0.0_1769525651654_0.4679799198448653"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-27T14:54:11.587Z","1.0.0":"2026-01-27T14:54:11.790Z","modified":"2026-01-27T14:54:11.954Z"},"maintainers":[{"name":"0xhustler","email":"hustler0x@proton.me"}],"description":"A comprehensive library for obtaining stablecoin addresses across all major blockchain networks","homepage":"https://github.com/0xHustler/stablecoins#readme","keywords":["stablecoin","stablecoins","usdt","usdc","dai","crypto","blockchain","ethereum","base","arbitrum","polygon","optimism","avalanche","addresses","web3","defi"],"repository":{"type":"git","url":"git+https://github.com/0xHustler/stablecoins.git"},"author":{"name":"0xHustler"},"bugs":{"url":"https://github.com/0xHustler/stablecoins/issues"},"license":"MIT","readme":"# @0xhustler/stablecoins\n\nA comprehensive library for obtaining stablecoin contract addresses across all major blockchain networks.\n\n## Installation\n\n```bash\nnpm install @0xhustler/stablecoins\n```\n\n```bash\nyarn add @0xhustler/stablecoins\n```\n\n```bash\npnpm add @0xhustler/stablecoins\n```\n\n## Usage\n\n### Basic Usage\n\n```typescript\nimport { usdt, usdc, dai } from \"@0xhustler/stablecoins\";\n\n// Get USDT address on Base\nconst usdtOnBase = usdt.addressOn(\"base\");\n// => \"0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2\"\n\n// Get USDC address on Arbitrum\nconst usdcOnArbitrum = usdc.addressOn(\"arbitrum\");\n// => \"0xaf88d065e77c8cC2239327C5EDb3A432268e5831\"\n\n// Get DAI address on Polygon\nconst daiOnPolygon = dai.addressOn(\"polygon\");\n// => \"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063\"\n```\n\n### Safe Address Retrieval\n\n```typescript\nimport { usdt } from \"@0xhustler/stablecoins\";\n\n// Returns undefined if not available\nconst address = usdt.addressOn(\"somechain\");\nif (address) {\n  // Use address\n}\n\n// Throws error if not available\ntry {\n  const address = usdt.addressOnOrThrow(\"somechain\");\n} catch (error) {\n  console.error(\"USDT not available on this chain\");\n}\n```\n\n### Check Availability\n\n```typescript\nimport { dai } from \"@0xhustler/stablecoins\";\n\n// Check if available on a chain\nif (dai.isAvailableOn(\"optimism\")) {\n  const address = dai.addressOn(\"optimism\");\n}\n\n// Get all chains where a stablecoin is available\nconst chains = dai.availableChains();\n// => [\"ethereum\", \"base\", \"arbitrum\", \"optimism\", \"polygon\", ...]\n```\n\n### Get Decimals\n\n```typescript\nimport { usdt, dai } from \"@0xhustler/stablecoins\";\n\n// USDT has 6 decimals on most chains\nconst usdtDecimals = usdt.decimalsOn(\"ethereum\"); // => 6\n\n// DAI has 18 decimals\nconst daiDecimals = dai.decimalsOn(\"ethereum\"); // => 18\n```\n\n### Utility Functions\n\n```typescript\nimport {\n  getStablecoinBySymbol,\n  getStablecoinsOnChain,\n  allStablecoins\n} from \"@0xhustler/stablecoins\";\n\n// Get stablecoin by symbol\nconst usdc = getStablecoinBySymbol(\"USDC\");\nconst address = usdc?.addressOn(\"base\");\n\n// Get all stablecoins available on a chain\nconst baseStablecoins = getStablecoinsOnChain(\"base\");\nbaseStablecoins.forEach((coin) => {\n  console.log(`${coin.symbol}: ${coin.addressOn(\"base\")}`);\n});\n\n// Iterate over all stablecoins\nObject.values(allStablecoins).forEach((coin) => {\n  console.log(`${coin.name} (${coin.symbol})`);\n});\n```\n\n## Supported Stablecoins\n\n| Symbol | Name | Website |\n|--------|------|---------|\n| USDT | Tether USD | https://tether.to |\n| USDC | USD Coin | https://www.circle.com/usdc |\n| DAI | Dai Stablecoin | https://makerdao.com |\n| FRAX | Frax | https://frax.finance |\n| TUSD | TrueUSD | https://trueusd.com |\n| USDP | Pax Dollar | https://paxos.com/usdp |\n| LUSD | Liquity USD | https://www.liquity.org |\n| GUSD | Gemini Dollar | https://www.gemini.com/dollar |\n| sUSD | Synthetix USD | https://synthetix.io |\n| crvUSD | Curve USD | https://curve.fi |\n| PYUSD | PayPal USD | https://www.paypal.com/pyusd |\n| BUSD | Binance USD | https://www.binance.com/busd |\n| USDD | Decentralized USD | https://usdd.io |\n| GHO | GHO | https://aave.com |\n| FDUSD | First Digital USD | https://firstdigitallabs.com |\n| MIM | Magic Internet Money | https://abracadabra.money |\n| DOLA | DOLA | https://inverse.finance |\n| EURS | Stasis Euro | https://stasis.net |\n| EURT | Tether Euro | https://tether.to |\n| EURC | Euro Coin | https://www.circle.com/eurc |\n| USDe | Ethena USDe | https://ethena.fi |\n\n## Supported Chains\n\n### EVM Chains\n- Ethereum\n- Base\n- Arbitrum\n- Optimism\n- Polygon\n- Avalanche\n- BSC (Binance Smart Chain)\n- Fantom\n- Gnosis\n- Celo\n- Moonbeam\n- Linea\n- Scroll\n- zkSync\n- Mantle\n- Blast\n- Mode\n\n### Non-EVM Chains\n- Solana\n- TRON\n- NEAR\n- Aptos\n- Sui\n\n## TypeScript Support\n\nThis package includes full TypeScript support with type definitions.\n\n```typescript\nimport type { Chain, Address, ChainAddresses } from \"@0xhustler/stablecoins\";\n\nconst chain: Chain = \"ethereum\";\nconst address: Address = \"0x...\";\n```\n\n## API Reference\n\n### Stablecoin Class\n\n| Method | Description |\n|--------|-------------|\n| `addressOn(chain)` | Get address for a chain (returns `undefined` if not available) |\n| `addressOnOrThrow(chain)` | Get address for a chain (throws if not available) |\n| `isAvailableOn(chain)` | Check if available on a chain |\n| `availableChains()` | Get all chains where available |\n| `decimalsOn(chain)` | Get decimals for a chain |\n| `allAddresses()` | Get all addresses as a record |\n| `chainId(chain)` | Get EVM chain ID |\n\n### Properties\n\n| Property | Description |\n|----------|-------------|\n| `name` | Full name of the stablecoin |\n| `symbol` | Symbol (e.g., \"USDT\") |\n| `website` | Official website URL |\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-682bf8493d57aac0a98eb95a8a36ac74"}