veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
altintegration::Address Class Reference

Represents address on VBK chain. More...

Detailed Description

Definition at line 28 of file address.hpp.

#include <address.hpp>

+ Collaboration diagram for altintegration::Address:

Public Member Functions

bool operator== (const Address &other) const noexcept
 
bool operator!= (const Address &other) const noexcept
 
bool operator== (const std::string &other) const noexcept
 
AddressType getType () const noexcept
 Return address type. More...
 
void getPopBytes (WriteStream &stream) const
 Return a Pop bytes from the address. More...
 
bool isDerivedFromPublicKey (Slice< const uint8_t > publicKey) const
 Check if given address is generated with provided public key. More...
 
bool fromString (const std::string &input, ValidationState &state)
 Parse provided string and convert it to VBK address. More...
 
std::string toString () const noexcept
 Convert VBK address to text representation. More...
 
void toVbkEncoding (WriteStream &stream) const
 Convert VBK address to data stream using VBK byte format. More...
 
size_t estimateSize () const
 

Static Public Member Functions

static Address fromPublicKey (Slice< const uint8_t > publicKey)
 Convert public key to VBK standard address. More...
 
static Address assertFromString (const std::string &input)
 

Friends

bool DeserializeFromVbkEncoding (ReadStream &stream, Address &out, ValidationState &state)
 Read data from the stream and convert it to VBK address. More...
 

Member Function Documentation

◆ fromPublicKey()

static Address altintegration::Address::fromPublicKey ( Slice< const uint8_t >  publicKey)
static
Parameters
publicKeybyte array containing public key
Returns
Address containing VBK address

◆ fromString()

bool altintegration::Address::fromString ( const std::string &  input,
ValidationState state 
)
Parameters
[in]inputshould contain text representation of an address
[out]statevalidation state
Returns
Address containing VBK address

◆ getPopBytes()

void altintegration::Address::getPopBytes ( WriteStream stream) const
Parameters
streamdata stream to write into

◆ getType()

AddressType altintegration::Address::getType ( ) const
inlinenoexcept
Returns

Definition at line 39 of file address.hpp.

39{ return m_Type; }

◆ isDerivedFromPublicKey()

bool altintegration::Address::isDerivedFromPublicKey ( Slice< const uint8_t >  publicKey) const
Parameters
publicKeybyte array containing public key
Returns
true if address is derived from public key

◆ toString()

std::string altintegration::Address::toString ( ) const
noexcept
Returns
string with VBK address

◆ toVbkEncoding()

void altintegration::Address::toVbkEncoding ( WriteStream stream) const
Parameters
streamdata stream to write into
Exceptions
std::invalid_argumentif address has unsupported type

Friends And Related Function Documentation

◆ DeserializeFromVbkEncoding

bool DeserializeFromVbkEncoding ( ReadStream stream,
Address out,
ValidationState state 
)
friend
Parameters
streamdata stream to read from
[out]outoutput address
[out]state
Returns
Address containing VBK address

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