Skip to main content

The Difference of type=multisig and type=scripthash in scriptPubKey

tokenviewAbout 1 min

The Difference of type=multisig and type=scripthash in scriptPubKey

In Bitcoin scripting, both type=multisig and type=scripthash refer to different types of locking scripts (scriptPubKeys) used in transactions.

  1. type=multisig: This refers to a locking script that involves multiple public keys and requires a certain number of signatures (specified during script creation) to unlock the funds. In other words, it's a multisignature script, commonly used for shared control over funds, like in joint accounts or corporate wallets. The scriptPubKey typically includes all the public keys involved and specifies the required number of signatures.

multisig

In the above picture, the desc is "multi(1, xx, xx, xx)", and the type is "multisig". The funds of the above output will be unlocked by any of the 1/3 public keys when spending out. Normally, this type of address either is displayed as a group of 3 addressesopen in new window, or a single unknown addressopen in new window on blockchain explorer.

  1. type=scripthash: This refers to a locking script where the actual script required to unlock the funds is not directly included in the output scriptPubKey but is instead hashed and included. This allows for more complex scripting possibilities without bloating the blockchain. The redeeming script is then provided separately during the spending transaction, and it must hash to the same value as the one in the scriptPubKey. This is commonly used for various smart contract applications or for implementing more complex spending conditions.

scripthash

In the above picture, type="scripthash". If the funds in address 36KA needs to be spent out, it will be unlocked by a locking script, not a simple pub key's signature. The unlocking script could be anything, including multisignature conditions, time-locked conditions, or other custom smart contract logic. So normally this address will be displayed apparentlyopen in new window without any "in-depth" parsing logic on blockchain explorer.

In summary, type=multisig is specifically for multisignature scripts, while type=scripthash is a more general category for scripts where the actual redeeming script is hashed and included in the output scriptPubKey.

About Tokenview Blockchain APIs & Data Service Platform:

Tokenview blockchain APIs & data service platform contained 120+ blockchains has powerful endpoints that simplify complex blockchain data into single API calls. Code for all supported blockchains using unified API calls. From here to easily get transaction, address, gas, contract, token, NFT, logs and any information from chain. And Yes you can also send tx to chain. One-click configuration with APIKey helps developers to Use, to Create, to Build.
Last update: