NIL-SLIP44
Mapping between SLIP-0044 coin types and the
associated metadata
SLIP-0044 is a standard that defines coin type values for use in hierarchical deterministic wallets. This crate provides type-safe access to coin types and their metadata.

Usage
Add the following dependency to your Cargo manifest...
[dependencies]
nil-slip44 = "0.3.4"
...and see the docs or What can I do? section below for how to use it.
What can I do?
use std::{convert::TryFrom, str::FromStr};
use nil_slip44::{Coin, Symbol};
fn main() {
assert_eq!(BITCOIN_ID, 0);
assert_eq!(Coin::Bitcoin.id(), 0);
assert_eq!(Coin::Bitcoin.ids(), vec![0]); assert_eq!(Coin::Bitcoin.name(), "Bitcoin");
assert_eq!(Coin::Bitcoin.to_string(), "Bitcoin");
assert_eq!(STACKS_ID, 5757);
assert_eq!(Coin::Stacks.id(), 5757);
assert_eq!(Coin::Stacks.ids(), vec![5757]); assert_eq!(Coin::Stacks.name(), "Stacks");
assert_eq!(Coin::Stacks.to_string(), "Stacks");
assert_eq!(Coin::try_from(0), Ok(Coin::Bitcoin)); assert_eq!(Coin::try_from(5757), Ok(Coin::Stacks)); assert_eq!(Coin::from_str("Bitcoin"), Ok(Coin::Bitcoin));
assert_eq!(Coin::from_str("Stacks"), Ok(Coin::Stacks));
assert_eq!(Coin::from(Symbol::BTC), Coin::Bitcoin); assert_eq!(Coin::from(Symbol::STX), Coin::Stacks);
assert_eq!(Symbol::BTC.to_string(), "BTC");
assert_eq!(Symbol::STX.to_string(), "STX");
assert_eq!(Symbol::try_from(0), Ok(Symbol::BTC)); assert_eq!(Symbol::try_from(5757), Ok(Symbol::STX)); assert_eq!(Symbol::try_from(Coin::Bitcoin), Ok(Symbol::BTC)); assert_eq!(Symbol::try_from(Coin::Stacks), Ok(Symbol::STX));
assert_eq!(Symbol::from_str("BTC"), Ok(Symbol::BTC));
assert_eq!(Symbol::from_str("STX"), Ok(Symbol::STX));
}