Primer on Transactions and Wallets
Transactions
A transaction is an organized form of data that records the transfer of value between participants in the bitcoin system. Every transaction in the bitcoin system is identified by a unique identifier called the transaction ID (TxID)
An essential attribute of a transaction is the transaction output. These are portions of bitcoin that cannot be broken down or divided. They are recorded on the blockchain, and verified by the entire network. Outputs are discrete units of value, denominated in integer satoshis.
Good to know: Transactions spends inputs and creates outputs.
Transaction inputs are indicators to outputs of previously recorded transactions. This way each transaction spends outputs of previous transactions and creates new outputs.
Bitcoin full nodes track all available and spendable outputs, known as unspent transaction outputs (UTXO). The collection of all UTXO in the bitcoin system is known as the UTXO set. This set increases or decreases when it is used. Every transaction represents a state change in the UTXO set.
Good to know: A users bitcoin balance is the sum of all the UTXO's that the user's wallet can spend.
Wallets
Wallet software creates transactions by collecting UTXO, providing the appropriate unlocking scripts, and then construct new outputs assigned to a new owner. As at the writing of this article, there are 2 types of wallets:
Non-determinsitc wallet, where each key is independently generated from a random number and the keys aren't related to each other.
Deterministic wallet (Hierarchical Deterministic wallet) all keys are derived from a single master key, known as the seed.
In HD wallets, a parent key can derive a sequence of children keys, each of which can derive a sequence of grandchildren keys, and so on, to an infinite depth. These wallets are created from a single root seed, a 128-, 256-, or 512-bit random number. Most commonly generated from a mnemonic.
Every key in the HD wallet is deterministically derived from this root seed, which makes it possible to recreate the entire HD wallet from that seed in any compatible HD wallet. Each parent key can have 2**31 (2,147,488,647) children. A child can in turn become a parent and create its own children, in an infinite number of generations.
Last updated