Extended keys and signing TX

0

I have couple of keys of path m/0/0

TPriv- Extended private key (pvt key+chain code)

TPub- Extended public key (public key+chain code)

Now I generate an address of of the TPub key and revived funds

Question - To spend the funds how do I sign them I mean do I sign them using the TPriv key or I need to derive a private key from the TPriv key ?

Or can I remove the chain code from TPriv and then sign

f4r4

Posted 2018-04-05T18:13:39.977

Reputation: 181

Answers

1

Question - To spend the funds how do I sign them I mean do I sign them using the TPriv key or I need to derive a private key from the TPriv key ?

To spend the UTXO of a child address (derived from either your xpub or xpriv), you will need to use the xpriv key to derive the child private key that is related to that address. The child private key will be used to sign the transaction, the parent private key cannot sign for child UTXOs (with or without the chaincode).

chytrik

Posted 2018-04-05T18:13:39.977

Reputation: 10 276

in addition to @chytrik answer, you need WIF private key for that child address.Adam 2018-04-05T20:23:20.123

@Adam how does the encoding of the private key matter?Pieter Wuille 2018-04-05T20:33:12.770