MetacoSA / NBitcoin

Comprehensive Bitcoin library for the .NET framework.
MIT License
1.85k stars 839 forks source link

Sign a text message with NBitcoin #1187

Open aboimpinto opened 9 months ago

aboimpinto commented 9 months ago

Hello,

I could not find a way to sign a simple text message with NBitcoin.

Can you point me in the right direction so I can sign the message and verify?

thanks Paulo Aboim Pinto

dangershony commented 9 months ago

You can't its been deleted on main repo, use a fork of NBitcoin like blockcore or something

aboimpinto commented 9 months ago

Why was this feature removed?

dangershony commented 9 months ago

https://github.com/MetacoSA/NBitcoin/issues/1094

aboimpinto commented 9 months ago

I didn't like the way this thread went ... I'm no expert in the Bitcoin protocol but I know Satoshi Nakomoto signed a message on the genesis block and now using NBitcoin we cannot do it... Am I right with this comment?

dangershony commented 9 months ago

You are totally right imo, but for the sake of keeping politics out of code (unfortunately this is not always the case) just use a fork of NBitcoin or implement yourself the message signing, it's not that hard.

https://github.com/block-core/blockcore/blob/master/src/Blockcore/NBitcoin/Key.cs#L121

aboimpinto commented 9 months ago

I agree ... politics should be out of the code ... thanks!!