Bitcoin Forum
December 12, 2024, 05:00:42 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Creating a multisig address with HD key/ non-HD key?  (Read 172 times)
BusyAssistant (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 4


View Profile
February 08, 2019, 05:54:18 AM
 #1

Is it valid to create a 2/3 multisig address using a mix of HD keys and non- HD?

Reason I ask is because on bitcoin-cli when trying to sign, I'm getting an error about invalid private key when trying to sign a 2/3 tx with the HD child private key. It might be something else, but is this valid?

The exact error msg is this:

Code:
bitcoinrpc.authproxy.JSONRPCException: -5: Invalid private key

Thanks
pooya87
Legendary
*
Offline Offline

Activity: 3668
Merit: 11103


Crypto Swap Exchange


View Profile
February 08, 2019, 06:07:14 AM
 #2

you can't mix an extended key with a normal private key and get a multi signature address. a multi sig is created by mixing the private keys themselves. so to create a 2 of 3 key you need to give your function 3 private keys or define a new function yourself that takes an extended key, derives n keys from it and then mixes it with the single keys (m-n) keys that you additionally give it and returns the multi signature address for you.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BusyAssistant (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 4


View Profile
February 08, 2019, 05:25:43 PM
 #3

Ok so I am not using an extended private key to generate the multisig address. I'm using a prviate key derived from it (a child private key?).

I successfully generate the 2/3 address via bitcoin-cli method createmultisig with the public keys (1 belonging to child public key, 2 belonging to standard non-HD keys).

So just to clarify, it is valid to create a multisig address with mixed normal and child public keys?
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
February 08, 2019, 05:33:12 PM
 #4

Yes it is! They're all still private keys, they follow the same format just one can be derived from a seed.

You can do some useless fancy stuff with these keys to oalrhough I'm not sure why you would do what you're trying to do. There may come issues later on when you try to make and sign a transaction if they're on different applications (unless you have all three on an instance of electrum or something or you want to spend them all at once and can import them to bitcoin core or another client at the point you want to spend them).
BusyAssistant (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 4


View Profile
February 08, 2019, 05:39:58 PM
 #5

Ok thanks. It must be a syntax error I'm having when trying to sign, as it usually is. I have a hell of a time with the stupid escaping, and the signrawtransactionwithkey method has tons of parameters. Thanks.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!