Metadata-Version: 2.1
Name: chain-index
Version: 0.2.4
Summary: A Python library for managing and organizing AI language model chains
Author-email: gmatrix <gmatrixuniverse@gmail.com>
License: MIT License
        
        Copyright (c) 2023 Your Name or Organization
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/gmatrixuniverse/chain_index
Keywords: web3,ethereum,blockchain,evm
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE


## API Reference

### `get_chain_info(chain_identifier: Union[int, str]) -> ChainInfo`

Retrieves chain information based on the provided identifier.

- `chain_identifier`: Can be an integer (chain ID) or a string (chain name or alias)
- Returns a `ChainInfo` object containing chain details
- Raises `ChainNotFoundError` if the chain is not found

### `ChainInfo`

A Pydantic model representing chain information. Key attributes include:

- `name`: Chain name
- `chainId`: Chain ID
- `nativeCurrency`: Native currency details (name, symbol, decimals)
- `wrapperNativeCurrency`: Wrapper native currency details (name, symbol, decimals, contract)
- `rpc`: List of RPC URLs
- `explorers`: List of block explorers

## Development

To set up the development environment:

1. Clone the repository
2. Install development dependencies: `pip install -e ".[dev]"`
3. Run tests: `pytest`

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgements

This project uses data from the [chainid.network](https://chainid.network/) project, which provides a comprehensive list of EVM-compatible chains.

## Support

If you encounter any issues or have questions, please file an issue on the GitHub repository.

## Changelog

See [CHANGELOG.md](CHANGELOG.md) for a detailed history of changes to this project.

## Authors

- gmatrix - Initial work and maintenance

## Disclaimer

This package is provided as-is, and while we strive for accuracy, we cannot guarantee the correctness of all chain information. Users should verify critical information independently.
