Creating a simple transaction using the CLI
Sending funds to an address (payment.addr) requires six (6) simple steps.
- Get the protocol parameters
- Determine the appropriate TTL (Time to live)
- Calculate the fee
- Build the transaction
- Sign the transaction
- Submit the transaction
Transactions vary in complexity, depending on their intended outcomes, but all transactions share a number of attributes:
- Input - contains funds that are spent by the transaction. It is simply the output of an earlier transaction. A transaction can have multiple inputs.
- Output - determine where the funds go to. An output is given by a payment address and an amount. A transaction can have multiple outputs.
- Payment address - an address that can receive payments, This is the only type of addresses that can be specified in a transaction output.
- Payment and stake key pairs - Sets of files containing a public verification key and a private signing key.
- Time-to-live (TTL) - represents a slot, or deadline by which a transaction must be submitted. The TTL is an absolute slot number, rather than a relative one, which means that the --ttl value should be greater than the current slot number. A transaction becomes invalid once its ttl expires.
For more information on how to create transactions, please check Create a simple transaction