Skip to content

Hierarchical Deterministic questions #36

Open

Description

@TZ12345678

Hi,

I have few questions about Hierarchical Deterministic usage:

  1. In the example of the readme it shows the following line:
    xprv = bitsv.Bip32utils.get_xprv_bip32_node("xprv9s21ZrQH143K4Un4SHjdvXpzzdQjpm7vVhQ79BMi5V58nptUo4NGqytwH68XAVj5LkDxjSqdVjdDinFCT8WqfBT7zigdtaGcrffTmBdwFH5")
    From where exactly do get the string in the function parameter?

  2. When i receive a payment into the addresses supplied by bitsv.Bip32utils.get_addresses_from_xprv() output does the balance of the received funds summarizes into a single parent address?

Assuming 2 is true:

  1. Can i send payments from that parent address using the first example in the readme?
    if not then how?

  2. When that transaction is made then does multiple transactions of all the HD addresses are created? or only from the parent address?

  3. Can the transactions made by the parent address be tracked if someone has a child HD address of it?

Thanks

Activity

  1. AustEcon commented on Jul 12, 2019

    @AustEcon
    Owner

    As Teran says, I am moving all of the bip32 stuff to https://github.com/AustEcon/bsvbip32.

    As to your questions:

    1. I got that from typing "getmasterprivate()" in the electrum SV terminal. (type "help()" for a list of functions)
    2. This is (currently, until I improve it) only for key generation... there is no built-in balance retrieval etc... like bitsv PrivateKeys have. My plan with the "bsvbip32" library is to have each node inherit from bitsv.PrivateKey such that you will have all of these kinds of options at your fingertips... 😄

    So at present, you'd have to manually iterate through all derivative addresses and add up the balances via bitsv... (that's why I want to make it better) - this was only a "patch job" but I want to improve on it soon.

    1. You can instantiate a bitsv.PrivateKey with the wif and do it that way from any node. But the node does not contain this functionality natively (yet).

    2. If you were to take the private key wif of a parent and make a transaction... it would only generate a transaction for that one private key... there would be no impact on derivative keys.

    3. If all they have are addresses. I don't see how they'd be able to tell... Addresses are the result of a RIPEMD-160 hash of a SHA256 hash of the public key... so there's a pretty tough layer of obfuscation there... (Disclaimer: I'm not a cryptographer!)

    PS: I will likely be deleting the entire bip32.py file from bitsv today... and will not be in the next release (coming soon). Use bsvbip32 instead or pin your version so you are not affected. 😄

  2. TZ12345678 commented on Jul 13, 2019

    @TZ12345678
    Author

    Thanks
    So basically if i got 10 HD addresses with 0.1 BTC in each and i would like to transfer 1 BTC to someone then do i must iterate all the HD addresses and make 10 transactions manually?

  3. AustEcon commented on Jul 13, 2019

    @AustEcon
    Owner

    Yes. That is correct.

  4. AustEcon commented on Jul 14, 2019

    @AustEcon
    Owner

    Well. I should have read more carefully... you could use existing bitsv stuff to extract all the utxos and construct your own single transaction... but currently there is no function that will do all that stuff for you.

    Something like this would be more easy to implement once I've done a bit more work on the bsvbip32 front...

    On the roadmap!

  5. Repository owner deleted a comment from rookiecdn on Mar 4, 2024
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

    questionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions