Skip to content

Instantly share code, notes, and snippets.


Adam Gibson AdamISZ

View GitHub Profile
taariq /
Last active May 22, 2018
Mimblewimble Discreet Log Contracts with Adaptor Signatures by Ruben Somsen

Hi all,

Tadge Dryja's Discreet Log Contracts (DLC) can be combined with Andrew Poelstra's Adaptor Signatures (AS). I'm simply describing the combination of the two existing concepts without any fundamental changes, but I thought it was worth writing out explicitly since I haven't seen any write-up. Hopefully it doesn't contain any errors.

Starting from Schnorr signature [R, s].

In DLC, the oracle will reveal one of multiple possible s values as part of signing the outcome of an event. This s is essentially a private key for which the public key S can be calculated ahead of time (because R is committed to in advance).

In AS, instead of just R (essentially a public key), you add a second public key P of which the payer wishes to obtain the private key p from the payee. Only by revealing p can the payee make the signature valid, and thus receive the payment.

wozz /
Created Aug 31, 2017
joinmarket bitcoin cash tool
# this tool can be used to create sweep transactions for bitcoin cash
# it's designed to send all coins from one mixdepth at a time to a single
# address with a small fee.
# bitcoin cash donations: 128Q5Ro2c9Enb5DhG7wSBmws8nCtC7e5x8
# sample run command:
# python -m 1 -g 10 -a 128Q5Ro2c9Enb5DhG7wSBmws8nCtC7e5x8 -f 3000 wallet.json
# this tool does not broadcast the signed transaction, it only prints it to the terminal
mflaxman /
Created Aug 15, 2017
Proof you can recover your Trezor funds without a Trezor (if it breaks and/or the company goes out of business)
from bitmerchant.wallet import Wallet
from mnemonic import Mnemonic
# put in whatever Trezor generates for you here (or backup from this empty/insecure one as a test)
mnemonic = 'clean health food open blood network differ female lion eagle rough upon update zone antique defense venture uncover mobile charge actress film vocal enough'
passphrase = '' # empty string or whatever you actually choose
path = "m/44'/0'/0'/0/0" # whatever shows up on the UI for that account (everything will start with m/44'/0' since it's bip44)
child = Wallet.from_master_secret(Mnemonic('english').to_seed(mnemonic, passphrase)).get_child_for_path(path)
child.to_address() # '18K9axbPpwqZgngB58nuwsYevL2z6ey4YG' (confirm this matches what Trezor is showing you)

Statistics of bitcoin input (script) lengths from august 2015 to august 2017-ish

I wanted to know, how long inputs are in bitcoin transactions.

The script is here. It is in node, and it is using bitcoinjs-lib libraries.

Complete results are here (just the final ones), sorted by counts.


# Install Apple Command Line Tools
xcode-select --install
# Install Homebrew under /usr/local
/usr/bin/ruby -e "$(curl -fsSL"
# Install PyQt4
brew install cartr/qt4/pyqt@4 libsodium
# Create virtualenv "jmvenv"