IOTA

The IOTA Developer Hub

Welcome to the IOTA developer hub. You'll find comprehensive guides and documentation to help you start working with IOTA as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

The Anatomy of a Transaction

A transaction in IOTA consists of 2673 trytes (if encoded). When you decode the trytes you get a transaction object which has the following values:

Field Description Type Length (if string)
signatureMessageFragment Signature message fragment. In case there is a spent input, the signature of the private key is stored here. If no signature is required, it is empty (all 9's) and can be used for storing the message value when making a transfer. More to that later. String 2187-trytes
address In case this is an output, then this is the address of the recipient. In case it is an input, then it is the address of the input which is used to send the tokens from (i.e. address generated from the private key) String 81-trytes
value Transaction value Int 27-trytes
obsoleteTag User-defined tag (removed soon) String 27-trytes
timestamp Timestamp (not-enforced, can be arbitrary) Int 9-trytes
currentIndex Index in Bundle Int 9-trytes
lastIndex Last index in bundle Int 9-trytes
bundle bundle hash, which is used for grouping transactions of the bundle together. With the bundle hash you can identify transactions which were in the same bundle. String 81-trytes
trunkTransaction Transaction being approved String 81-trytes
branchTransaction Transaction being approved String 81-trytes
attachmentTag User-defined tag String 27-trytes
attachmentTimestamp Timestamp after POW Int 9-trytes
attachmentTimestampLowerBound Lower Bound of timestamp Int 9-trytes
attachmentTimestampUpperBound Upper bound of timestamp Int 9-trytes
nonce The nonce is required for the transaction to be accepted by the network. It is generated by doing Proof of Work (either in IRI via the attachToTangle API call, or with one of the libraries such as ccurl). String 27-trytes

The core clients encode all of this data into trytes and store it as a string of 2673-trytes. In order to read this data, you will have to decode / encode it with the client library functions. Here is an example of what such a transaction in raw trytes format looks like:

TO BE UPDATED

And here is the same transaction object (you can try and convert this yourself, with iota.utils.transactionObject in the Javascript library):

TO BE UPDATED

The Anatomy of a Transaction