What is Blockchain Standard Transactions Types?

Blockchain Standard Transactions Types

An agreement, contract, exchange, understanding, or transfer of assets/cash or property between two or more parties that create a legal obligation is known as a transaction. Transactions initially enter into a record, which includes a ledger. A transaction is when a buyer and a seller exchange products or services. A blockchain transaction is nothing more than an open record of all previous blockchain transactions. A block is the current component of a blockchain that stores the most recent data. A new partnership is created and added to the blockchain as a permanent database.

 There are three parts to any transaction: 

  • Transfer of an item or service
  • Transfer of Finance
  • Transfer of exchange rights

What is Blockchain Technology?

Blockchain is a technique for storing data that makes it difficult or impossible for the network to be altered, hacked, or otherwise abused. A blockchain is a type of ledger that efficiently distributes and copies transactions among a network of computers.

Blockchain technology is a framework for storing public transactional records (sometimes called “blocks”) across multiple databases in a network connected by peer-to-peer nodes. This type of storage is a “digital ledger.”

Every transaction in this ledger is validated and protected against fraud by the owner’s digital signature, which also serves to authenticate the transaction. As a result, the data in the digital ledger is relatively safe and results in better financial modeling.

What are Blockchain Standard Transactions?

As bitcoin’s development progressed, some restrictions were imposed on the types of scripts that could be processed by the reference client. These restrictions are in the standard() method, which outlines five different “standard” transaction types. These restrictions may be abolished by the time you read this. The reference client and most miners who run the reference client will only accept the five common types of transaction scripts up until that point. It is feasible to construct a nonstandard transaction with a hand that is not one of the accepted types, but you will need to find a miner that does not adhere to these restrictions to mine that transaction into a block.

Types Of Blockchain Standard Transactions

The five standard types of transactions are:

  • Pay-to-public-key-hash (P2PKH)
  • Pay-to-Public-Key
  • Multi-signature (limited to 15 keys)
  • Pay-to-script-hash (P2SH)
  • Data output (OP_RETURN)

Pay-to-Public-Key-Hash (P2PKH) 

P2PKH transactions make up the vast bulk of transactions carried out on the bitcoin network. These have a locking program that taints the output with a public key hash, more akin to a bitcoin address. In addition, P2PKH scripts are present in transactions that pay a bitcoin address. Therefore, a public key and a digital signature produced by the accompanying private key are required to unlock (spend) an output locked by a P2PKH script.

Let’s take Darla’s payment to John’s Cafe as an example. Darla sent the cafe’s bitcoin address 0.015 bitcoins as payment. The locking script for that transaction output would look like this:


Without Base58Check encoding, the Cafe Public Key Hash is the same as the cafe’s bitcoin address. Most programs would display the public key hash in hexadecimal encoding rather than the well-known Base58Check format for bitcoin addresses, which starts with the number 1.

The preceding locking script can be satisfied with the form:

<Cafe Signature> <Cafe Public Key>

The two scripts will form a combined validation script:

<Cafe Signature> <Cafe Public Key> OP_DUP OP_HASH160

<Cafe Public Key Hash> OP_EQUAL OP_CHECKSIG

When we evaluate the combined script, it will only consider TRUE if the unlocking writing satisfies the locking script’s requirements. In other words, if the unlocking script has a legitimate signature from the cafe’s private key that matches the public key hash specified as an encumbrance, the outcome will be TRUE.


A better bitcoin payment method than pay-to-public-key-hash is pay-to-public-key. Instead of a public key hash like with P2PKH before, which is significantly shorter, the public key for our additional information is present in the locking script with this script form. Satoshi created pay-to-public-key-hash to shorten and simplify the use of bitcoin addresses. The transactions generated by earlier mining software altered to use P2PKH are currently the ones that use pay-to-public-key the most.

An example of a pay-to-public-key locking script is as follows:

<Public Key A> OP_CHECKSIG

The unlocking script unlocks this type of output like this:

<Signature from Private Key A>

The combined script with validation software:

<Signature from Private Key A> <Public Key A> OP_CHECKSIG


Multi-signature scripts require that, at minimum, M of the N public keys recorded in hand must produce signatures to remove the restriction. So, that is an M-of-N scheme, where M is the minimum number of valid signatures, and N is the total number of keys. For instance, a 2-of-3 multi-signature requires at least two of the three public keys specified as prospective signatories. Utilize to provide signatures for a legal transaction to spend the funds. Standard multi-signature scripts can only handle up to 15 listed public keys. Thus, you can use any combination of a 1-of-1 and 15-of-15 multi-signature.

