Skip to content

Sign P2WSH #24

@ulrichard

Description

@ulrichard

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions