Skip to content

Instantly share code, notes, and snippets.

Stopping Arbitrary Data

Disclaimer: This is not an endorsement of any of the ideas presented in this document.

These are notes from the 2025-09-15 livestream: https://www.twitch.tv/videos/2567397716

Disallow From Output Scripts

First have to validate output scripts at all.

Ecash mints funded with Spillman channels: The ultimate nodeless Lightning wallet

Overview

This proposal introduces a self-custodial credit system that sits in front of an existing ecash mint. The users balance is held in a trustless credit contract that can be instantly swapped for ecash tokens offchain at the time of payment. Custodial risk only exists while payments are in flight, which is usually seconds, and only for the amount currently being transacted. The balance is always self-custodial and if the mint disappears or is uncooperative the user can unilaterally exit and reclaim their credits onchain.

The protocol works on Bitcoin today and does not require a soft fork or any new opcodes. Infact it doesn't require any opcodes at all. The protocol is almost entirely off chain, every possible way to execute the trustless credit contract results in a MuSig2 taproot key path spend onchain, no Bitcoin Script required.

The problem

@jleo84
jleo84 / key_converter.py
Created September 2, 2020 01:45
Convert any Bitcoin key prefix to another (e.g.: xpub to ypub, zpriv to Zpriv)
import hashlib
import base58
import sys
prefix_dict = {
"xprv": "0488ade4", # Mainnet - P2PKH or P2SH - m/44'/0'
"yprv": "049d7878", # Mainnet - P2WPKH in P2SH - m/49'/0'
"zprv": "04b2430c", # Mainnet - P2WPKH - m/84'/0'
"Yprv": "0295b005", # Mainnet - Multi-signature P2WSH in P2SH
"Zprv": "02aa7a99", # Mainnet - Multi-signature P2WSH
@carchrae
carchrae / minecraft-sleep.sh
Last active July 30, 2023 15:25
stop (pause) inactive minecraft server process
#!/bin/bash
# /home/minecraft/bin/minecraft-sleep.sh
#set -v
cd "$(dirname "$0")"
# service name (i'm using systemd)
SERVICE_NAME="$1"