-
Notifications
You must be signed in to change notification settings - Fork 850
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
GetDestinationAddress
returns a different address compared to the online explorers
#1220
Comments
Use |
Do you mean the following? if so, it returns var script = Script.FromHex(hex);
var address = script.GetDestinationAddress(Network.Main); |
It is because this is P2PK script pubkey, and p2pk does not have an defined address format.
I don't know your goal, so I cannot give any advice more than this. |
Thanks! Is option |
Yes, I suppose. |
Any thoughts how I can do that with NBitcoin? |
Thanks! Have you tried the method in the link you suggested on the specific output I mentioned above? I tried, and still I get zero destination public keys, and not sure how I can get the same address as the online explorers for that specific output. |
I am trying to get the destination address of txout
n=1
in the following TX.Using the following code:
I get:
However, the online explorers, such as this,
return the following address for this transaction.
The text was updated successfully, but these errors were encountered: