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
14
15
16
// Code generated automatically. DO NOT EDIT.

use std::collections::HashMap;
use std::sync::Arc;
use crate::blockchain::Blockchain;
use crate::binance::BinanceBlockchain;
use crate::bitcoin::BitcoinBlockchain;
use crate::pactus::PactusBlockchain;

pub fn get_blockchains() -> HashMap<String, Arc<dyn Blockchain>> {
    let mut map: HashMap<String, Arc<dyn Blockchain>> = HashMap::new();
    map.insert("binance".to_string(), Arc::new(BinanceBlockchain {}));
    map.insert("bitcoin".to_string(), Arc::new(BitcoinBlockchain {}));
    map.insert("pactus".to_string(), Arc::new(PactusBlockchain {}));
    map
}