pub enum Chain {
Ethereum,
Bitcoin,
Solana,
Tron,
Ripple,
}Expand description
Supported blockchain networks for address derivation.
This enum represents the different blockchain networks that TxGate supports
for address derivation. Each chain may have different address formats and
derivation rules.
§Example
use txgate_crypto::signer::{Signer, Secp256k1Signer, Chain};
let signer = Secp256k1Signer::generate();
// Derive Ethereum address
let eth_addr = signer.address(Chain::Ethereum).expect("valid");
assert!(eth_addr.starts_with("0x"));
// Solana requires Ed25519, so this will fail
let sol_result = signer.address(Chain::Solana);
assert!(sol_result.is_err());Variants§
Ethereum
Ethereum and EVM-compatible chains (Polygon, BSC, Arbitrum, etc.)
Bitcoin
Bitcoin mainnet
Solana
Solana (requires Ed25519)
Tron
Tron network (uses same curve as Ethereum but different address format)
Ripple
Ripple/XRP Ledger
Trait Implementations§
impl Copy for Chain
impl Eq for Chain
impl StructuralPartialEq for Chain
Auto Trait Implementations§
impl Freeze for Chain
impl RefUnwindSafe for Chain
impl Send for Chain
impl Sync for Chain
impl Unpin for Chain
impl UnwindSafe for Chain
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.