Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/petermz/WavesRs

A Rust interface for the Waves blockchain
https://github.com/petermz/WavesRs

Last synced: about 2 months ago
JSON representation

A Rust interface for the Waves blockchain

Awesome Lists containing this project

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::>());
}
```