#wallet #base58 #cache #crypto #cryptonote

cryptonote-wallet

base58 for cryptonote

9 releases

✓ Uses Rust 2018 edition

new 0.2.0 Sep 17, 2019
0.1.7 Sep 4, 2019
0.1.6 May 18, 2019
0.1.5 Apr 17, 2019
Download history 20/week @ 2019-06-02 29/week @ 2019-06-09 18/week @ 2019-06-16 157/week @ 2019-06-23 61/week @ 2019-06-30 50/week @ 2019-07-07 7/week @ 2019-07-21 7/week @ 2019-07-28 30/week @ 2019-08-04 7/week @ 2019-08-11 43/week @ 2019-08-25 46/week @ 2019-09-01 23/week @ 2019-09-08

150 downloads per month

GPL-3.0-or-later

17KB
261 lines

Wallet Library For CryptoNote Based Crypto Currencies

codecov

Pure Wallet without cache

Usage

Wallet creation methods

  1. from secret keys
    let spend = b"f644de91c7defae58ff9136dcc8b03a2059fda3294865065f86554d3aaeb310c";
    let view = b"3dd9d71a6fe2b909e1603c9ac325f13f2c6ac965e7e1ec98e5e666ed84b4d40c";
    let wallet = Wallet::from_secret_keys(spend, view);
  1. from secret strings
    let spend_str = "f644de91c7defae58ff9136dcc8b03a2059fda3294865065f86554d3aaeb310c";
    let view_str = "3dd9d71a6fe2b909e1603c9ac325f13f2c6ac965e7e1ec98e5e666ed84b4d40c";
    let wallet = Wallet::from_secret_string(String::from(spend_str), String::from(view_str));

Wallet File processing

  1. load and save wallet
    // Create a wallet object
    let mut wallet = Wallet::new();

    // Load wallet from a wallet file with a password.
    wallet.load(String::from("tests/vig.wallet"), String::from(""));

    // Save current wallet to a new file with a new password.
    wallet.save(String::from("tests/vig-new.wallet"), String::from("abcd"));

Wallet instance functions

Wallet Address generation

  1. to Address
    let prefix: u64 = 0x3d;
    let mut wallet = Wallet::new();
    wallet.load(String::from("tests/vig.wallet"), String::from(""));

    // Get an Address object
    let address = wallet.to_address(prefix);
    let addressStr = address.get();
    println!("{}" , addressStr);
  1. update secret keys
    let prefix: u64 = 0x3d;
    let mut wallet = Wallet::new();
    let spend_str = "f644de91c7defae58ff9136dcc8b03a2059fda3294865065f86554d3aaeb310c";
    let view_str = "3dd9d71a6fe2b909e1603c9ac325f13f2c6ac965e7e1ec98e5e666ed84b4d40c";
    wallet.update_secret_keys(String::from(spend_str), String::from(view_str));

    // Get an Address object
    let address = wallet.to_address(prefix);
    let addressStr = address.get();
    println!("{}" , addressStr);

Dependencies

~9MB
~91K SLoC