{"id":26534898,"url":"https://github.com/surewht/tokenlist","last_synced_at":"2026-04-16T05:34:32.105Z","repository":{"id":279529067,"uuid":"939114411","full_name":"surewht/tokenlist","owner":"surewht","description":"A uniswap compatible, strictly-typed tokenlist starter-kit generator, tailored for package publishing.","archived":false,"fork":false,"pushed_at":"2025-02-26T17:37:08.000Z","size":241,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T20:39:34.139Z","etag":null,"topics":["defi","template","tokenlist","typescript","uniswap"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/surewht.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2025-02-26T02:32:37.000Z","updated_at":"2025-02-26T17:37:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"14f2440c-3c70-402b-a0f2-175012b17c41","html_url":"https://github.com/surewht/tokenlist","commit_stats":null,"previous_names":["tokdaniel/tokenlist","surewht/tokenlist"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/surewht/tokenlist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surewht%2Ftokenlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surewht%2Ftokenlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surewht%2Ftokenlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surewht%2Ftokenlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/surewht","download_url":"https://codeload.github.com/surewht/tokenlist/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surewht%2Ftokenlist/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31872660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["defi","template","tokenlist","typescript","uniswap"],"created_at":"2025-03-21T20:29:18.134Z","updated_at":"2026-04-16T05:34:32.087Z","avatar_url":"https://github.com/surewht.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tokenlist Starterkit for creating Uniswap Tokenlist\n\nA comprehensive TypeScript library for managing token lists with built-in validation and utilities. Built on top of the Uniswap token list standard.\n\n## Features\n\n- 🔍 Token lookup by chain ID, address, or symbol\n- ✨ Type-safe token validation using Zod schemas\n- 🔒 Type-safe utilities with full TypeScript support\n- 📝 Comprehensive token list management tools\n\n## Installation\n\n```bash\nnpx create-tokenlist project-name\n```\n\n#### Make sure everything is working, by running:\n```bash\nnpm run list:validate\n```\n\n## Next Steps\n\nAfter running the npx command to create your tokenlist project, you'll need to customize it to fit your specific requirements:\n\n1. **Change the project name**: Update the `name` field in the `package.json` file to reflect your project's name.\n\n2. **Customize the token list**: Modify the token list in your project to include the tokens relevant to your use case.\n\n3. **Set up npm publishing**: To publish your bundled version on npm:\n   - Ensure you have an npm account and are logged in (`npm login`).\n   - Update the `version` field in `package.json` when making changes.\n   - Run `npm publish` to publish your package.\n   - Or create a repository, and set up a github action \n\n4. **Configure CI/CD (optional)**: Set up a CI/CD pipeline to automate the build, test, and publish process (e.g [semantic-release](https://github.com/semantic-release/semantic-release))\n\nRemember to thoroughly test your customized tokenlist before publishing to ensure it meets your specific needs and maintains the integrity of the original library.\n\n## CLI Usage\n\nThe package includes a powerful CLI tool for managing your token list. You can use it to add/remove tokens and manage tags interactively.\n\n### Starting the CLI\n\n```bash\nnpm run cli\n```\n\n### Available Commands\n\nThe CLI provides the following options:\n\n1. **Add a token**\n   - Interactively add a new token to the list\n   - Required fields:\n     - Chain ID: search for a network name\n     - Token address (0x-prefixed Ethereum address)\n     - Token name (prefilled given a correct address)\n     - Token symbol (prefilled given a correct address)\n     - Decimals (0-18) (prefilled given a correct address)\n   - Optional fields:\n     - Logo URI\n     - Tags (select from existing tags using checkbox interface)\n\n2. **Remove a token**\n   - Search for tokens by symbol\n   - Select the specific token to remove from search results\n   - Automatically updates all references\n\n3. **Add a tag**\n   - Create a new tag with:\n     - Tag identifier (1-10 alphanumeric characters and underscores)\n     - Tag name (1-20 characters)\n     - Tag description (1-200 characters)\n   - Validates input according to schema rules\n   - Prevents duplicate tag identifiers\n\n4. **Remove tags**\n   - Multi-select interface to choose tags to remove\n   - Automatically removes selected tags from:\n     - The main tags registry\n     - Any tokens that were using those tags\n   - Provides feedback on the operation\n\n### Example Usage\n\n```bash\n# Start the CLI\nnpm run cli\n\n# Choose \"Add a token\" and follow the prompts:\n\u003e Enter chain ID: 1\n\u003e Enter token address: 0x...\n\u003e Enter token name: My Token\n\u003e Enter token symbol: MTK\n\u003e Enter decimals: 18\n\u003e Enter logo URI (optional): https://...\n\u003e Select tags (if any exist): [x] stablecoin [ ] defi\n\n# Choose \"Add a tag\" and follow the prompts:\n\u003e Enter tag identifier: defi\n\u003e Enter tag name: DeFi Token\n\u003e Enter tag description: Tokens used in decentralized finance applications\n```\n\n## API Reference\n\n### Token Validation\n\n```typescript\nimport { isToken, isListedToken } from '@yourorg/yourlist';\n\n// Validate if an object matches the TokenInfo interface\nisToken(tokenObject);\n\n// Check if a token is listed in the tokenlist\nisListedToken(tokenObject);\n```\n\n### Token Lookup\n\n```typescript\nimport {\n  getTokenByChainAndAddress,\n  getTokenByChainAndSymbol,\n  getChainTokenList\n} from '@yourorg/yourlist';\n\n// Get token by chain ID and address\nconst token = getTokenByChainAndAddress(1, '0x...');\n\n// Get token by chain ID and symbol\nconst usdcToken = getTokenByChainAndSymbol(1, 'USDC');\n\n// Get all tokens for a specific chain\nconst ethereumTokens = getChainTokenList(1);\n\n// Get tokens with specific tags\nconst currencyTokens = getChainTokenList(1, ['currency']);\n```\n\n### Curried Variants\n\nFor functional programming enthusiasts, curried versions of the lookup functions are available:\n\n```typescript\nimport {\n  getTokenByChainAndAddressCurried,\n  getTokenByChainAndSymbolCurried\n} from '@yourorg/yourlist';\n\nconst getEthereumToken = getTokenByChainAndAddressCurried(1);\nconst token = getEthereumToken('0x...');\n\nconst getEthereumTokenBySymbol = getTokenByChainAndSymbolCurried(1);\nconst usdcToken = getEthereumTokenBySymbol('USDC');\n```\n\n### Address Utilities\n\n```typescript\nimport { isAddressEqual, isTokenEqual } from '@yourorg/yourlist';\n\n// Compare Ethereum addresses case-insensitively\nisAddressEqual(address1, address2);\n\n// Compare tokens based on chainId and address\nisTokenEqual(tokenA, tokenB);\n```\n\n## Prerequisites\n\n- Node.js \u003e= 18\n- npm \u003e= 9\n\n## Token List Format\n\nTokens follow the [Uniswap Token List](https://github.com/Uniswap/token-lists) standard:\n\n```typescript\ninterface TokenInfo {\n  chainId: number;\n  address: string;\n  name: string;\n  symbol: string;\n  decimals: number;\n  logoURI?: string;\n  tags?: string[];\n  extensions?: Record\u003cstring, any\u003e;\n}\n```\n\n### Validation Rules\n\n- `chainId`: Must be a positive integer\n- `address`: Must be a valid Ethereum address (0x-prefixed, 40 hex characters)\n- `name`: 1-60 characters, must contain non-whitespace characters\n- `symbol`: 1-20 characters, no whitespace\n- `decimals`: Integer between 0 and 255\n- `logoURI`: Optional, must be a valid URL if provided\n- `tags`: Optional, maximum 10 tags\n\n## Development\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/tokdaniel/tokenlist.git\ncd tokenlist\n\n# Install dependencies\nnpm install\n\n# Run tests\nnpm test\n\n# Run linter\nnpm run lint\n\n# Format code\nnpm run format\n```\n\n### Available Scripts\n\n- `npm run lint` - Run linter checks\n- `npm run format` - Format code using Biome\n- `npm run test` - Run test suite\n- `npm run coverage` - Generate test coverage report\n- `npm run list:validate` - Validate token list\n- `npm run list:build` - Build token list\n- `npm run list:bundle` - Bundle package for distribution\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'feat: add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### Commit Message Guidelines\n\nWe follow the [Conventional Commits](https://www.conventionalcommits.org/) specification:\n\n- `feat:` - New features\n- `fix:` - Bug fixes\n- `docs:` - Documentation changes\n- `style:` - Code style changes (formatting, etc.)\n- `refactor:` - Code refactoring\n- `test:` - Adding or modifying tests\n- `chore:` - Maintenance tasks\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurewht%2Ftokenlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurewht%2Ftokenlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurewht%2Ftokenlist/lists"}