30 #include <iota/models/address.hpp> 31 #include <iota/models/tag.hpp> 32 #include <iota/types/trytes.hpp> 79 Transaction(
const Types::Trytes& signatureFragments, int64_t currentIndex, int64_t lastIndex,
80 const Types::Trytes& nonce,
const Types::Trytes& hash, int64_t timestamp,
81 const Types::Trytes& trunkTransaction,
const Types::Trytes& branchTransaction,
82 const Models::Address& address, int64_t value,
const Types::Trytes& bundle,
83 const Models::Tag& tag, int64_t attachmentTimestamp,
84 int64_t attachmentTimestampLowerBound, int64_t attachmentTimestampUpperBound);
98 int64_t timestamp, int64_t attachmentTimestamp = 0,
99 int64_t attachmentTimestampLowerBound = 0, int64_t attachmentTimestampUpperBound = 0);
112 const Types::Trytes&
getHash()
const;
119 void setHash(
const Types::Trytes& hash);
286 void setBundle(
const Types::Trytes& bundle);
321 const Types::Trytes&
getNonce()
const;
328 void setNonce(
const Types::Trytes& nonce);
380 static const std::pair<int, int> SignatureFragmentsOffset;
384 static const std::pair<int, int> AddressOffset;
388 static const std::pair<int, int> ValueOffset;
392 static const std::pair<int, int> TagOffset;
396 static const std::pair<int, int> TimestampOffset;
400 static const std::pair<int, int> CurrentIndexOffset;
404 static const std::pair<int, int> LastIndexOffset;
408 static const std::pair<int, int> BundleOffset;
412 static const std::pair<int, int> TrunkOffset;
416 static const std::pair<int, int> BranchOffset;
420 static const std::pair<int, int> NonceOffset;
424 static const std::pair<int, int> ObsoleteTagOffset;
428 static const std::pair<int, int> AttachmentTimestampOffset;
432 static const std::pair<int, int> AttachmentTimestampLowerBoundOffset;
436 static const std::pair<int, int> AttachmentTimestampUpperBoundOffset;
440 static const std::pair<int, int> ValidityChunkOffset;
450 Types::Trytes signatureFragments_;
470 int64_t timestamp_ = 0;
474 int64_t attachmentTimestamp_ = 0;
478 int64_t attachmentTimestampLowerBound_ = 0;
482 int64_t attachmentTimestampUpperBound_ = 0;
486 int64_t currentIndex_ = 0;
490 int64_t lastIndex_ = 0;
494 Types::Trytes bundle_;
498 Types::Trytes trunkTransaction_;
502 Types::Trytes branchTransaction_;
506 Types::Trytes nonce_;
510 bool persistence_ =
false;
513 std::ostream& operator<<(std::ostream& os,
const Transaction& transaction);
void setValue(int64_t value)
const Types::Trytes & getSignatureFragments() const
const Types::Trytes & getHash() const
void setCurrentIndex(int64_t currentIndex)
void setPersistence(bool persistence)
void setAddress(const Models::Address &address)
bool isTailTransaction() const
int64_t getLastIndex() const
void setAttachmentTimestampLowerBound(int64_t timestamp)
Definition: address.hpp:43
const Models::Tag & getTag() const
const Types::Trytes & getNonce() const
const Types::Trytes & getBranchTransaction() const
void setBranchTransaction(const Types::Trytes &branchTransaction)
const Models::Tag & getObsoleteTag() const
void setAttachmentTimestampUpperBound(int64_t timestamp)
const Models::Address & getAddress() const
void setHash(const Types::Trytes &hash)
const Types::Trytes & getTrunkTransaction() const
int64_t getCurrentIndex() const
bool getPersistence() const
void initFromTrytes(const Types::Trytes &trytes)
int64_t getAttachmentTimestampLowerBound() const
void setLastIndex(int64_t lastIndex)
void setNonce(const Types::Trytes &nonce)
const Types::Trytes & getBundle() const
Types::Trytes toTrytes() const
Definition: transaction.hpp:41
int64_t getTimestamp() const
void setBundle(const Types::Trytes &bundle)
void setAttachmentTimestamp(int64_t timestamp)
int64_t getAttachmentTimestamp() const
bool operator==(const Transaction &rhs) const
void setTimestamp(int64_t timestamp)
void setTag(const Models::Tag &tag)
bool operator!=(const Transaction &rhs) const
int64_t getAttachmentTimestampUpperBound() const
void setTrunkTransaction(const Types::Trytes &trunkTransaction)
void setSignatureFragments(const Types::Trytes &signatureFragments)
void setObsoleteTag(const Models::Tag &tag)