Fabcoin Core  0.16.2
P2P Digital Currency
Namespaces | Functions
CommonJS.h File Reference
#include <string>
#include <libdevcore/CommonJS.h>
#include <libdevcrypto/Common.h>
#include "Common.h"
Include dependency graph for CommonJS.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 dev
 Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Originally by RenĂ© Nyffenegger.
 
 dev::eth
 

Functions

Public dev::jsToPublic (std::string const &_s)
 Leniently convert string to Public (h512). Accepts integers, "0x" prefixing, non-exact length. More...
 
Secret dev::jsToSecret (std::string const &_s)
 Leniently convert string to Secret (h256). Accepts integers, "0x" prefixing, non-exact length. More...
 
Address dev::jsToAddress (std::string const &_s)
 Leniently convert string to Address (h160). Accepts integers, "0x" prefixing, non-exact length. More...
 
std::string dev::prettyU256 (u256 _n, bool _abridged=true)
 Convert u256 into user-readable string. Returns int/hex value of 64 bits int, hex of 160 bits FixedHash. As a fallback try to handle input as h256. More...
 
BlockNumber dev::eth::jsToBlockNumber (std::string const &_js)
 Convert to a block number, a bit like jsToInt, except that it correctly recognises "pending" and "latest". More...