Crates.io | eosio_numstr |
lib.rs | eosio_numstr |
version | 0.3.0 |
source | src |
created_at | 2019-06-02 03:11:16.648234 |
updated_at | 2020-02-04 01:25:00.496444 |
description | Basic helper functions to work with EOSIO names and symbols |
homepage | https://sagan-software.github.io/eosio-rust/ |
repository | https://github.com/sagan-software/eosio-rust |
max_upload_size | |
id | 138411 |
size | 31,599 |
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