Scorum
Public Types | Public Member Functions | Public Attributes | List of all members
scorum::protocol::authority Struct Reference

#include <authority.hpp>

Public Types

enum  classification { owner = 0 , active = 1 , key = 2 , posting = 3 }
 
typedef flat_map< public_key_type, authority_weight_typekey_authority_map
 

Public Member Functions

 authority ()
 
template<class... Args>
 authority (uint32_t threshold, Args... auths)
 
void add_authority (const public_key_type &k, authority_weight_type w)
 
void add_authority (const account_name_type &k, authority_weight_type w)
 
template<typename AuthType >
void add_authorities (AuthType k, authority_weight_type w)
 
template<typename AuthType , class... Args>
void add_authorities (AuthType k, authority_weight_type w, Args... auths)
 
std::vector< public_key_typeget_keys () const
 
bool is_impossible () const
 
uint32_t num_auths () const
 
void clear ()
 
void validate () const
 

Public Attributes

uint32_t weight_threshold = 0
 
account_authority_map account_auths
 
key_authority_map key_auths
 

Detailed Description

Definition at line 10 of file authority.hpp.

Member Typedef Documentation

◆ key_authority_map

Definition at line 52 of file authority.hpp.

Member Enumeration Documentation

◆ classification

Enumerator
owner 
active 
key 
posting 

Definition at line 16 of file authority.hpp.

Constructor & Destructor Documentation

◆ authority() [1/2]

scorum::protocol::authority::authority ( )
inline

Definition at line 12 of file authority.hpp.

◆ authority() [2/2]

template<class... Args>
scorum::protocol::authority::authority ( uint32_t  threshold,
Args...  auths 
)
inline

Definition at line 25 of file authority.hpp.

Member Function Documentation

◆ add_authorities() [1/2]

template<typename AuthType >
void scorum::protocol::authority::add_authorities ( AuthType  k,
authority_weight_type  w 
)
inline

Definition at line 34 of file authority.hpp.

◆ add_authorities() [2/2]

template<typename AuthType , class... Args>
void scorum::protocol::authority::add_authorities ( AuthType  k,
authority_weight_type  w,
Args...  auths 
)
inline

Definition at line 39 of file authority.hpp.

◆ add_authority() [1/2]

void scorum::protocol::authority::add_authority ( const account_name_type k,
authority_weight_type  w 
)

Definition at line 15 of file authority.cpp.

◆ add_authority() [2/2]

void scorum::protocol::authority::add_authority ( const public_key_type k,
authority_weight_type  w 
)

Definition at line 10 of file authority.cpp.

◆ clear()

void scorum::protocol::authority::clear ( )

Definition at line 44 of file authority.cpp.

◆ get_keys()

std::vector< public_key_type > scorum::protocol::authority::get_keys ( ) const

Definition at line 20 of file authority.cpp.

◆ is_impossible()

bool scorum::protocol::authority::is_impossible ( ) const

Definition at line 29 of file authority.cpp.

◆ num_auths()

uint32_t scorum::protocol::authority::num_auths ( ) const

Definition at line 39 of file authority.cpp.

◆ validate()

void scorum::protocol::authority::validate ( ) const

Definition at line 50 of file authority.cpp.

Member Data Documentation

◆ account_auths

account_authority_map scorum::protocol::authority::account_auths

Definition at line 55 of file authority.hpp.

◆ key_auths

key_authority_map scorum::protocol::authority::key_auths

Definition at line 56 of file authority.hpp.

◆ weight_threshold

uint32_t scorum::protocol::authority::weight_threshold = 0

Definition at line 54 of file authority.hpp.


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