CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
26 namespace catapult {
namespace model {
31 #define DEFINE_NAMESPACE_NOTIFICATION(DESCRIPTION, CODE, CHANNEL) DEFINE_NOTIFICATION_TYPE(CHANNEL, Namespace, DESCRIPTION, CODE)
48 #undef DEFINE_NAMESPACE_NOTIFICATION
const NameSet & reservedRootNamespaceNames
Definition: NamespaceNameValidator.cpp:31
constexpr NamespaceId Namespace_Base_Id(0)
Base id for namespaces.
static constexpr auto Notification_Type
Matching notification type.
Definition: NamespaceNotifications.h:148
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
BlockDuration Duration
Number of blocks for which the namespace should be valid.
Definition: NamespaceNotifications.h:137
NamespaceNameNotification(catapult::NamespaceId namespaceId, catapult::NamespaceId parentId, uint8_t nameSize, const uint8_t *pName)
Creates a notification around nameSize and pName given namespaceId and parentId.
Definition: NamespaceNotifications.h:62
catapult::NamespaceId NamespaceId
Id of the namespace.
Definition: NamespaceNotifications.h:134
UnresolvedAddress Recipient
Recipient.
Definition: NamespaceNotifications.h:193
catapult::NamespaceId NamespaceId
Id of the namespace.
Definition: NamespaceNotifications.h:164
NamespaceNotification(model::NamespaceType namespaceType)
Creates a notification around namespaceType.
Definition: NamespaceNotifications.h:100
RootNamespaceNotification(const Key &signer, NamespaceId namespaceId, BlockDuration duration)
Creates a notification around signer, namespaceId and duration.
Definition: NamespaceNotifications.h:122
catapult::NamespaceId NamespaceId
Id of the namespace.
Definition: NamespaceNotifications.h:76
ChildNamespaceNotification(const Key &signer, NamespaceId namespaceId, NamespaceId parentId)
Creates a notification around signer, namespaceId and parentId.
Definition: NamespaceNotifications.h:152
const Key & Signer
Signer.
Definition: NamespaceNotifications.h:131
A basic balance notification.
Definition: Notifications.h:98
Notification of a child namespace registration.
Definition: NamespaceNotifications.h:145
catapult::NamespaceId ParentId
Id of the parent namespace.
Definition: NamespaceNotifications.h:167
Notification of a namespace registration.
Definition: NamespaceNotifications.h:93
for(const auto &name :reservedRootNamespaceNames) reservedRootIds.emplace(model return MAKE_STATELESS_VALIDATOR(NamespaceName,([maxNameSize, reservedRootIds](const auto ¬ification) { if(maxNameSize< notification.NameSize||!model::IsValidName(notification.NamePtr, notification.NameSize)) return Failure_Namespace_Invalid_Name;auto name=utils::RawString(reinterpret_cast< const char * >(notification.NamePtr), notification.NameSize);if(notification.NamespaceId !=model::GenerateNamespaceId(notification.ParentId, name)) return Failure_Namespace_Name_Id_Mismatch;auto namespaceId=Namespace_Base_Id==notification.ParentId ? notification.NamespaceId :notification.ParentId;if(reservedRootIds.cend() !=reservedRootIds.find(namespaceId)) return Failure_Namespace_Root_Name_Reserved;return ValidationResult::Success;}))
Definition: NamespaceNameValidator.cpp:36
NamespaceType
Namespace types.
Definition: NamespaceTypes.h:27
static constexpr auto Notification_Type
Matching notification type.
Definition: NamespaceNotifications.h:96
catapult::NamespaceId ParentId
Id of the parent namespace.
Definition: NamespaceNotifications.h:79
bool IsValidName(const uint8_t *pName, size_t nameSize)
Returns true if pName with size nameSize points to a valid name.
Definition: NameChecker.cpp:36
static constexpr auto Notification_Type
Matching notification type.
Definition: NamespaceNotifications.h:178
static constexpr auto Notification_Type
Matching notification type.
Definition: NamespaceNotifications.h:118
const Key & Signer
Signer.
Definition: NamespaceNotifications.h:161
static constexpr auto Name
Definition: PtSynchronizer.cpp:31
A const string buffer.
Definition: RawBuffer.h:68
uint8_t NameSize
Size of the name.
Definition: NamespaceNotifications.h:82
A basic notification.
Definition: Notifications.h:36
NamespaceId GenerateNamespaceId(NamespaceId parentId, const RawString &name) noexcept
Generates a namespace id given parentId and namespace name.
Definition: NamespaceIdGenerator.cpp:31
NamespaceRentalFeeNotification(const Key &sender, const UnresolvedAddress &recipient, UnresolvedMosaicId mosaicId, catapult::Amount amount)
Creates a notification around sender, recipient, mosaicId and amount.
Definition: NamespaceNotifications.h:182
DEFINE_NAMESPACE_NOTIFICATION(Alias_Owner, 0x0081, Validator)
Alias owner was provided.
DECLARE_STATELESS_VALIDATOR(MaxTransactions, Notification)(uint32_t maxTransactions)
Definition: MaxTransactionsValidator.cpp:27
Notification of a namespace name.
Definition: NamespaceNotifications.h:55
Definition: AddressExtractionExtension.cpp:28
Notification of a namespace rental fee.
Definition: NamespaceNotifications.h:175
Notification of use of an account address.
Definition: Notifications.h:57
model::NamespaceType NamespaceType
Type of the registered namespace.
Definition: NamespaceNotifications.h:107
std::unordered_set< std::string > NameSet
Definition: NamespaceNameValidator.cpp:29
Notification of a root namespace registration.
Definition: NamespaceNotifications.h:115
const uint8_t * NamePtr
Const pointer to the namespace name.
Definition: NamespaceNotifications.h:85
static constexpr auto Notification_Type
Matching notification type.
Definition: NamespaceNotifications.h:58