DSL for experimenting with contracts

Progress update, the DSL now supports taproot outputs - both to create outputs and spending them.

Other updates

  1. New release is out with smaller docker image size and number of notebooks related bug fixes.
  2. Support for reorganising chain to a given height, block hash or back up to a block to unconfirm a given transaction.
reorg_chain height: 95

reorg_chain blockhash: @blockhash

reorg_chain unconfirm_tx: @reorg_to_tx
  1. Fixed broken links in the documentation pages.

Taproot example

New documentation section on taproot transaction discusses the choice of using object notation for specifying taproot outputs and script sigs.

Here’s a quick example to show how to generate and spend taproot outputs on regtest.

Create a Taproot Output

transaction inputs: [
              { tx: @coinbase_tx,
                    vout: 0,
                    script_sig: 'sig:wpkh(@alice)' }
                ],
             outputs: [
                  {
                    taproot: { internal_key: @bob,
                               leaves: ['pk(@carol)', 'pk(@alice)'] },
                    amount: 49.999.sats
                  }
                ]
broadcast @taproot_output_tx

Spending Using a Script Path

transaction inputs: [
                  { tx: @taproot_output_tx,
                    vout: 0,
                    script_sig: { leaf_index: 0,
                                  sig: 'sig:@carol' },
                    sighash: :all }
                ],
             outputs: [
                  { descriptor: 'wpkh(@carol)',
                    amount: 49.998.sats }
                ]
broadcast @spend_taproot_output_tx
1 Like