CatapultServer  v0.5.0.1 (Elephant)
VerifiableEntity.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "EntityBody.h"
23 #include "SizePrefixedEntity.h"
24 
25 namespace catapult {
26  namespace crypto { class KeyPair; }
27  namespace model { class TransactionRegistry; }
28 }
29 
30 namespace catapult { namespace model {
31 
32 #pragma pack(push, 1)
33 
36  public:
38  static constexpr size_t Header_Size = sizeof(uint32_t) + Signature_Size + Key_Size;
39 
42  };
43 
45  struct VerifiableEntity : public EntityBody<VerifiableEntityHeader> {};
46 
47 #pragma pack(pop)
48 
50  std::ostream& operator<<(std::ostream& out, const VerifiableEntity& entity);
51 
54  bool IsSizeValid(const VerifiableEntity& entity, const TransactionRegistry& registry);
55 }}
Block.h
catapult::model::BasicEntityType::Block
Block type.
Transaction.h
catapult::model::VerifiableEntityHeader
Binary layout for a verifiable entity header.
Definition: VerifiableEntity.h:35
catapult::model::VerifiableEntityHeader::Header_Size
static constexpr size_t Header_Size
Size of the VerifiableEntity part that can be skipped when signing/verifying.
Definition: VerifiableEntity.h:38
catapult::Signature_Size
constexpr size_t Signature_Size
Definition: src/catapult/types.h:31
catapult::model::ToBasicEntityType
constexpr BasicEntityType ToBasicEntityType(EntityType type)
Converts an entity type into a basic entity type.
Definition: EntityType.h:70
EntityBody.h
catapult::model::SizePrefixedEntity
Binary layout for a size prefixed entity.
Definition: SizePrefixedEntity.h:30
catapult::Key_Size
constexpr size_t Key_Size
Definition: src/catapult/types.h:32
VerifiableEntity.h
catapult::model::VerifiableEntityHeader::Signature
catapult::Signature Signature
Entity signature.
Definition: VerifiableEntity.h:41
SizePrefixedEntity.h
catapult::model::VerifiableEntity
Binary layout for a verifiable (with signature) entity.
Definition: VerifiableEntity.h:45
catapult::model::operator<<
std::ostream & operator<<(std::ostream &out, const EmbeddedTransaction &transaction)
Insertion operator for outputting transaction to out.
Definition: EmbeddedTransaction.cpp:28
catapult::model::EntityBody::EntityVersion
uint8_t EntityVersion() const
Returns version of an entity.
Definition: EntityBody.h:50
catapult::model::IsSizeValid
bool IsSizeValid(const AggregateTransaction &aggregate, const TransactionRegistry &registry)
Definition: AggregateTransaction.cpp:38
catapult::model::EntityBody
Binary layout for an entity body.
Definition: EntityBody.h:33
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::model::TransactionRegistry
A registry of transaction plugins.
Definition: TransactionPlugin.h:98
catapult::model::BasicEntityType::Transaction
Transaction type.
catapult::utils::ByteArray< Signature_Size, Signature_tag >
catapult::model::SizePrefixedEntity::Size
uint32_t Size
Entity size.
Definition: SizePrefixedEntity.h:33
catapult::model::EntityBody::Type
EntityType Type
Entity type.
Definition: EntityBody.h:42