CatapultServer  v0.5.0.1 (Elephant)
MultisigNotifications.h
Go to the documentation of this file.
1 
21 #pragma once
24 
25 namespace catapult { namespace model {
26 
27  // region multisig notification types
28 
30 #define DEFINE_MULTISIG_NOTIFICATION(DESCRIPTION, CODE, CHANNEL) DEFINE_NOTIFICATION_TYPE(CHANNEL, Multisig, DESCRIPTION, CODE)
31 
33  DEFINE_MULTISIG_NOTIFICATION(Modify_Cosigners, 0x0001, All);
34 
36  DEFINE_MULTISIG_NOTIFICATION(Modify_New_Cosigner, 0x0002, Validator);
37 
39  DEFINE_MULTISIG_NOTIFICATION(Modify_Settings, 0x1001, All);
40 
41 #undef DEFINE_MULTISIG_NOTIFICATION
42 
43  // endregion
44 
45  // region ModifyMultisigCosignersNotification
46 
49  public:
51  static constexpr auto Notification_Type = Multisig_Modify_Cosigners_Notification;
52 
53  public:
55  ModifyMultisigCosignersNotification(const Key& signer, uint8_t modificationsCount, const CosignatoryModification* pModifications)
57  , Signer(signer)
58  , ModificationsCount(modificationsCount)
59  , ModificationsPtr(pModifications)
60  {}
61 
62  public:
64  const Key& Signer;
65 
68 
71  };
72 
73  // endregion
74 
75  // region ModifyMultisigNewCosignerNotification
76 
79  public:
81  static constexpr auto Notification_Type = Multisig_Modify_New_Cosigner_Notification;
82 
83  public:
85  ModifyMultisigNewCosignerNotification(const Key& multisigAccountKey, const Key& cosignatoryKey)
87  , MultisigAccountKey(multisigAccountKey)
88  , CosignatoryKey(cosignatoryKey)
89  {}
90 
91  public:
94 
97  };
98 
99  // endregion
100 
101  // region ModifyMultisigSettingsNotification
102 
105  public:
107  static constexpr auto Notification_Type = Multisig_Modify_Settings_Notification;
108 
109  public:
111  ModifyMultisigSettingsNotification(const Key& signer, int8_t minRemovalDelta, int8_t minApprovalDelta)
113  , Signer(signer)
114  , MinRemovalDelta(minRemovalDelta)
115  , MinApprovalDelta(minApprovalDelta)
116  {}
117 
118  public:
120  const Key& Signer;
121 
124 
127  };
128 
129  // endregion
130 }}
catapult::model::ModifyMultisigCosignersNotification::Signer
const Key & Signer
Signer.
Definition: MultisigNotifications.h:64
catapult::model::ModifyMultisigCosignersNotification
Notification of a multisig cosigners modification.
Definition: MultisigNotifications.h:48
catapult::model::ModifyMultisigSettingsNotification::ModifyMultisigSettingsNotification
ModifyMultisigSettingsNotification(const Key &signer, int8_t minRemovalDelta, int8_t minApprovalDelta)
Creates a notification around signer, minRemovalDelta and minApprovalDelta.
Definition: MultisigNotifications.h:111
catapult::model::ModifyMultisigSettingsNotification::MinRemovalDelta
int8_t MinRemovalDelta
Relative change of cosigs needed to remove another cosig.
Definition: MultisigNotifications.h:123
catapult::model::ModifyMultisigSettingsNotification
Notification of a multisig settings modification.
Definition: MultisigNotifications.h:104
catapult::model::ModifyMultisigSettingsNotification::MinApprovalDelta
int8_t MinApprovalDelta
Relative change of cosigs needed to approve a transaction.
Definition: MultisigNotifications.h:126
catapult::model::DEFINE_MULTISIG_NOTIFICATION
DEFINE_MULTISIG_NOTIFICATION(Modify_Cosigners, 0x0001, All)
Multisig account cosigners were modified.
catapult::model::ModifyMultisigNewCosignerNotification::CosignatoryKey
const Key & CosignatoryKey
New cosignatory key.
Definition: MultisigNotifications.h:96
catapult::model::ModifyMultisigSettingsNotification::Notification_Type
static constexpr auto Notification_Type
Matching notification type.
Definition: MultisigNotifications.h:107
catapult::model::ModifyMultisigCosignersNotification::ModificationsCount
uint8_t ModificationsCount
Number of modifications.
Definition: MultisigNotifications.h:67
catapult::model::ModifyMultisigSettingsNotification::Signer
const Key & Signer
Signer.
Definition: MultisigNotifications.h:120
catapult::model::ModifyMultisigCosignersNotification::ModifyMultisigCosignersNotification
ModifyMultisigCosignersNotification(const Key &signer, uint8_t modificationsCount, const CosignatoryModification *pModifications)
Creates a notification around signer, modificationsCount and pModifications.
Definition: MultisigNotifications.h:55
catapult::model::ModifyMultisigNewCosignerNotification
Notification of a new cosigner.
Definition: MultisigNotifications.h:78
catapult::model::ModifyMultisigNewCosignerNotification::MultisigAccountKey
const Key & MultisigAccountKey
Multisig account key.
Definition: MultisigNotifications.h:93
Notifications.h
catapult::model::ModifyMultisigCosignersNotification::ModificationsPtr
const CosignatoryModification * ModificationsPtr
Const pointer to the first modification.
Definition: MultisigNotifications.h:70
catapult::model::CosignatoryModification
Binary layout for cosignatory modification.
Definition: ModifyMultisigAccountTransaction.h:39
catapult::model::Notification
A basic notification.
Definition: Notifications.h:36
ModifyMultisigAccountTransaction.h
catapult::model::ModifyMultisigCosignersNotification::Notification_Type
static constexpr auto Notification_Type
Matching notification type.
Definition: MultisigNotifications.h:51
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::utils::ByteArray< Key_Size, Key_tag >
catapult::model::ModifyMultisigNewCosignerNotification::ModifyMultisigNewCosignerNotification
ModifyMultisigNewCosignerNotification(const Key &multisigAccountKey, const Key &cosignatoryKey)
Creates a notification around multisigAccountKey and cosignatoryKey.
Definition: MultisigNotifications.h:85
catapult::model::ModifyMultisigNewCosignerNotification::Notification_Type
static constexpr auto Notification_Type
Matching notification type.
Definition: MultisigNotifications.h:81