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

Builder for a transfer transaction. More...

Inheritance diagram for catapult::builders::TransferBuilder:
Collaboration diagram for catapult::builders::TransferBuilder:

Public Types

using Transaction = model::TransferTransaction
 
using EmbeddedTransaction = model::EmbeddedTransferTransaction
 

Public Member Functions

 TransferBuilder (model::NetworkIdentifier networkIdentifier, const Key &signer)
 
void setRecipient (const UnresolvedAddress &recipient)
 Sets the transaction recipient to recipient. More...
 
void setMessage (const RawBuffer &message)
 Sets the transaction message to message. More...
 
void addMosaic (const model::UnresolvedMosaic &mosaic)
 Adds mosaic to attached mosaics. More...
 
size_t size () const
 
std::unique_ptr< Transactionbuild () const
 Builds a new transfer transaction. More...
 
std::unique_ptr< EmbeddedTransactionbuildEmbedded () const
 Builds a new embedded transfer 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

UnresolvedAddress m_recipient
 
std::vector< uint8_t > m_message
 
std::vector< model::UnresolvedMosaicm_mosaics
 

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 transfer transaction.

Member Typedef Documentation

◆ EmbeddedTransaction

using catapult::builders::TransferBuilder::EmbeddedTransaction = model::EmbeddedTransferTransaction

◆ Transaction

using catapult::builders::TransferBuilder::Transaction = model::TransferTransaction

Constructor & Destructor Documentation

◆ TransferBuilder()

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

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

Member Function Documentation

◆ addMosaic()

void catapult::builders::TransferBuilder::addMosaic ( const model::UnresolvedMosaic mosaic)

Adds mosaic to attached mosaics.

Here is the call graph for this function:

◆ build()

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

Builds a new transfer transaction.

◆ buildEmbedded()

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

Builds a new embedded transfer transaction.

◆ buildImpl() [1/2]

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

◆ buildImpl() [2/2]

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

◆ setMessage()

void catapult::builders::TransferBuilder::setMessage ( const RawBuffer &  message)

Sets the transaction message to message.

◆ setRecipient()

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

Sets the transaction recipient to recipient.

◆ size()

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

Returns size of transfer 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::TransferBuilder::sizeImpl ( ) const
private
Here is the call graph for this function:

Member Data Documentation

◆ m_message

std::vector<uint8_t> catapult::builders::TransferBuilder::m_message
private

◆ m_mosaics

std::vector<model::UnresolvedMosaic> catapult::builders::TransferBuilder::m_mosaics
private

◆ m_recipient

UnresolvedAddress catapult::builders::TransferBuilder::m_recipient
private

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