Skip to content

Example given to show that it is impossible to go from a bitcoin address to a public key is not clear #77

Open

Description

@hobbyexplorer

At this page:
https://programmingblockchain.gitbooks.io/programmingblockchain/content/bitcoin_transfer/private_key.html

In this example:
PubKey publicKey = privateKey.PubKey;
BitcoinPubKeyAddress bitcoinPublicKey = publicKey.GetAddress(Network.Main); // 1PUYsjwfNmX64wS368ZR5FMouTtUmvtmTY
//PubKey samePublicKey = bitcoinPublicKey.ItIsNotPossibl

Issues are:

  1. Bitcoin address is shown to be generated from public key instead of public key hash. This is not consistent with previous examples. Previous examples show that the bitcoin address is created from Public Key Hash instead of public key itself.
  2. There is no true/false assert statement style code. Having a boolean assertion explains things more clearly.

Activity

  1. NicolasDorier commented on Oct 24, 2017

    @NicolasDorier
    Collaborator

    I agree, can you make a PR for this? pubkey.Hash.GetAddress(Network.Main) might be more coherent.

  2. nopara73 commented on Oct 24, 2017

    @nopara73
    Contributor

    ACK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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