BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet 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

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

Constructor & Destructor Documentation

◆ authority() [1/2]

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

Definition at line 36 of file authority.hpp.

◆ authority() [2/2]

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

Definition at line 38 of file authority.hpp.

Member Function Documentation

◆ add_authorities() [1/2]

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

Definition at line 74 of file authority.hpp.

◆ add_authorities() [2/2]

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.

◆ add_authority() [1/3]

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

Definition at line 60 of file authority.hpp.

◆ add_authority() [2/3]

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

Definition at line 56 of file authority.hpp.

◆ add_authority() [3/3]

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

Definition at line 52 of file authority.hpp.

◆ clear()

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

Definition at line 112 of file authority.hpp.

◆ get_addresses()

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

Definition at line 93 of file authority.hpp.

◆ get_keys()

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

Definition at line 85 of file authority.hpp.

◆ is_impossible()

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

Definition at line 64 of file authority.hpp.

◆ null_authority()

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

Definition at line 114 of file authority.hpp.

◆ num_auths()

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

Definition at line 111 of file authority.hpp.

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 110 of file authority.hpp.

◆ operator==

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

Definition at line 103 of file authority.hpp.

Member Data Documentation

◆ account_auths

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

Definition at line 120 of file authority.hpp.

◆ address_auths

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

needed for backward compatibility only

Definition at line 123 of file authority.hpp.

◆ key_auths

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

Definition at line 121 of file authority.hpp.

◆ weight_threshold

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: