Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/waves-rust/waves-lib-rust
Library to work with Waves blockchain :chains:
https://github.com/waves-rust/waves-lib-rust
blockchain rust waves wavesplatform
Last synced: about 2 months ago
JSON representation
Library to work with Waves blockchain :chains:
- Host: GitHub
- URL: https://github.com/waves-rust/waves-lib-rust
- Owner: waves-rust
- License: mit
- Created: 2020-09-09T13:02:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-29T06:07:19.000Z (over 1 year ago)
- Last Synced: 2024-05-12T10:20:36.775Z (8 months ago)
- Topics: blockchain, rust, waves, wavesplatform
- Language: Rust
- Homepage: https://docs.rs/wavesplatform
- Size: 111 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-waves - waves-lib-rust - Library to work with Waves blockchain. (Frameworks and tools / Client libraries)
README
# waves-lib-rust
![crates.io](https://img.shields.io/crates/v/wavesplatform.svg)
![docs.rs](https://docs.rs/wavesplatform/badge.svg)Library to work with [Waves blockchain](https://waves.tech/)
# Usage
```rust
use std::time::{SystemTime, UNIX_EPOCH};
use wavesplatform::account::{PrivateKeyAccount, TESTNET};
use wavesplatform::base58::*;
use wavesplatform::seed::*;
use wavesplatform::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::>());
}
```