CatapultServer
v0.5.0.1 (Elephant)
|
Builder for a secret lock transaction. More...
Public Types | |
using | Transaction = model::SecretLockTransaction |
using | EmbeddedTransaction = model::EmbeddedSecretLockTransaction |
Public Member Functions | |
SecretLockBuilder (model::NetworkIdentifier networkIdentifier, const Key &signer) | |
void | setMosaic (const model::UnresolvedMosaic &mosaic) |
Sets the lock mosaic to mosaic. More... | |
void | setDuration (BlockDuration duration) |
Sets the number of blocks for which a lock should be valid to duration. More... | |
void | setHashAlgorithm (model::LockHashAlgorithm hashAlgorithm) |
Sets the hash alghoritm to hashAlgorithm. More... | |
void | setSecret (const Hash256 &secret) |
Sets the secret to secret. More... | |
void | setRecipient (const UnresolvedAddress &recipient) |
Sets the recipient of the locked mosaic to recipient. More... | |
size_t | size () const |
std::unique_ptr< Transaction > | build () const |
Builds a new secret lock transaction. More... | |
std::unique_ptr< EmbeddedTransaction > | buildEmbedded () const |
Builds a new embedded secret lock transaction. More... | |
Public Member Functions inherited from catapult::builders::TransactionBuilder | |
TransactionBuilder (model::NetworkIdentifier networkIdentifier, const Key &signer) | |
Creates a transaction builder with networkIdentifier and signer. More... | |
const Key & | signer () const |
Returns signer. More... | |
void | setDeadline (catapult::Timestamp deadline) |
Sets transaction deadline. More... | |
void | setMaxFee (catapult::Amount fee) |
Sets maximum transaction fee. More... | |
Private Member Functions | |
template<typename TTransaction > | |
size_t | sizeImpl () const |
template<typename TTransaction > | |
std::unique_ptr< TTransaction > | buildImpl () const |
template<typename TransactionType > | |
std::unique_ptr< TransactionType > | buildImpl () const |
Private Attributes | |
model::UnresolvedMosaic | m_mosaic |
BlockDuration | m_duration |
model::LockHashAlgorithm | m_hashAlgorithm |
Hash256 | m_secret |
UnresolvedAddress | m_recipient |
Additional Inherited Members | |
Protected Member Functions inherited from catapult::builders::TransactionBuilder | |
template<typename TTransaction > | |
std::unique_ptr< TTransaction > | createTransaction (size_t size) const |
Static Protected Member Functions inherited from catapult::builders::TransactionBuilder | |
template<typename T , typename Predicate > | |
static void | InsertSorted (std::vector< T > &vector, const T &element, Predicate orderPredicate) |
Builder for a secret lock transaction.
using catapult::builders::SecretLockBuilder::EmbeddedTransaction = model::EmbeddedSecretLockTransaction |
using catapult::builders::SecretLockBuilder::Transaction = model::SecretLockTransaction |
catapult::builders::SecretLockBuilder::SecretLockBuilder | ( | model::NetworkIdentifier | networkIdentifier, |
const Key & | signer | ||
) |
Creates a secret lock builder for building a secret lock transaction from signer for the network specified by networkIdentifier.
std::unique_ptr< SecretLockBuilder::Transaction > catapult::builders::SecretLockBuilder::build | ( | ) | const |
Builds a new secret lock transaction.
std::unique_ptr< SecretLockBuilder::EmbeddedTransaction > catapult::builders::SecretLockBuilder::buildEmbedded | ( | ) | const |
Builds a new embedded secret lock transaction.
|
private |
|
private |
void catapult::builders::SecretLockBuilder::setDuration | ( | BlockDuration | duration | ) |
Sets the number of blocks for which a lock should be valid to duration.
void catapult::builders::SecretLockBuilder::setHashAlgorithm | ( | model::LockHashAlgorithm | hashAlgorithm | ) |
Sets the hash alghoritm to hashAlgorithm.
void catapult::builders::SecretLockBuilder::setMosaic | ( | const model::UnresolvedMosaic & | mosaic | ) |
Sets the lock mosaic to mosaic.
void catapult::builders::SecretLockBuilder::setRecipient | ( | const UnresolvedAddress & | recipient | ) |
Sets the recipient of the locked mosaic to recipient.
void catapult::builders::SecretLockBuilder::setSecret | ( | const Hash256 & | secret | ) |
Sets the secret to secret.
size_t catapult::builders::SecretLockBuilder::size | ( | ) | const |
Returns size of secret lock transaction.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |