Skip to content

Instantly share code, notes, and snippets.

# If that is inacceptable, pick as internal key a "Nothing Up My Sleeve" (NUMS) point,
# i.e., a point with unknown discrete logarithm.
# One example of such a point is H = lift_x(0x50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0)
# which is constructed by taking the hash of the standard uncompressed encoding of the secp256k1 base point G as X coordinate.
# In order to avoid leaking the information that key path spending is not possible
# it is recommended to pick a fresh integer r in the range 0...n-1 uniformly at random and use H + rG as internal key.
# It is possible to prove that this internal key does not have a known discrete logarithm with respect to G
# by revealing r to a verifier who can then reconstruct how the internal key was created.
import hashlib
@storopoli
storopoli / nixify-your-codebase.md
Last active June 23, 2025 20:11
Nixify your Codebase Workshop

title: How to Nixify your codebase sub_title: Docker is a shitcoin author: Jose Storopoli, Alpen Labs, storopoli.io, stratabtc.org options: incremental_lists: true theme: override: code: alignment: left

@josibake
josibake / silent-payments-testing.md
Last active January 19, 2026 15:07
silent payments testing

Silent Payments (BIP352) Testing Guide

This guide assumes you have a basic knowledge of the command line and are familiar with the bitcoin-cli RPC client.

Setup (optional)

While not required, this guide was written using a bendir directory for easier testing. If you want to follow the guide without using bendir, it's recommended you alias bitcoin-cli to bitcoin-cli -named -signet -datadir=<your testing datadir> so you can copy-paste the commands directly from the guide. To use bendir for your testing environment:

git clone https://github.com/josibake/bendir.git
@notmandatory
notmandatory / tr_wallet_test.md
Last active March 5, 2025 23:06
Creating a regtest taproot descriptor wallet with bitcoind

This gist demonstrates how to create a bitcoind wallet that is based on pay to taproot (P2TR) descriptors.

Tools used:

  • docker with image bitcoindevkit/bitcoind:v22.0rc2
  • bitcoin dev kit cli, bdk-cli

About bech32 vs bech32m addresses

Steps:

  1. Create aliases to work with bitcoind docker image
@fxfactorial
fxfactorial / lightning-txs.md
Created June 19, 2020 08:21
Lightning transactions: from Zero to Hero

Lightning transactions: from Zero to Hero

This gist contains everything you need to understand Bitcoin/Lightning transactions. We ignore segwit subtleties and fields that aren't necessary for our global understanding.

Table of Contents