BitShares-Core  7.0.0
BitShares blockchain node software and command-line wallet software
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
graphene::protocol::pts_address Struct Reference

#include <pts_address.hpp>

Public Member Functions

 pts_address ()
 constructs empty / null address More...
 pts_address (const std::string &base58str)
 pts_address (const fc::ecc::public_key &pub, bool compressed=true, uint8_t version=default_version)
 Constructs from a public key. More...
uint8_t version () const
bool is_valid () const
 operator std::string () const
 converts to base58 + checksum More...

Public Attributes

std::array< char, 25 > addr {}
 binary representation of address, 0-initialized More...

Static Public Attributes

static constexpr uint8_t default_version = 56

Detailed Description

Implements address stringification and validation from PTS

Definition at line 41 of file pts_address.hpp.

Constructor & Destructor Documentation

◆ pts_address() [1/3]

graphene::protocol::pts_address::pts_address ( )

constructs empty / null address

Definition at line 34 of file pts_address.cpp.

◆ pts_address() [2/3]

graphene::protocol::pts_address::pts_address ( const std::string &  base58str)

converts to binary, validates checksum

Definition at line 39 of file pts_address.cpp.

◆ pts_address() [3/3]

graphene::protocol::pts_address::pts_address ( const fc::ecc::public_key pub,
bool  compressed = true,
uint8_t  version = default_version 

Constructs from a public key.

Definition at line 48 of file pts_address.cpp.

Member Function Documentation

◆ is_valid()

bool graphene::protocol::pts_address::is_valid ( ) const

Checks the address to verify it has a valid checksum

Definition at line 73 of file pts_address.cpp.

◆ operator std::string()

graphene::protocol::pts_address::operator std::string ( ) const

converts to base58 + checksum

Definition at line 80 of file pts_address.cpp.

◆ version()

uint8_t graphene::protocol::pts_address::version ( ) const

Definition at line 52 of file pts_address.hpp.

Member Data Documentation

◆ addr

std::array<char,25> graphene::protocol::pts_address::addr {}

binary representation of address, 0-initialized

Definition at line 57 of file pts_address.hpp.

◆ default_version

constexpr uint8_t graphene::protocol::pts_address::default_version = 56

Definition at line 43 of file pts_address.hpp.

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