acryl

Crates.ioacryl
lib.rsacryl
version0.4.2
sourcesrc
created_at2020-04-04 16:56:10.174695
updated_at2020-09-10 13:34:08.446255
descriptionLibrary to work with Acryl blockchain (https://acrylplatform.com)
homepagehttps://github.com/deadblackclover/acryl-lib-rust
repositoryhttps://github.com/deadblackclover/acryl-lib-rust
max_upload_size
id226327
size36,661
DEADBLACKCLOVER (deadblackclover)

documentation

README

Acryl

crates.io docs.rs

A Rust interface to the Acryl blockchain

Usage

use base58::*;
use std::time::{SystemTime, UNIX_EPOCH};
use acryl::account::{PrivateKeyAccount, TESTNET};
use acryl::seed::*;
use acryl::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::<Vec<String>>());
}
Commit count: 55

cargo fmt