3 unstable releases

✓ Uses Rust 2018 edition

0.3.0 Feb 4, 2020
0.2.2 Jun 12, 2019
0.2.1 Jun 2, 2019

#235 in Cryptocurrencies

43 downloads per month
Used in 7 crates (4 directly)

MIT/Apache

19KB
364 lines

Build Status

eosio_numstr

This crate provides functions for converting EOSIO names and symbols to and from string representations.

Creating an EOSIO name:

use eosio_numstr::name_from_bytes;
let name = name_from_bytes("eosio".bytes()).unwrap();
assert_eq!(name, 6138663577826885632);

Creating an EOSIO symbol:

use eosio_numstr::symbol_from_bytes;
let symbol = symbol_from_bytes(4, "EOS".bytes()).unwrap();
assert_eq!(symbol, 1162826500);

License: MIT OR Apache-2.0


lib.rs:

This crate provides functions for converting EOSIO names and symbols to and from string representations.

Creating an EOSIO name:

use eosio_numstr::name_from_bytes;
let name = name_from_bytes("eosio".bytes()).unwrap();
assert_eq!(name, 6138663577826885632);

Creating an EOSIO symbol:

use eosio_numstr::symbol_from_bytes;
let symbol = symbol_from_bytes(4, "EOS".bytes()).unwrap();
assert_eq!(symbol, 1162826500);

No runtime deps