CatapultServer  v0.5.0.1 (Elephant)
SecretLockInfo.h
Go to the documentation of this file.
1 
21 #pragma once
25 
26 namespace catapult { namespace state {
27 
29  struct SecretLockInfo : public LockInfo {
30  public:
33  {}
34 
37  const Key& account,
38  catapult::MosaicId mosaicId,
39  catapult::Amount amount,
40  catapult::Height height,
41  model::LockHashAlgorithm hashAlgorithm,
42  const Hash256& secret,
43  const catapult::Address& recipient)
44  : LockInfo(account, mosaicId, amount, height)
45  , HashAlgorithm(hashAlgorithm)
46  , Secret(secret)
47  , Recipient(recipient)
48  , CompositeHash()
49  {}
50 
51  public:
54 
57 
60 
63  };
64 }}
catapult::state::LockInfo
A lock info.
Definition: LockInfo.h:36
catapult::state::SecretLockInfo::Secret
Hash256 Secret
Secret.
Definition: SecretLockInfo.h:56
catapult::state::SecretLockInfo
A secret lock info.
Definition: SecretLockInfo.h:29
catapult::validators::Notification
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
ValidatorUtils.h
LockHashUtils.h
catapult::utils::BaseValue< uint64_t, MosaicId_tag >
catapult::validators::ValidateLessThanOrEqual
constexpr ValidationResult ValidateLessThanOrEqual(TValue value, TValue maxValue, ValidationResult failureResult)
Validates that value is less than or equal to maxValue and returns failureResult on failure.
Definition: ValidatorUtils.h:28
catapult::state::SecretLockInfo::CompositeHash
Hash256 CompositeHash
Composite hash.
Definition: SecretLockInfo.h:62
LockInfo.h
catapult::state::SecretLockInfo::Recipient
catapult::Address Recipient
Recipient of the locked mosaic.
Definition: SecretLockInfo.h:59
catapult::model::LockHashAlgorithm::Op_Hash_256
Input is hashed twice with SHA-256.
catapult::state::SecretLockInfo::HashAlgorithm
model::LockHashAlgorithm HashAlgorithm
Hash algorithm.
Definition: SecretLockInfo.h:53
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::validators::DEFINE_STATELESS_VALIDATOR
DEFINE_STATELESS_VALIDATOR(TransactionFee, [](const auto &notification) { if(notification.Fee > notification.MaxFee) return Failure_Core_Invalid_Transaction_Fee;constexpr auto Max_Raw_Block_Fee_Multiplier=static_cast< uint64_t >(std::numeric_limits< BlockFeeMultiplier::ValueType >::max());return notification.MaxFee.unwrap() > Max_Raw_Block_Fee_Multiplier *notification.TransactionSize ? Failure_Core_Invalid_Transaction_Fee :ValidationResult::Success;})
catapult::utils::ByteArray< Key_Size, Key_tag >
Validators.h
catapult::state::SecretLockInfo::SecretLockInfo
SecretLockInfo(const Key &account, catapult::MosaicId mosaicId, catapult::Amount amount, catapult::Height height, model::LockHashAlgorithm hashAlgorithm, const Hash256 &secret, const catapult::Address &recipient)
Creates a secret lock info around account, mosaicId, amount, height, hashAlgorithm,...
Definition: SecretLockInfo.h:36
catapult::model::LockHashAlgorithm
LockHashAlgorithm
Lock secret hash algorithm.
Definition: LockHashAlgorithm.h:27
LockHashAlgorithm.h
catapult::state::SecretLockInfo::SecretLockInfo
SecretLockInfo()
Creates a default secret lock info.
Definition: SecretLockInfo.h:32