foxchain-id
Multi-chain blockchain address identification library for Rust.
Overview
foxchain-id provides functionality to identify which blockchain(s) an input string (address, public key, or private key) belongs to. It supports multiple blockchain address formats and returns normalized addresses with confidence scores for candidate chains.
Features
- Multi-chain support: Identify addresses across multiple blockchain networks
- Address normalization: Convert addresses to their canonical format
- Confidence scoring: Get confidence scores for each candidate chain
- Format detection: Automatically detect address format (EVM, Bitcoin, Solana, etc.)
- EIP-55 checksum validation: Validate and normalize EVM addresses according to EIP-55
Quick Start
use identify;
Supported Formats
Currently Implemented
- EVM Addresses (Ethereum, Polygon, BSC, Avalanche, Arbitrum, Optimism, Base, Fantom, Celo, Gnosis)
- Format:
0xfollowed by 40 hex characters - EIP-55 checksum validation and normalization
- See EVM Addresses Documentation for details
- Format:
Planned
- Bitcoin ecosystem (P2PKH, P2SH, Bech32)
- Solana addresses
- Cosmos ecosystem addresses
- Substrate/Polkadot addresses (SS58)
- Tron addresses
- And more...
See Format Documentation for detailed information about each format.
Usage
Basic Identification
use identify;
let result = identify?;
// Get normalized address
let normalized = result.normalized;
// Get all candidate chains
for candidate in result.candidates
Working with Results
use ;
let result = identify?;
// Find specific chain
if let Some = result.candidates.iter.find
// Get highest confidence candidate
let best_match = result.candidates.iter
.max_by;
Documentation
- Format Documentation - Detailed documentation for each address format
- API Documentation - Full API reference (when published)
Contributing
Contributions are welcome! Please see the main project repository for contribution guidelines.
License
This project is licensed under the GPL-3.0 license.