Bitcoin MAST Tool

MAST Tool

This tool allows you to create a MAST (Merkelized Abstract Script Tree) for Bitcoin Taproot. The MAST follows the scheme explained in BIP 114. https://github.com/bitcoin/bips/blob/master/bip-0114.mediawiki Nodes are double hashed and prefixed with the number of child nodes. You can add new nodes (hashes and leaves) to the MAST and delete them from the MAST by hovering over a node and selecting the preferred option. Note that deleting a parent node will also delete all of its child nodes. The input accepts hexadecimal values (with or without a 0x prefix). The output is an array of data. You can use this in libraries such as bitcoinjs-lib.

Below, you can create a MAST from a given Array by inserting the Array into the input and clicking the button. The Array should contain the elements in the order in which they should be hashed, and should have the format of {"output": "Value"}.

  • Hash
    26d5235d20daf1440a15a248f5b5b4f201392128072c55afa64a26ccc6f56bd9
    add hash
    add element
    delete
    • Hash 2
      ead5e1a1e7e41b77b794f091df9be3f0e9f41d47304eb43dece90688f69843b7
      add hash
      add element
      delete
      • Hash 2
        049b9f2f94f0a9bdea624e39cd7d6b27a365c6a0545bf0e9d88d86eff4894210
        add hash
        add element
        delete
        • Hash 1
          d385d7268ad7e1ec51660f833d54787d2d8d79b6b1809d9c1d06c9e71f7be204
          add hash
          add element
          delete
          • 5acb54166e0db370cd1b05a29120373568dacea2abc3748459ec3da2106e4b4e
            i:0
            delete
        • Hash 2
          7cbfa08e44ea9f4f996873be95d9bffd97d4b91a5af32cc5f64efb8461727cdd
          add hash
          add element
          delete
          • e6d59510e1161e5f9ea59a66a7c5f235f2e62b581bb3be5c6990c3c9783cf194
            i:0
            delete
          • f00561916ca4962270f623714717bae589696f963936f94617fc7ea3432c711e
            i:1
            delete
      • Hash 3
        4611414355945a7c2fcc62a53a0004821b87e68f93048ffba7a55a3cb1e9783b
        add hash
        add element
        delete
        • 57eddef2230e31441d79373713ff2b561e23b7050fff7abb384aa20ca8adcdcb
          i:0
          delete
        • bdc2df1922fce8bccdb22755d2078951ad2005e6f313e6f9032060e1621a13ec
          i:1
          delete
        • 8f2dd83c6a57a38681f30b317a421fe65fe30d0a18284bf94f7f4d54ec55e88b
          i:2
          delete
    • Hash 2
      d00fc690c4700d0f983f9700740066531ea826b21a4cbc62f80317261723d477
      add hash
      add element
      delete
      • Hash 1
        aa5fbdf58264650eadec33691ba1e7606d0a62f570eea348a465c55bc86ffc10
        add hash
        add element
        delete
        • 4183db0957ee98435e3bf52b6ed2f5353db29a090c1f55690527cfe25db51d9c
          i:0
          delete
      • Hash 2
        c709fdc632f370f3367da45378d1cf430c5fda6805e731ad5761c213cf2d276e
        add hash
        add element
        delete
        • Hash 1
          70426d480d5b28d93c5be54803681f99abf4e8df4eab4dc87aaa543f0d138159
          add hash
          add element
          delete
          • d8218a5f78c3be01666b0d4dcbef2e51127275125ed78ef164a928334594784b
            i:0
            delete
        • Hash 1
          8482f6c9c3fe90dd4d533b4efedb6a241b95ec9267d1bd5aaaee36d2ce2dd6da
          add hash
          add element
          delete
          • 699152a3bfbbde79c64156ff6202fc2ffbd8d4aff2759d1a4ec07edacdc20743
            i:0
            delete

MAST Treearray:
{
  "mast": [
    [
      [
        [
          {
            "output": "5188"
          }
        ],
        [
          {
            "output": "5288"
          },
          {
            "output": "5388"
          }
        ]
      ],
      [
        {
          "output": "5488"
        },
        {
          "output": "5588"
        },
        {
          "output": "5688"
        }
      ]
    ],
    [
      [
        {
          "output": "5788"
        }
      ],
      [
        [
          {
            "output": "6a0548656c6c6f"
          }
        ],
        [
          {
            "output": "5888"
          }
        ]
      ]
    ]
  ]
}
https://blockchain-academy.hs-mittweida.de/wp-content/uploads/2021/04/logo_bcam_rgb_gross.png

Welcome

Blockchain Academy

Continue with credential

No account yet?

Powered by Hidy

Register with Hidy


Register
Sign in

We need the following credential to register:

HSMW Card

To create a new account, we need the following data from you:

We would appreciate the following additional information from you for the creation of your account:

Welcome

Blockchain Academy

Continue with credential

Already have an account?

Powered by Hidy

Sign in with Hidy


Register
Sign in

We need the following credential to log in:

HSMW Card