By this book’s release, somebody may have removed the restriction to the 15 mentioned keys. To find out what the network now accepts, use the standard() method. A locking script that sets an M-of-N multi-signature condition often takes the following form:

M <Public Key 1> <Public Key 2> … <Public Key N> N OP_CHECKMULTISIG

A locking script setting a multi-signature condition looks like this:

2 <Public Key A> <Public Key B> <Public Key C> 3 OP_CHECKMULTISIG

Somebody can unlock the preceding locking script with an unlocking script containing the following:

OP_0 <Signature B> <Signature C>

The two scripts will result in a combined validation script:

OP_0 <Signature B> <Signature C> 2 <Public Key A> <Public Key B> <Public Key C> 3 OP_CHECKMULTISIG

In the case of a combined script, it will only evaluate to TRUE if the unlocking writing satisfies the locking script’s requirements. For example, suppose the unlocking script contains a certificate authority from the two private keys that match two of the three public keys designated as an impediment. In that case, that is the condition in this instance.

Pay-to-Script-Hash (P2SH)

Pay-to-script-hash (P2SH), a potent new transaction type that dramatically reduces the use of intricate transaction scripts, was released in 2012. Let’s examine a real-world example to illustrate the necessity of P2SH.

Mohammed is a Dubai-based electronics importer. His organization heavily utilizes the multi-signature functionality of bitcoin for its corporate accounts. One of the most popular applications of bitcoin’s sophisticated scripting capabilities is multi-signature scripts—a handy feature. Mohammed’s business uses a multi-signature script for each client payment, or “accounts receivable,” as in accounting. Payments received by clients are safe under the multi-signature technique, so they need at least two signatures to be released. Either from Mohammed and one of his associates or his solicitor. Who has a backup key? Such a multi-signature system provides internal control controls and guards against loss and theft.

P2SH payments use a cryptographic hash as the locking script’s digital fingerprint in place of the complex locking script. A transaction that later attempts to spend the UTXO must include both the unlocking script and the script that validates the hash. P2SH, short for “pay to a script fitting this hash, a script that will be it is “pay to a script.”

The locking script, replaced by a hash in P2SH transactions, is known as the redeem script since it is delivered at redemption time rather than as a locking script embezzlement.

Data Output (OP_RETURN)

The blockchain, a decentralized and timestamped database used in bitcoin, has applications far beyond payments. For example, many developers have attempted to employ the transaction scripting language to benefit from the system’s safety and resilience for applications like digital notary services, stock certificates, and smart contracts. Early attempts to leverage the script language of bitcoin for these uses involved writing transaction outputs that stored data on the blockchain, such as recording a file’s digital fingerprint so that anybody could use that transaction as evidence to prove the file’s existence on a particular date.

Whether or not the blockchain can store information irrelevant to bitcoin transactions is debatable. Many engineers view such use as abusive and aim to discourage it. Others wish to promote such experimentation because they see it as a showcase of the potent powers of blockchain technology. Non-payment data is also part of specific blockchains. However, some people are against it because they claim it causes “blockchain bloat,” forcing users running full bitcoin nodes to pay for disc storage for data which is not what blockchain deals with.

Additionally, these transactions generate unspendable transaction outputs (UTXO) using the final bitcoin address as a 20-byte free-form field. The address doesn’t correlate to a private key because it is for data, so the UTXO results in a fraudulent payment. The UTXO database’s size will always grow, or “bloat,” due to these operations; we can not either utilize or remove them from the set of UTXOs.

There can be just one OP RETURN output per standard transaction (one that satisfies the standard requirements). A single OP RETURN output can be coupled with results of any other type in a transaction, though.

Final Words

Blockchain is a system for storing data in a way that makes system changes, hacking, and cheating difficult or impossible. This help in good financial analysis.

A blockchain is simply a network of computer systems that duplicates and distributes a digital ledger of transactions across the existing system. Each blockchain block comprises several transactions, and each individual’s ledger receives a copy of each new transaction on the blockchain. Transactions on a blockchain are recorded with an immutable cryptographic signature known as a hash.


Previous Post
Newer Post