Skip to content

Instantly share code, notes, and snippets.

View notmandatory's full-sized avatar

Steve Myers notmandatory

View GitHub Profile
@notmandatory
notmandatory / gist:a7cade3468e90c699037292123a1ca1a
Last active April 26, 2023 20:19
Create core descriptor wallet
# install bitcoind via your favorite method
# start regtest bitcoind
mkdir -p /tmp/regtest1/bitcoind
bitcoind -datadir=/tmp/regtest1/bitcoind -regtest -server -fallbackfee=0.0002 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 -peerblockfilters=1 -daemon
# cookie file location: /tmp/regtest1/bitcoind/regtest/.cookie
# create test bitcoind wallet
bitcoin-cli -datadir=/tmp/regtest1/bitcoind -regtest -named createwallet wallet_name="regtest1" disable_private_keys=true blank=true
@notmandatory
notmandatory / ppmsss.md
Last active July 25, 2023 13:45
Privacy preserving multi-sig signing service

Privacy preserving multi-sig signing service

Problem

Create a signing service that when properly authorized will add valid signatures to a client's PSBT without knowing the client's full wallet history. The signing service must be able to determine the transaction spending amount. The client must be able to sign and finalize a transactions independently of the service.

Solution

  1. For each client the signing service creates a signing bip39 xprv key and shares the corresponding xpub with the client's software. The signing service does not need to share any root key information with the client except the key fingerprint. Example:
@notmandatory
notmandatory / gist:6fa85dd942089833629bdb40d2b54858
Last active December 28, 2023 18:45
BDK rpc cli setup and testing

Some notes on my manual rpc cli setup and testing:

  1. start bitcoind in regtest mode
mkdir /tmp/bitcoind
bitcoind -datadir=/tmp/bitcoind -regtest -server -fallbackfee=0.0002 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 --peerblockfilters=1 -daemon
  1. create bitcoind test wallet and generate blocks
bitcoin-cli -datadir=/tmp/bitcoind -regtest createwallet "test"
@notmandatory
notmandatory / gist:7846a6023627ea8c0a4b646f643ec73f
Last active April 15, 2024 18:51
How to import bdk descriptor into core wallet
echo create temp diretory to store bitcoind data
mkdir -p /tmp/regtest1/bitcoind

echo start bitcoind in regtest mode
bitcoind -datadir=/tmp/regtest1/bitcoind -regtest -server -fallbackfee=0.0002 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 -peerblockfilters=1 -daemon

echo create blank descriptor wallet
bitcoin-cli -datadir=/tmp/regtest1/bitcoind -regtest -named createwallet wallet_name="regtest1" blank=true disable_private_keys=true
{