Skip to content

Commit 349539c

Browse files
committed
Bonus example added
1 parent 9dbb980 commit 349539c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ProofOfOwnership/Program.cs

+7-6
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,22 @@ static string GetFirstBitcoinAddressEver()
7777

7878
/*
7979
* Actually your wallet software is what decodes addresses into ScriptPubKeys.
80-
* Or decodes ScriptPubKeys to addresses.
81-
* Here is how you do it:
80+
* Or decodes ScriptPubKeys to addresses (when it is possible).
81+
* Here is how it does it:
8282
*/
8383

8484
/*
85-
* First it is important to know a ScriptPubKey may contain one or multiple public keys.
86-
* Public keys can be encoded into a bitcoin address.
87-
* When a ScriptPubKey contains multiple public keys, it is called multi-sig.
85+
* In early times a ScriptPubKey contained one public key.
86+
* Here is the first ScriptPubKey ever:
87+
* 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f OP_CHECKSIG
88+
* From a public key you can derive a bitcoin address.
8889
* So in order to get the first address ever, we can get the first public key ever:
8990
*/
9091

9192
var firstPubKeyEver = firstScriptPubKeyEver.GetDestinationPublicKeys().First();
9293

9394
/*
94-
* You can get a bitcoin address from a public key with the network identifier:
95+
* You can get a bitcoin address from a public key and with the network identifier:
9596
*/
9697
var firstBitcoinAddressEver = firstPubKeyEver.GetAddress(Network.Main);
9798

0 commit comments

Comments
 (0)