#include <bundle.hpp>
◆ Bundle() [1/2]
IOTA::Models::Bundle::Bundle |
( |
| ) |
|
|
default |
◆ ~Bundle()
IOTA::Models::Bundle::~Bundle |
( |
| ) |
|
|
default |
◆ Bundle() [2/2]
IOTA::Models::Bundle::Bundle |
( |
const std::vector< Transaction > & |
transactions | ) |
|
|
explicit |
Initializes a new instance of the Bundle class with a list of transactions.
- Parameters
-
transactions | transactions belonging to the same bundle. |
◆ addTransaction()
void IOTA::Models::Bundle::addTransaction |
( |
const Transaction & |
transaction, |
|
|
int32_t |
signatureMessageLength = 1 |
|
) |
| |
Adds a bundle entry. If multiple signature fragments are required, generates as many transactions as necessary
- Parameters
-
transaction | Transaction to be added to the bundle. |
signatureMessageLength | Length of the signature message. |
◆ addTrytes()
void IOTA::Models::Bundle::addTrytes |
( |
const std::vector< Types::Trytes > & |
signatureFragments | ) |
|
Adds the trytes.
- Parameters
-
signatureFragments | The signature fragments. |
◆ empty()
bool IOTA::Models::Bundle::empty |
( |
| ) |
const |
- Returns
- whether the bundle is empty or not.
◆ finalize()
void IOTA::Models::Bundle::finalize |
( |
| ) |
|
◆ generateHash()
void IOTA::Models::Bundle::generateHash |
( |
void |
| ) |
|
|
protected |
generate the hash corresponding to this bundle of transactions. This function does NOT check whether the normalized bundle contain 13 (security flaw). This method must remain private (or protected for tests purposed).
◆ getHash()
const Types::Trytes& IOTA::Models::Bundle::getHash |
( |
| ) |
const |
◆ getLength()
std::size_t IOTA::Models::Bundle::getLength |
( |
| ) |
const |
- Returns
- The length of the bundle.
◆ getTransactions() [1/2]
const std::vector<Transaction>& IOTA::Models::Bundle::getTransactions |
( |
| ) |
const |
◆ getTransactions() [2/2]
std::vector<Transaction>& IOTA::Models::Bundle::getTransactions |
( |
| ) |
|
Non-const getTransactions.
- Returns
- Bundle transactions.
◆ normalizedBundle()
std::vector<int8_t> IOTA::Models::Bundle::normalizedBundle |
( |
const Types::Trytes & |
bundleHash | ) |
|
Normalized the bundle.
- Parameters
-
bundleHash | The bundle hash. |
- Returns
- A normalized bundle hash.
◆ operator!=()
bool IOTA::Models::Bundle::operator!= |
( |
const Bundle & |
rhs | ) |
const |
- Parameters
-
rhs | An object to compare with this object. |
- Returns
- whether the current bundle is different from the given one.
◆ operator<()
bool IOTA::Models::Bundle::operator< |
( |
const Bundle & |
rhs | ) |
const |
- Parameters
-
rhs | An object to compare with this object. |
- Returns
- whether the current bundle occured before the given one.
◆ operator==()
bool IOTA::Models::Bundle::operator== |
( |
const Bundle & |
rhs | ) |
const |
- Parameters
-
rhs | An object to compare with this object. |
- Returns
- whether the current bundle is the same as the given one.
◆ operator>()
bool IOTA::Models::Bundle::operator> |
( |
const Bundle & |
rhs | ) |
const |
- Parameters
-
rhs | An object to compare with this object. |
- Returns
- whether the current bundle occured after the given one.
◆ operator[]() [1/2]
Transaction& IOTA::Models::Bundle::operator[] |
( |
const int |
index | ) |
|
- Parameters
-
index | The transaction index. |
- Returns
- the Transaction at given index.
◆ operator[]() [2/2]
const Transaction& IOTA::Models::Bundle::operator[] |
( |
const int |
index | ) |
const |
- Parameters
-
index | The transaction index. |
- Returns
- the Transaction at given index.
◆ setHash()
void IOTA::Models::Bundle::setHash |
( |
const Types::Trytes & |
hash | ) |
|
Set the hash of the bundle. This does NOT update the underlying transaction.
- Parameters
-
The documentation for this class was generated from the following file: