Bitcoin 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. 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"}.

MAST Treearray: