BitShares-Core  5.0.0
BitShares blockchain implementation and command-line interface software
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
graphene::protocol::address Class Reference

a 160 bit hash of a public key More...

#include <address.hpp>

Public Member Functions

 address ()
 constructs empty / null address More...
 
 address (const std::string &base58str)
 converts to binary, validates checksum More...
 
 address (const fc::ecc::public_key &pub)
 converts to binary More...
 
 address (const fc::ecc::public_key_data &pub)
 converts to binary More...
 
 address (const pts_address &pub)
 converts to binary More...
 
 address (const public_key_type &pubkey)
 
 operator std::string () const
 converts to base58 + checksum More...
 

Static Public Member Functions

static bool is_valid (const std::string &base58str, const std::string &prefix=GRAPHENE_ADDRESS_PREFIX)
 

Public Attributes

fc::ripemd160 addr
 

Detailed Description

a 160 bit hash of a public key

An address can be converted to or from a base58 string with 32 bit checksum.

An address is calculated as ripemd160( sha512( compressed_ecc_public_key ) )

When converted to a string, checksum calculated as the first 4 bytes ripemd160( address ) is appended to the binary address before converting to base58.

Definition at line 44 of file address.hpp.

Constructor & Destructor Documentation

graphene::protocol::address::address ( )
inline

constructs empty / null address

Definition at line 47 of file address.hpp.

graphene::protocol::address::address ( const std::string &  base58str)
explicit

converts to binary, validates checksum

Definition at line 33 of file address.cpp.

graphene::protocol::address::address ( const fc::ecc::public_key pub)

converts to binary

Definition at line 69 of file address.cpp.

graphene::protocol::address::address ( const fc::ecc::public_key_data pub)
explicit

converts to binary

Definition at line 80 of file address.cpp.

graphene::protocol::address::address ( const pts_address pub)

converts to binary

Definition at line 75 of file address.cpp.

graphene::protocol::address::address ( const public_key_type pubkey)

Definition at line 85 of file address.cpp.

Member Function Documentation

bool graphene::protocol::address::is_valid ( const std::string &  base58str,
const std::string &  prefix = GRAPHENE_ADDRESS_PREFIX 
)
static

Definition at line 42 of file address.cpp.

graphene::protocol::address::operator std::string ( ) const
explicit

converts to base58 + checksum

Definition at line 90 of file address.cpp.

Member Data Documentation

fc::ripemd160 graphene::protocol::address::addr

Definition at line 58 of file address.hpp.


The documentation for this class was generated from the following files: