Skip to content

Commit fb33515

Browse files
author
ChallengeDev210
committed
Merge rust-bitcoin/rust-bitcoin#940: Add psbt watch-only/cold-storage example
cd2369b Run ecdsa-psbt example in test script (Tobin C. Harding) 6967c0e Add psbt example (Tobin Harding) Pull request description: Add an example PSBT workflow. The workflow we simulate is that of a setup using a watch-only online wallet (contains only public keys) and a cold-storage wallet (contains the private keys). We create and update a PSBT using the watch-only wallet then pass the PSBT to the cold-storage wallet to sign. Partially resolves #892 (more done in #935). ## Note This PR includes a sub-module in `examples/psbt.rs` that implements ECDSA signing. This will hopefully eventually be merged into the main crate by way of rust-bitcoin/rust-bitcoin#957. We have three PRs that add examples/tests of PSBTs that need to do signing, in order to help us design a good AP in #957 I think it would be beneficial to complete and merge these three PRs. 1. This PR (PSBT ECDSA example) 2. PBST ECDSA integration test: rust-bitcoin/rust-bitcoin#935 3. PSBT taproot example: rust-bitcoin/rust-bitcoin#999 Note to self, this will need a change to `test.sh` if #1079 merges. ACKs for top commit: apoelstra: ACK cd2369b sanket1729: ACK cd2369b. The example is clean, you can address the comments in followups. Tree-SHA512: c4fb8ec631bf8bfc30534e8974b1f6c4bb7cc6def165a4ee2bb7aa73f5aa7fdc11d2000ca25792a4b534b2c5bf1592efe542ada14a9d702c7dfacbaa808f3aea
2 parents 3d7d979 + 3ff6128 commit fb33515

File tree

3 files changed

+635
-0
lines changed

3 files changed

+635
-0
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,7 @@ name = "bip32"
5656
[[example]]
5757
name = "handshake"
5858
required-features = ["std"]
59+
60+
[[example]]
61+
name = "ecdsa-psbt"
62+
required-features = ["std", "bitcoinconsensus"]

contrib/test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ do
6262
cargo test --verbose --features="$feature"
6363
done
6464

65+
cargo run --example ecdsa-psbt --features=bitcoinconsensus
66+
6567
# Build the docs if told to (this only works with the nightly toolchain)
6668
if [ "$DO_DOCS" = true ]; then
6769
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly rustdoc --features="$FEATURES" -- -D rustdoc::broken-intra-doc-links

0 commit comments

Comments
 (0)