graphenebase.base58 module¶
-
class
graphenebase.base58.
Base58
(data, prefix=None)¶ Bases:
graphenebase.prefix.Prefix
Base58 base class
This class serves as an abstraction layer to deal with base58 encoded strings and their corresponding hex and binary representation throughout the library.
Parameters: - data (hex, wif, bip38 encrypted wif, base58 string) – Data to initialize object, e.g. pubkey data, address data, …
- prefix (str) – Prefix to use for Address/PubKey strings (defaults to
GPH
)
Returns: Base58 object initialized with
data
Return type: Raises: ValueError – if data cannot be decoded
bytes(Base58)
: Returns the raw datastr(Base58)
: Returns the readableBase58CheckEncoded
data.repr(Base58)
: Gives the hex representation of the data.format(Base58,_format)
Formats the instance according to_format
: *"wif"
: prefixed with0x00
. Yields a valid wif key *"bts"
: prefixed withBTS
* etc.
-
graphenebase.base58.
b58decode
(v)¶
-
graphenebase.base58.
b58encode
(v)¶
-
graphenebase.base58.
base58CheckDecode
(s)¶
-
graphenebase.base58.
base58CheckEncode
(version, payload)¶
-
graphenebase.base58.
base58decode
(base58_str)¶
-
graphenebase.base58.
base58encode
(hexstring)¶
-
graphenebase.base58.
doublesha256
(s)¶
-
graphenebase.base58.
gphBase58CheckDecode
(s)¶
-
graphenebase.base58.
gphBase58CheckEncode
(s)¶
-
graphenebase.base58.
ripemd160
(s)¶