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

Sign P2WSH #24

Open
ulrichard opened this issue Oct 8, 2020 · 1 comment
Open

Sign P2WSH #24

ulrichard opened this issue Oct 8, 2020 · 1 comment

Comments

@ulrichard
Copy link

The function Account::sign() has a comment above stating that it doesn't work for P2WSH. But this is exactly what I need.
I can try to implement this, but I would need some guidance.
The first problem that I have is that the find() in accounts.rs line 652 does not find the matching instance.
I replicated the comparison in a unit test on my side:
`
assert_eq!(
Address::from_script(&spend.script_pubkey, Network::Bitcoin).unwrap().to_string(),
Address::p2sh(&instantiated[0].script_code, Network::Bitcoin).to_string()
);

    assert_eq!(
        spend.script_pubkey,
        instantiated[0].address.script_pubkey()
    );

`
This is where I struggle already. How should the find in accounts.rs be modified?

@ulrichard
Copy link
Author

A more concrete example is in:
https://github.com/ulrichard/rust-wallet/blob/multisig_segwit/src/account.rs
witness_multisig_tests()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant