Open betocastelo opened 3 years ago
p2sh doesn't contain a key and then there is no way to sign/verify a message.
How do you prove ownership of a transaction involving a p2sh address? Is it possible?
Using a trezor wallet I'm able to do the following: create a new wallet (using a passphrase). Obtain a receive address (a 3* address, which I assume indicates a P2SH address). Sign a message with the address. Switch to a different wallet (different passphrase). Verify the message successfully. How do I verify the same message using NBitcoin?
Sorry about the really basic questions, I'm using NBitcoin along with the book and trying to match what I read with my usage of btc, to learn more about bitcoin development. I'd appreciate any pointers.
You prove ownership of a p2sh by providing the script that was committed.
If trezor gives you an address starting with '3' then it is by sure a p2wpkh wrapped around a p2sh and in that case there is a key pair you can use to sign and verify messages.
I don't know how to do it, I only know that you will need the pubkey because it is not possible to extract it from a p2sh i believe.
Please if you have compile it, can you send me the NBitcoin.dll to my email murphycelestine28@gmail.com, thanks
I'm following the example on the Programming the Blockchain in C# book, but would like to use a P2SH address. How to produce a BitcoinPubKeyAddress object from that p2sh address to verify the message with? Or is there another path?