Format
Transactions in the Pactus consist of the following fields:
Field | Size |
---|---|
Flags | 1 byte |
Version | 1 byte |
Lock Time | 4 bytes |
Fee | Variant |
Memo | Variant |
Payload Type | 1 byte |
Payload Data | Variant |
Signature | 48 bytes |
Public Key | 96 bytes |
- Flags A flag is a bitfield that indicates how to decode the transaction data.
- Version is the version of the transaction format. Different versions may have different fields or a different layout, and the current transaction version is set to 1.
- Lock Time specifies the block number at which the transaction can be unlocked.
- Fee contains the fee paid by the sender to the network for processing the transaction.
- Memo is an optional message that can be included in the transaction. The message can be used to provide additional information about the transaction or to communicate with the recipient. The maximum size of the memo is 64 characters that is defined in the consensus parameters
- Payload Type specifies the type of the transaction payload. Depending on the payload type, the payload data field is decoded differently.
- Payload Data contains the actual data payload of the transaction. The payload data varies depending on the payload type.
- Signature contains a cryptographic signature created by the sender using their private key. The signature is used to ensure that the transaction has not been tampered with and that it was indeed created by the sender.
- Public Key contains the public key of the sender. The public key is used to verify that the sender has the authority to create the transaction. The sender’s address should be derived from this public key.
Payload Type
The payload type field determines the format of the payload data field in the transaction. Different payload types have different formats for the payload data. The following are the supported transactions in the Pactus blockchain:
Flags
- 0x1 Indicates that the public key is known and excluded from the transaction.
Transaction ID
The Transaction ID is a unique identifier for a transaction on the blockchain. It is generated by taking the hash of the transaction data without including the public key and signature fields.
Last updated on