This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
import bitcointx as btc | |
btc.allow_secp256k1_experimental_modules() | |
btc.select_chain_params("bitcoin/testnet") | |
from bitcointx.wallet import CCoinKey | |
from bitcointx.core import COutPoint, CTxIn, CTxOut, CMutableTransaction, CTxInWitness | |
from bitcointx.core.script import (CScript, OP_CHECKSIGADD, OP_CHECKSIG, OP_NUMEQUAL, | |
TaprootScriptTree, CScriptWitness) | |
from bitcointx.wallet import P2TRCoinAddress | |
from binascii import hexlify, unhexlify |
""" THIS CODE IS ONLY EDUCATIONAL - NO | |
PART OF IT IS FIT FOR PRODUCTION USE. | |
NO, SERIOUSLY, I MEAN IT!! | |
As for reading it, start with the `__main__` | |
section at the bottom and go from there. | |
Comments are, deliberately, voluminous. | |
If you want to run the example, just: | |
(a) install Joinmarket (else see the notes on import) |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!