1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! # Ethereum Classic web3 like connector library
#![cfg_attr(feature = "dev", feature(plugin))]
#![cfg_attr(feature = "dev", plugin(clippy))]

#![deny(missing_docs)]

#[macro_use]
extern crate log;

#[macro_use]
extern crate lazy_static;

#[macro_use]
extern crate serde_derive;

extern crate time;
extern crate byteorder;
extern crate chrono;
extern crate crypto;
extern crate glob;
extern crate jsonrpc_core;
extern crate jsonrpc_http_server;
extern crate rand;
extern crate regex;
extern crate reqwest;
#[cfg(all(unix))]
extern crate rust_scrypt;
extern crate rustc_serialize;
extern crate secp256k1;
extern crate serde;
extern crate serde_json;
extern crate uuid;
extern crate hex;
extern crate hidapi;
extern crate rocksdb;

mod core;
pub mod addressbook;
pub mod keystore;
pub mod rpc;
pub mod storage;
mod hdwallet;
mod util;

pub use self::core::*;
pub use self::rpc::start;
pub use self::util::*;

const VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION");

/// Get the current Emerald version.
pub fn version() -> &'static str {
    VERSION.unwrap_or("unknown")
}

#[cfg(test)]
mod tests {
    pub use super::*;
    pub use hex::{FromHex, ToHex};
    pub use regex::Regex;
    pub use rustc_serialize::json;
}