Bitshares-Core  2.0.181105
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::chain::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)
 

Detailed Description

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

Definition at line 33 of file authority.hpp.

Member Enumeration Documentation

◆ classification

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 43 of file authority.hpp.

Constructor & Destructor Documentation

◆ authority() [1/2]

graphene::chain::authority::authority ( )
inline

Definition at line 35 of file authority.hpp.

◆ authority() [2/2]

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

Definition at line 37 of file authority.hpp.

Member Function Documentation

◆ add_authorities() [1/2]

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

Definition at line 73 of file authority.hpp.

◆ add_authorities() [2/2]

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

Definition at line 78 of file authority.hpp.

◆ add_authority() [1/3]

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

Definition at line 51 of file authority.hpp.

◆ add_authority() [2/3]

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

Definition at line 55 of file authority.hpp.

◆ add_authority() [3/3]

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

Definition at line 59 of file authority.hpp.

◆ clear()

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

Definition at line 110 of file authority.hpp.

◆ get_addresses()

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

Definition at line 92 of file authority.hpp.

◆ get_keys()

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

Definition at line 84 of file authority.hpp.

◆ is_impossible()

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

Definition at line 63 of file authority.hpp.

◆ null_authority()

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

Definition at line 112 of file authority.hpp.

◆ num_auths()

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

Definition at line 109 of file authority.hpp.

Friends And Related Function Documentation

◆ operator==

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

Definition at line 102 of file authority.hpp.

Member Data Documentation

◆ account_auths

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

Definition at line 118 of file authority.hpp.

◆ address_auths

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

needed for backward compatibility only

Definition at line 121 of file authority.hpp.

◆ key_auths

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

Definition at line 119 of file authority.hpp.

◆ weight_threshold

uint32_t graphene::chain::authority::weight_threshold = 0

Definition at line 117 of file authority.hpp.


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