Skip to content
This repository was archived by the owner on Feb 28, 2022. It is now read-only.

Commit ef5843d

Browse files
Update README.md
1 parent adcaec7 commit ef5843d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@ A Rust interface to the [Acryl blockchain](https://acrylplatform.com)
1010
use base58::*;
1111
use std::time::{SystemTime, UNIX_EPOCH};
1212
use acryl::account::{PrivateKeyAccount, TESTNET};
13+
use acryl::seed::*;
1314
use acryl::transaction::*;
1415

1516
fn main() {
16-
let account = PrivateKeyAccount::from_seed("seed");
17-
println!("my address: {}", account.public_key().to_address(TESTNET).to_string());
17+
let phrase = generate_phrase();
18+
let account = PrivateKeyAccount::from_seed(phrase);
19+
println!("My TESTNET address: {}", account.public_key().to_address(TESTNET).to_string());
1820

1921
let ts = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() * 1000;
2022
let tx = Transaction::new_alias(&account.public_key(), "rhino", TESTNET, 100000, ts);
21-
println!("id is {}", tx.id().to_string());
23+
println!("ID is {}", tx.id().to_string());
2224
let ptx = account.sign_transaction(tx);
23-
println!("proofs are {:?}", ptx.proofs.iter().map(|p| p.to_base58()).collect::<Vec<String>>());
25+
println!("Proofs are {:?}", ptx.proofs.iter().map(|p| p.to_base58()).collect::<Vec<String>>());
2426
}
2527
```

0 commit comments

Comments
 (0)