CatapultServer  v0.5.0.1 (Elephant)
SecretLockInfoSerializer.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "SecretLockInfo.h"
24 
25 namespace catapult { namespace state {
26 
30  static void Save(const SecretLockInfo& lockInfo, io::OutputStream& output);
31 
33  static void Load(io::InputStream& input, SecretLockInfo& lockInfo);
34  };
35 
37  struct SecretLockInfoSerializer : public LockInfoSerializer<SecretLockInfo, SecretLockInfoExtendedDataSerializer> {
39  static constexpr uint16_t State_Version = 1;
40  };
41 }}
catapult::state::SecretLockInfoExtendedDataSerializer::Load
static void Load(io::InputStream &input, SecretLockInfo &lockInfo)
Loads secret lock info extended data from input into lockInfo.
Definition: SecretLockInfoSerializer.cpp:32
catapult::state::SecretLockInfo::Secret
Hash256 Secret
Secret.
Definition: SecretLockInfo.h:56
catapult::io::Write8
void Write8(TIo &output, uint8_t value)
Writes value into output.
Definition: PodIoUtils.h:54
catapult::state::SecretLockInfo
A secret lock info.
Definition: SecretLockInfo.h:29
catapult::state::SecretLockInfoExtendedDataSerializer
Policy for saving and loading secret lock info extended data.
Definition: SecretLockInfoSerializer.h:28
catapult::state::LockInfoSerializer
Policy for saving and loading lock info data.
Definition: LockInfoSerializer.h:30
catapult::utils::to_underlying_type
constexpr std::underlying_type_t< TEnum > to_underlying_type(TEnum value)
Converts a strongly typed enumeration value to its underlying integral value.
Definition: Casting.h:37
LockHashUtils.h
catapult::io::OutputStream::write
virtual void write(const RawBuffer &buffer)=0
catapult::state::SecretLockInfo::CompositeHash
Hash256 CompositeHash
Composite hash.
Definition: SecretLockInfo.h:62
catapult::state::SecretLockInfoExtendedDataSerializer::Save
static void Save(const SecretLockInfo &lockInfo, io::OutputStream &output)
Saves lockInfo extended data to output.
Definition: SecretLockInfoSerializer.cpp:26
catapult::io::InputStream
Reader interface.
Definition: Stream.h:27
catapult::io::Read8
auto Read8(TIo &input)
Reads value from input.
Definition: PodIoUtils.h:90
catapult::model::CalculateSecretLockInfoHash
Hash256 CalculateSecretLockInfoHash(const Hash256 &secret, const Address &recipient)
Calculates the secret lock info hash from secret and recipient.
Definition: LockHashUtils.cpp:64
catapult::state::SecretLockInfoSerializer::State_Version
static constexpr uint16_t State_Version
Serialized state version.
Definition: SecretLockInfoSerializer.h:39
LockInfoSerializer.h
catapult::state::SecretLockInfo::Recipient
catapult::Address Recipient
Recipient of the locked mosaic.
Definition: SecretLockInfo.h:59
SecretLockInfoSerializer.h
catapult::io::InputStream::read
virtual void read(const MutableRawBuffer &buffer)=0
catapult::state::SecretLockInfo::HashAlgorithm
model::LockHashAlgorithm HashAlgorithm
Hash algorithm.
Definition: SecretLockInfo.h:53
catapult
Definition: AddressExtractionExtension.cpp:28
SecretLockInfo.h
catapult::state::SecretLockInfoSerializer
Policy for saving and loading secret lock info data.
Definition: SecretLockInfoSerializer.h:37
catapult::io::OutputStream
Writer interface.
Definition: Stream.h:41