Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions 2.3-tapscript.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"\n",
"Tapscript replaces the previous checkmultisig signature operation with OP_CHECKSIGADD. \n",
"\n",
"This multisignature signature opcode requires the witness to provide a valid or invalid signature for each public key, thereby avoiding the need to waste signature verfication operations for each public key in k-of-n multisignature scripts.\n",
"This multisignature signature opcode requires the witness to provide a valid or invalid signature for each public key, thereby avoiding the need to waste signature verification operations for each public key in k-of-n multisignature scripts.\n",
"\n",
"* OP_CHECKSIGADD\n",
" * Equivalent to: `[OP_ROT][OP_SWAP][OP_CHECKSIG][OP_ADD]`\n",
Expand Down Expand Up @@ -322,7 +322,7 @@
"source": [
"#### 2.3.4 Example: Generating a `pkolder` tapscript\n",
"\n",
"We construct a pkhasholder tapscript with the following locking conditions:\n",
"We construct a `pkolder` tapscript with the following locking conditions:\n",
"\n",
"* 2-of-2 MuSig public key\n",
"* Delay of 20 blocks"
Expand All @@ -340,16 +340,16 @@
"c_map, pk_musig = generate_musig_key([pubkey1, pubkey2])\n",
"\n",
"# Generate pkolder tapscript\n",
"pkhash_tapscript = TapLeaf()\n",
"pkhash_tapscript.construct_pkolder(pk_musig, 20)\n",
"print(\"Tapscript descriptor:\", pkhash_tapscript.desc, \"\\n\")\n",
"pkolder_tapscript = TapLeaf()\n",
"pkolder_tapscript.construct_pkolder(pk_musig, 20)\n",
"print(\"Tapscript descriptor:\", pkolder_tapscript.desc, \"\\n\")\n",
"\n",
"print(\"Tapscript operations:\")\n",
"for op in pkhash_tapscript.script:\n",
"for op in pkolder_tapscript.script:\n",
" print(op.hex()) if isinstance(op, bytes) else print(op)\n",
"\n",
"print(\"\\nSatisfying witness elements:\")\n",
"for element, value in pkhash_tapscript.sat:\n",
"for element, value in pkolder_tapscript.sat:\n",
" print(\"{}, {}\".format(element, value.hex()))"
]
},
Expand Down Expand Up @@ -533,7 +533,7 @@
"source": [
"### Spending a single tapscript script commitment\n",
"\n",
"The witness which can spend a single committed tapscript requires witness data which provides the satifying elements of the tapscript, and proof that the tapscript is committed to the witness program.\n",
"The witness which can spend a single committed tapscript requires witness data which provides the satisfying elements of the tapscript, and proof that the tapscript is committed to the witness program.\n",
"\n",
"* `[Stack element(s) satisfying tapscript]`\n",
"* `[Tapscript]`\n",
Expand All @@ -554,7 +554,7 @@
"source": [
"#### Example 2.3.8: Generate a single tapscript segwit v1 address\n",
"\n",
"In this example, we construct segwit v1 output for spending along the single script path. We will reuse the previosuly generated segwit v1 witness program which has the `csahasholder` tapscript committed to it, and encode it to a bech32 address."
"In this example, we construct segwit v1 output for spending along the single script path. We will reuse the previously generated segwit v1 witness program which has the `csahasholder` tapscript committed to it, and encode it to a bech32 address."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion 3.1-degrading-multisig-case-study.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Construct a spending transction"
"#### Construct a spending transaction"
]
},
{
Expand Down