Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/petermz/WavesRs
A Rust interface for the Waves blockchain
https://github.com/petermz/WavesRs
Last synced: 26 days ago
JSON representation
A Rust interface for the Waves blockchain
- Host: GitHub
- URL: https://github.com/petermz/WavesRs
- Owner: petermz
- Created: 2018-08-17T13:22:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-26T11:07:58.000Z (about 6 years ago)
- Last Synced: 2024-02-13T05:03:16.403Z (10 months ago)
- Language: Rust
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-waves - WavesRS - A Rust interface for the Waves blockchain. (Frameworks and tools / Client libraries)
README
# Waves
A Rust interface to the Waves blockchain# Usage
```rust
extern crate base58;
extern crate waves;use base58::*;
use std::time::{SystemTime, UNIX_EPOCH};
use waves::account::{PrivateKeyAccount, TESTNET};
use waves::transaction::*;fn main() {
let account = PrivateKeyAccount::from_seed("seed");
println!("my 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::>());
}
```