Transaction Types
From an end-user perspective, here is a brief overview of the purpose of each transaction type:
Pay-to-Public-Key-Hash (P2PKH) transaction: This is the most common type of transaction in Bitcoin, where the sender sends bitcoin to the recipient's Bitcoin address. P2PKH transactions are used for everyday transactions, such as buying goods or services.
Pay-to-Script-Hash (P2SH) transaction: This type of transaction allows for more complex scripts to be used as the receiving address. P2SH transactions are used to enable advanced scripting features, such as multi-sig transactions and time-locked transactions.
Multi-Signature (Multi-Sig) transaction: This type of transaction requires multiple signatures to authorize a transaction, making it more secure. Multi-sig transactions are used in situations where multiple parties need to approve a transaction, such as for joint accounts or high-value transactions.
Segregated Witness (SegWit) transaction: This is a type of transaction that separates transaction signature data from the transaction data, reducing the size of the transaction and increasing transaction capacity. SegWit transactions are used to reduce fees and improve transaction speed.
Lightning Network transaction: This is a layer 2 scaling solution that allows for instant and low-cost transactions by opening a payment channel between two parties. Lightning Network transactions are used for frequent and small-value transactions, such as micropayments and instant payments.
Types List
- null: Indicates that the output script is not recognized as a known type.
- pubkey: Indicates a pay-to-public-key transaction.
- pubkeyhash: Indicates a pay-to-public-key-hash (P2PKH) transaction.
- multisig: Indicates a multisignature transaction.
- nulldata: Indicates a null data transaction.
- witness_v0_keyhash: Indicates a SegWit transaction using a pay-to-witness-public-key-hash (P2WPKH) script.
- witness_v0_scripthash: Indicates a SegWit transaction using a pay-to-witness-script-hash (P2WSH) script.
- witness_unknown: Indicates a SegWit transaction using an unknown script type.
- scripthash: Indicates a pay-to-script-hash (P2SH) transaction.
- nonstandard: Indicates a non-standard transaction.
It's worth noting that this list may not cover every possible transaction type in the Bitcoin network, since there may be variations or new types of output scripts that are not yet recognized or categorized by the outputs.script_type field. Additionally, some complex transactions may use multiple output scripts of different types, which can complicate their categorization.
Distribution of Transactions Type
The distribution of transaction types in the Bitcoin/Blockchain ecosystem can vary depending on the period analyzed and the specific data source used. However, here is a general overview of the distribution of transaction types in Bitcoin:
Regular transactions (Pay-to-Public-Key-Hash or P2PKH transactions) are the most common type of transaction in the Bitcoin network. In some periods, regular transactions account for over 95% of all transactions in the network.
Pay-to-Script-Hash (P2SH) transactions are the second most common type of transaction, accounting for around 3-4% of transactions.
Multi-Signature (Multi-Sig) transactions, Segregated Witness (SegWit) transactions, and Lightning Network transactions together account for less than 1% of all transactions in the Bitcoin network.
It's important to note that the distribution of transaction types can change over time as the Bitcoin network evolves and new features and technologies are introduced. Also, the distribution of transaction types can vary across different blockchain networks other than Bitcoin.