Skip to content

Instantly share code, notes, and snippets.

View AdamISZ's full-sized avatar

Adam Gibson AdamISZ

View GitHub Profile
Kixunil /
Last active April 14, 2023 22:07
Efficient reusable Taproot addresses

Reusable taproot addresses


This document proposes a new scheme to avoid address reuse while retaining some of the convenience of address reuse, keeping recoverability purely from Bitcoin time chain and avoiding visible fingerprint. The scheme has negligible average overhead.


taariq /
Last active May 22, 2018 18:59
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 August 31, 2017 16:14
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 August 15, 2017 13:50
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)

Moving to gemini


# 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"