Transactions are composed of the following parts:
- Type
This determines the transaction type. This determines how the transaction is serialized or deserialized. Currently, the library only support the following types:
-
Contract
-
Claim
-
Invocation
-
AnonymousContract
-
Version
This determines the version of the transaction. Protocol may defer for different versions.
- Attribute
Extra attributes that are attached to the transaction. An example is a Remark.
- Input
The inputs of the transaction. This is the assets being 'spent' by this transaction. System fees are also included here. Inputs are considered 'spent' after the transaction is processed.
- Output
The outputs of the transaction. This indicates the unspent assets created by this transaction. These outputs are 'unspent' and can be referenced as inputs in future transactions.
- Witness
The witnesses to the transaction. These are the signatures to authorise the transaction. Usually the private key of the owner of the input assets is used to generate the signature.
- Exclusive Data (unique to each transaction type)
Various data required for each transaction. For example, a ClaimTransaction will have the claims
field which contains all claimable transactions. An InvocationTransaction will have the script
field instead for smart contract invocation.