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

Identifies a weighted set of keys and accounts that must approve operations. More...

#include <authority.hpp>

Public Types

enum  classification { owner = 0, active = 1, key = 2 }
 

Public Member Functions

 authority ()
 
template<class... Args>
 authority (uint32_t threshhold, Args...auths)
 
void add_authority (const public_key_type &k, weight_type w)
 
void add_authority (const address &k, weight_type w)
 
void add_authority (account_id_type k, weight_type w)
 
bool is_impossible () const
 
template<typename AuthType >
void add_authorities (AuthType k, weight_type w)
 
template<typename AuthType , class... Args>
void add_authorities (AuthType k, weight_type w, Args...auths)
 
vector< public_key_typeget_keys () const
 
vector< addressget_addresses () const
 
uint32_t num_auths () const
 
void clear ()
 

Static Public Member Functions

static authority null_authority ()
 

Public Attributes

uint32_t weight_threshold = 0
 
flat_map< account_id_type, weight_typeaccount_auths
 
flat_map< public_key_type, weight_typekey_auths
 
flat_map< address, weight_typeaddress_auths
 

Friends

bool operator== (const authority &a, const authority &b)
 
bool operator!= (const authority &a, const authority &b)
 

Detailed Description

Identifies a weighted set of keys and accounts that must approve operations.

Definition at line 34 of file authority.hpp.

Member Enumeration Documentation

Enumerator
owner 

the key that is authorized to change owner, active, and voting keys

active 

the key that is able to perform normal operations

key 

Definition at line 44 of file authority.hpp.

Constructor & Destructor Documentation

graphene::protocol::authority::authority ( )
inline

Definition at line 36 of file authority.hpp.

template<class... Args>
graphene::protocol::authority::authority ( uint32_t  threshhold,
Args...  auths 
)
inline

Definition at line 38 of file authority.hpp.

Member Function Documentation

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

Definition at line 74 of file authority.hpp.

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

Definition at line 79 of file authority.hpp.

void graphene::protocol::authority::add_authority ( const public_key_type k,
weight_type  w 
)
inline

Definition at line 52 of file authority.hpp.

void graphene::protocol::authority::add_authority ( const address k,
weight_type  w 
)
inline

Definition at line 56 of file authority.hpp.

void graphene::protocol::authority::add_authority ( account_id_type  k,
weight_type  w 
)
inline

Definition at line 60 of file authority.hpp.

void graphene::protocol::authority::clear ( )
inline

Definition at line 112 of file authority.hpp.

vector<address> graphene::protocol::authority::get_addresses ( ) const
inline

Definition at line 93 of file authority.hpp.

vector<public_key_type> graphene::protocol::authority::get_keys ( ) const
inline

Definition at line 85 of file authority.hpp.

bool graphene::protocol::authority::is_impossible ( ) const
inline

Definition at line 64 of file authority.hpp.

static authority graphene::protocol::authority::null_authority ( )
inlinestatic

Definition at line 114 of file authority.hpp.

uint32_t graphene::protocol::authority::num_auths ( ) const
inline

Definition at line 111 of file authority.hpp.

Friends And Related Function Documentation

bool operator!= ( const authority a,
const authority b 
)
friend

Definition at line 110 of file authority.hpp.

bool operator== ( const authority a,
const authority b 
)
friend

Definition at line 103 of file authority.hpp.

Member Data Documentation

flat_map<account_id_type,weight_type> graphene::protocol::authority::account_auths

Definition at line 120 of file authority.hpp.

flat_map<address,weight_type> graphene::protocol::authority::address_auths

needed for backward compatibility only

Definition at line 123 of file authority.hpp.

flat_map<public_key_type,weight_type> graphene::protocol::authority::key_auths

Definition at line 121 of file authority.hpp.

uint32_t graphene::protocol::authority::weight_threshold = 0

Definition at line 119 of file authority.hpp.


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