Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I might just have this screwed up, but, #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion examples/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ fn main() -> anyhow::Result<()> {
// data and would get them from there.
psbt.inputs[0].witness_utxo = Some(alice.input_utxo());
psbt.inputs[1].witness_utxo = Some(bob.input_utxo());


// if psbt.bip32_derivation does not have public key : KeySource, the keypair never signs the transaction because
// psbt.sign calls bip32_sign_ecdsa() for ecdsa signatures, and bip32_sign_ecdsa() iterates over psbt.bip32_derivation
let fake_fp: [u8; 4] = [0; 4];
psbt.inputs[0].bip32_derivation.insert(alice.0.pk.clone(), (Fingerprint::from(fake_fp), DerivationPath::from_str("m")?));
psbt.inputs[1].bip32_derivation.insert(bob.0.pk.clone(), (Fingerprint::from(fake_fp), DerivationPath::from_str("m")?));

// Since we are spending 2 p2wpkh inputs there are no other updates needed.

// Each party signs a copy of the PSBT.
Expand Down
Loading