Skip to content

Commit 2f9b307

Browse files
Update doc
1 parent 18a2593 commit 2f9b307

3 files changed

Lines changed: 29 additions & 3 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wavesplatform"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
authors = ["peterz <peterz@rambler.ru>", "DEADBLACKCLOVER <deadblackclover@protonmail.com>"]
55
description = "Library to work with Waves blockchain (https://wavesplatform.com)"
66
edition = "2018"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use wavesplatform::transaction::*;
1515

1616
fn main() {
1717
let phrase = generate_phrase();
18-
let account = PrivateKeyAccount::from_seed(phrase);
18+
let account = PrivateKeyAccount::from_seed(&phrase);
1919
println!("My TESTNET address: {}", account.public_key().to_address(TESTNET).to_string());
2020

2121
let ts = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() * 1000;

src/lib.rs

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,33 @@
1+
#![doc(
2+
html_logo_url = "https://avatars0.githubusercontent.com/u/71018793?s=128",
3+
html_favicon_url = "https://avatars0.githubusercontent.com/u/71018793?s=256"
4+
)]
15
//! wavesplatform
26
//!
3-
//! Library to work with Waves blockchain (https://wavesplatform.com)
7+
//! Library to work with Waves blockchain (https://wavesplatform.com).
48
//!
9+
//! Supports offline transaction signing and creating addresses and keys.
10+
//!
11+
//!# Usage
12+
//!```rust
13+
//!use base58::*;
14+
//!use std::time::{SystemTime, UNIX_EPOCH};
15+
//!use wavesplatform::account::{PrivateKeyAccount, TESTNET};
16+
//!use wavesplatform::seed::*;
17+
//!use wavesplatform::transaction::*;
18+
//!
19+
//!fn main() {
20+
//! let phrase = generate_phrase();
21+
//! let account = PrivateKeyAccount::from_seed(&phrase);
22+
//! println!("My TESTNET address: {}", account.public_key().to_address(TESTNET).to_string());
23+
//!
24+
//! let ts = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() * 1000;
25+
//! let tx = Transaction::new_alias(&account.public_key(), "rhino", TESTNET, 100000, ts);
26+
//! println!("ID is {}", tx.id().to_string());
27+
//! let ptx = account.sign_transaction(tx);
28+
//! println!("Proofs are {:?}", ptx.proofs.iter().map(|p| p.to_base58()).collect::<Vec<String>>());
29+
//!}
30+
//!```
531
mod bytebuffer;
632

733
/// Address module

0 commit comments

Comments
 (0)