Skip to content

Latest commit

 

History

History
97 lines (67 loc) · 4.07 KB

README.md

File metadata and controls

97 lines (67 loc) · 4.07 KB

CTV + Pay To Anchor Example 🥪 + ⚓

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.

Index

  1. Requirements
  2. Setup Instructions
  3. Resources
  4. Transaction Examples

Requirements

Setup

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

install rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

signet

./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"

regtest

./bitcoind -regtest -minrelaytxfee=0 -fallbackfee=0.0001
export BITCOIN_RPC_USER="rpc_username"
export BITCOIN_RPC_PASS="rpc_password"
cargo run --features "regtest"

Resources

Shoutout to supertestnet, bennyhodl, glozow and Jeremy Rubin for their code/examples.

Transaction Examples:

Adding Extra Input to Cover the Fees (The code is currenty setup to test this transaction type)

Minimum Possible Fees with No Extra Input

Spending with no p2a using the ctv output

#1 (comment)

Spending using a 1p1c Package

https://x.com/1440000bytes/status/1868375944832156108