Bitcoin Forum
May 13, 2024, 03:15:18 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Creating a multisig address with HD key/ non-HD key?  (Read 156 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
1715613318
Hero Member
*
Offline Offline

Posts: 1715613318

View Profile Personal Message (Offline)

Ignore
1715613318
Reply with quote  #2

1715613318
Report to moderator
"This isn't the kind of software where we can leave so many unresolved bugs that we need a tracker for them." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715613318
Hero Member
*
Offline Offline

Posts: 1715613318

View Profile Personal Message (Offline)

Ignore
1715613318
Reply with quote  #2

1715613318
Report to moderator
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10558



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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
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!