chains-rs 0.1.1

Blockchain and asset definitions in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::asset::Asset;
use crate::types::Link;

pub trait Blockchain {
    fn name(&self) -> &str;
    fn description(&self) -> &str;
    fn website(&self) -> &str;
    fn explorer(&self) -> &str;
    fn links(&self) -> Vec<Link>;
    fn assets(&self) -> Vec<Box<dyn Asset>>;
    fn asset(&self, id: &str) -> Option<Box<dyn Asset>>;
    fn logo(&self) -> &str;
}