CatapultServer  v0.5.0.1 (Elephant)
MultisigEntry.h
Go to the documentation of this file.
1 
21 #pragma once
23 
24 namespace catapult { namespace state {
25 
28  public:
31  : m_minApproval(0)
32  , m_minRemoval(0)
33  {}
34 
35  public:
38  return m_cosignatories;
39  }
40 
43  return m_cosignatories;
44  }
45 
47  bool hasCosignatory(const Key& key) const {
48  return m_cosignatories.end() != m_cosignatories.find(key);
49  }
50 
52  uint8_t minApproval() const {
53  return m_minApproval;
54  }
55 
57  void setMinApproval(uint8_t minApproval) {
59  }
60 
62  uint8_t minRemoval() const {
63  return m_minRemoval;
64  }
65 
67  void setMinRemoval(uint8_t minRemoval) {
69  }
70 
71  private:
73  uint8_t m_minApproval;
74  uint8_t m_minRemoval;
75  };
76 
79  public:
82  return m_multisigAccounts;
83  }
84 
87  return m_multisigAccounts;
88  }
89 
90  private:
92  };
93 
96  public:
98  explicit MultisigEntry(const Key& key) : m_key(key)
99  {}
100 
101  public:
103  const Key& key() const {
104  return m_key;
105  }
106 
107  private:
109  };
110 }}
catapult::state::MultisigCosignatoriesMixin::MultisigCosignatoriesMixin
MultisigCosignatoriesMixin()
Creates multisig cosignatories mixin.
Definition: MultisigEntry.h:30
catapult::utils::SortedKeySet
std::set< Key > SortedKeySet
A sorted key set.
Definition: ArraySet.h:67
catapult::state::MultisigCosignatoryOfMixin::multisigAccounts
utils::SortedKeySet & multisigAccounts()
Gets multisig account keys.
Definition: MultisigEntry.h:86
catapult::state::MultisigCosignatoriesMixin::setMinRemoval
void setMinRemoval(uint8_t minRemoval)
Sets the number of cosignatories required (minRemoval) when removing an account.
Definition: MultisigEntry.h:67
catapult::state::MultisigCosignatoriesMixin::m_cosignatories
utils::SortedKeySet m_cosignatories
Definition: MultisigEntry.h:72
catapult::state::MultisigEntry::m_key
Key m_key
Definition: MultisigEntry.h:108
catapult::state::MultisigEntry::MultisigEntry
MultisigEntry(const Key &key)
Creates a multisig entry around key.
Definition: MultisigEntry.h:98
catapult::state::MultisigCosignatoryOfMixin::m_multisigAccounts
utils::SortedKeySet m_multisigAccounts
Definition: MultisigEntry.h:91
catapult::state::MultisigCosignatoriesMixin::cosignatories
utils::SortedKeySet & cosignatories()
Gets cosignatory account keys.
Definition: MultisigEntry.h:42
catapult::state::MultisigCosignatoryOfMixin::multisigAccounts
const utils::SortedKeySet & multisigAccounts() const
Gets multisig account keys.
Definition: MultisigEntry.h:81
catapult::state::MultisigEntry
Multisig entry.
Definition: MultisigEntry.h:95
catapult::state::MultisigCosignatoriesMixin::m_minRemoval
uint8_t m_minRemoval
Definition: MultisigEntry.h:74
catapult::state::MultisigCosignatoriesMixin::m_minApproval
uint8_t m_minApproval
Definition: MultisigEntry.h:73
catapult::state::MultisigEntry::key
const Key & key() const
Gets the account public key.
Definition: MultisigEntry.h:103
catapult::state::MultisigCosignatoriesMixin::minRemoval
uint8_t minRemoval() const
Gets the number of cosignatories required when removing an account.
Definition: MultisigEntry.h:62
catapult::state::MultisigCosignatoryOfMixin
Mixin for storing information about accounts that current account can cosign.
Definition: MultisigEntry.h:78
ArraySet.h
catapult::state::MultisigCosignatoriesMixin::minApproval
uint8_t minApproval() const
Gets the number of cosignatories required when approving (any) transaction.
Definition: MultisigEntry.h:52
catapult::state::MultisigCosignatoriesMixin::setMinApproval
void setMinApproval(uint8_t minApproval)
Sets the number of cosignatories required (minApproval) when approving (any) transaction.
Definition: MultisigEntry.h:57
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::state::MultisigCosignatoriesMixin::hasCosignatory
bool hasCosignatory(const Key &key) const
Returns true if key is a cosignatory.
Definition: MultisigEntry.h:47
catapult::utils::ByteArray< Key_Size, Key_tag >
catapult::state::MultisigCosignatoriesMixin
Mixin for storing information about cosignatories of an account.
Definition: MultisigEntry.h:27
catapult::state::MultisigCosignatoriesMixin::cosignatories
const utils::SortedKeySet & cosignatories() const
Gets cosignatory account keys.
Definition: MultisigEntry.h:37