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
//! gemblockchain
//!
//! Library to work with Gem blockchain.
//!
//! Supports offline transaction signing and creating addresses and keys.
//!
//!# Usage
//!```rust
//! use std::time::{SystemTime, UNIX_EPOCH};
//! use gemblockchain::account::{PrivateKeyAccount, TESTNET};
//! use gemblockchain::base58::*;
//! use gemblockchain::seed::*;
//! use gemblockchain::transaction::*;
//!
//! fn main() {
//!     let phrase = generate_phrase();
//!     let account = PrivateKeyAccount::from_seed(&phrase);
//!     println!(
//!         "My TESTNET address: {}",
//!         account.public_key().to_address(TESTNET).to_string()
//!     );
//!
//!     let ts = SystemTime::now()
//!         .duration_since(UNIX_EPOCH)
//!         .unwrap()
//!         .as_secs()
//!         * 1000;
//!     let tx = Transaction::new_alias(&account.public_key(), "rhino", TESTNET, 100000, ts);
//!     println!("ID is {}", tx.id().to_string());
//!     let ptx = account.sign_transaction(tx);
//!     println!(
//!         "Proofs are {:?}",
//!         ptx.proofs
//!             .iter()
//!             .map(|p| p.to_base58())
//!             .collect::<Vec<String>>()
//!     );
//! }
//! ```
mod bytebuffer;

/// Address module
pub mod account;
/// Module for interacting with the REST API of a Waves node
pub mod node;
/// Seed phrase module
pub mod seed;
/// Transaction module
pub mod transaction;
/// Util module
pub mod util;

pub use base58;