Reading and understanding a transactions structure

Let's firstly get to know the structure of a transaction and know the difference between a coin, bundle note and transaction packet.

A coin is the smallest unit of currency which when converted equals 0.0001 Juana. It always has the same starting and ending coin ID's.

A bundle note on the other hand is a combination of two or more coins with consecutive ID's that are in order. Think of a bundle note as a normal note in our everyday life, e.g a $10 note which is a collection of cents (i.e coins). When someone transacts they are able to bundle these coins together rather than send them individually because they are in sequential order. The starting coin ID is locked to a custodian node. When Kujua calculates an amount it reads the difference between these two coin ID’s for every coin and bundle note within a transaction packet. A transaction packet is a collection of all coins and bundle notes for a specific transaction on the blockchain.

Let’s take an example a payment of amount 0.0001 Juana would be read in from 10000000000001 to 10000000000001 resulting in a transaction that reads like {‘coin_head_id’: 10000000000001, ..., ‘coin_tail_id’: 10000000000001} with a single coin ID, whereas an amount of 0.0002 Juana would have two coin ID points 10000000000001 and 10000000000002, therefore that transaction will read like {‘coin_head_id’: 10000000000001, ..., ‘coin_tail_id’: 10000000000002}. Those are simplified examples for understanding, a more complicated amount of 0.0002 would look like {‘coin_head_id’: 10000000000009, ..., ‘coin_tail_id’: 10000000000010} as a single bundle note or {‘coin_head_id’: 10000000000009, ..., ‘coin_tail_id’: 10000000000009} AND {‘coin_head_id’: 10000000000012, ..., ‘coin_tail_id’: 10000000000012} as multiple bundle notes. It all depends on which coin ID’s the sender holds. Notice that there are either a single coin ID or two coin ID’s always displayed. In detail, because a sender can hold multiple coin ID’s there is a possibility that some of that senders coins are in order e.g 10000000000001 and 10000000000002, in this case we do not send two transactions in a packet, we lump them up in what is called a bundle note which would look like this {‘coin_head_id’: 10000000000001, ..., ‘coin_tail_id’: 10000000000002}. If the sender owned coin ID’s 10000000000001 and 10000000000003 only, the note would not lump anything as there is nothing in consecutive order and therefore two transactions would be in the packet to send an amount of 0.0002.

Every transaction packet in the network is signed with the previous transaction packet. This makes sure that the received transaction is the next in line, thereby keeping an ordered traceable lineage of each coin.

See Data Point structure for transaction structure definitions