Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.
forked from petermz/WavesRs

A Rust interface for the Acryl blockchain

License

Notifications You must be signed in to change notification settings

deadblackclover/acryl-lib-rust

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Rust interface for the Acryl blockchain

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%