Here is a simple example of spending a transaction from a CTV (CHECKTEMPLATEVERIFY) contract via Pay To Anchor (P2A), with an extra input to bump the fees.
- Rust https://www.rust-lang.org/tools/install
- Bitcoin Inquisition 28.0 node https://github.com/bitcoin-inquisition/bitcoin/releases/tag/v28.0-inq
follow this guide to compile bitcoin (works for the inquisition fork) I will add a docker file or something to do this eventually
https://jonatack.github.io/articles/how-to-compile-bitcoin-core-and-run-the-tests
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
./bitcoind -signet -addnode=inquisition.bitcoin-signet.net -minrelaytxfee=0 -fallbackfee=0.0001
export BITCOIN_RPC_USER="rpc_username"
export BITCOIN_RPC_PASS="rpc_password"
export SIGNET_WALLET="signet wallet name"
cargo run --no-default-features --features "signet"
./bitcoind -regtest -minrelaytxfee=0 -fallbackfee=0.0001
export BITCOIN_RPC_USER="rpc_username"
export BITCOIN_RPC_PASS="rpc_password"
cargo run --features "regtest"
Shoutout to supertestnet, bennyhodl, glozow and Jeremy Rubin for their code/examples.
- Bennyhodl's dlcat for the ctv hash function
- Supertestnet Zero Fee Playground
- Ephemeral Anchors on Bitcoin Optech
- Bitcoin GitHub PR #30239
- Bitcoin Core 0.28 Wallet Integration Guide on Bitcoin Optech
-
bump fee with extra input: Parent Transaction on Mempool Space
-
bump fee with extra input: Child Transaction on Mempool Space
- orignal fee spend: Parent Transaction on Mempool Space
- orignal fee spend: Child Transaction on Mempool Space