CatapultServer  v0.5.0.1 (Elephant)
catapult::builders::SecretProofBuilder Class Reference

Builder for a secret proof transaction. More...

Inheritance diagram for catapult::builders::SecretProofBuilder:
Collaboration diagram for catapult::builders::SecretProofBuilder:

Public Types

using Transaction = model::SecretProofTransaction
 
using EmbeddedTransaction = model::EmbeddedSecretProofTransaction
 

Public Member Functions

 SecretProofBuilder (model::NetworkIdentifier networkIdentifier, const Key &signer)
 
void setHashAlgorithm (model::LockHashAlgorithm hashAlgorithm)
 Sets the hash algorithm to hashAlgorithm. More...
 
void setSecret (const Hash256 &secret)
 Sets the secret to secret. More...
 
void setRecipient (const UnresolvedAddress &recipient)
 Sets the recipient to recipient. More...
 
void setProof (const RawBuffer &proof)
 Sets the proof data to proof. More...
 
size_t size () const
 
std::unique_ptr< Transactionbuild () const
 Builds a new secret proof transaction. More...
 
std::unique_ptr< EmbeddedTransactionbuildEmbedded () const
 Builds a new embedded secret proof 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 Keysigner () 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< TransactionTypebuildImpl () const
 

Private Attributes

model::LockHashAlgorithm m_hashAlgorithm
 
Hash256 m_secret
 
UnresolvedAddress m_recipient
 
std::vector< uint8_t > m_proof
 

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)
 

Detailed Description

Builder for a secret proof transaction.

Member Typedef Documentation

◆ EmbeddedTransaction

using catapult::builders::SecretProofBuilder::EmbeddedTransaction = model::EmbeddedSecretProofTransaction

◆ Transaction

using catapult::builders::SecretProofBuilder::Transaction = model::SecretProofTransaction

Constructor & Destructor Documentation

◆ SecretProofBuilder()

catapult::builders::SecretProofBuilder::SecretProofBuilder ( model::NetworkIdentifier  networkIdentifier,
const Key signer 
)

Creates a secret proof builder for building a secret proof transaction from signer for the network specified by networkIdentifier.

Member Function Documentation

◆ build()

std::unique_ptr< SecretProofBuilder::Transaction > catapult::builders::SecretProofBuilder::build ( ) const

Builds a new secret proof transaction.

◆ buildEmbedded()

std::unique_ptr< SecretProofBuilder::EmbeddedTransaction > catapult::builders::SecretProofBuilder::buildEmbedded ( ) const

Builds a new embedded secret proof transaction.

◆ buildImpl() [1/2]

template<typename TTransaction >
std::unique_ptr<TTransaction> catapult::builders::SecretProofBuilder::buildImpl ( ) const
private

◆ buildImpl() [2/2]

template<typename TransactionType >
std::unique_ptr<TransactionType> catapult::builders::SecretProofBuilder::buildImpl ( ) const
private

◆ setHashAlgorithm()

void catapult::builders::SecretProofBuilder::setHashAlgorithm ( model::LockHashAlgorithm  hashAlgorithm)

Sets the hash algorithm to hashAlgorithm.

◆ setProof()

void catapult::builders::SecretProofBuilder::setProof ( const RawBuffer &  proof)

Sets the proof data to proof.

◆ setRecipient()

void catapult::builders::SecretProofBuilder::setRecipient ( const UnresolvedAddress recipient)

Sets the recipient to recipient.

◆ setSecret()

void catapult::builders::SecretProofBuilder::setSecret ( const Hash256 secret)

Sets the secret to secret.

◆ size()

size_t catapult::builders::SecretProofBuilder::size ( ) const

Returns size of secret proof transaction.

Note
This returns size of a normal transaction not embedded transaction.
Here is the caller graph for this function:

◆ sizeImpl()

template<typename TransactionType >
size_t catapult::builders::SecretProofBuilder::sizeImpl ( ) const
private
Here is the call graph for this function:

Member Data Documentation

◆ m_hashAlgorithm

model::LockHashAlgorithm catapult::builders::SecretProofBuilder::m_hashAlgorithm
private

◆ m_proof

std::vector<uint8_t> catapult::builders::SecretProofBuilder::m_proof
private

◆ m_recipient

UnresolvedAddress catapult::builders::SecretProofBuilder::m_recipient
private

◆ m_secret

Hash256 catapult::builders::SecretProofBuilder::m_secret
private

The documentation for this class was generated from the following files: