Bitcoin Forum
June 14, 2024, 05:16:37 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How To Verify Multisig Public Keys bitcoin-QT  (Read 1322 times)
GrapeApe (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250



View Profile
October 15, 2014, 02:53:38 PM
 #1

I'm wondering how you go about verifying the public keys used to create a multisig address? Prefer to do it using the redeemScript and the address itself vs. the txid.
chanz
Sr. Member
****
Offline Offline

Activity: 298
Merit: 250


View Profile
October 15, 2014, 03:21:59 PM
 #2

Try doing { validateaddress "address" } see if that shows something in tags like "isscript" : false/true.

My BTC address : 1KfS1c14Tg2hgQEVz2bCJeFox6FpyYFvM6
GrapeApe (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250



View Profile
October 15, 2014, 03:39:47 PM
 #3

Try doing { validateaddress "address" } see if that shows something in tags like "isscript" : false/true.

Yeah that was the first thing I tried. it just shows whether or not it's a valid address and whether or not I own it (nobody does it takes 2 of 3).

Example:
{
"isvalid" : true,
"address" : "3F1uvWUxKyDCTgNPtdH6TgtjGLbEvpBWXu",
"ismine" : false,
"account" : ""
}

However with a normal address you get the compressed public key associated with that address (if it's owned by you) which is how you create the multisig address to begin with.
chanz
Sr. Member
****
Offline Offline

Activity: 298
Merit: 250


View Profile
October 15, 2014, 03:45:44 PM
 #4

I tried it now gave me same thing i wana know it now too plus on that note as you said qt gives the compressed keys is there
a way to get them uncompressed? Can't find nothing about it.

My BTC address : 1KfS1c14Tg2hgQEVz2bCJeFox6FpyYFvM6
GrapeApe (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250



View Profile
October 15, 2014, 03:52:41 PM
 #5

There is a way. There is even a python script running around out there that does just that. It isn't really needed though because you can you mix uncompressed keys with compressed keys to create a multisig address. At least you can with QT.

GrapeApe (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250



View Profile
October 15, 2014, 05:56:14 PM
 #6

Okay I got it figured out, funny thing is I got it from one of your previous post. Once the multisig address is created you add it like your post says and then you get the output below when you validateaddress.
It doesn't give me the public keys like my thread was asking for but it gives the btc addresses which is ultimately what I need to confirm anyway.

From the testnet QT:

{
"isvalid" : true,
"address" : "2NBTCbcAJ5jLvMKZU9Vt59mN5HJqbzsiTLu",
"ismine" : true,
"isscript" : true,
"script" : "multisig",
"hex" : "5221034bdd619568d26a20d00a50e7c351f596c42e148cfdb099e317b2e2c553e1345d210230fd7 1e63947197589e706c2e0fb6aa05eae20fee2f92c2ffdacef252ea6afb552ae",
"addresses" : [
"mmdmRVnPqL3akvtxupMWQSW2JcLTSBQZ5d",
"mxiuyocweZ6rPsLrGaR8wgsafHXnTcRBhU"
],
"sigsrequired" : 2,
"account" : ""
}





1. { validateaddress "address" } Do it with both addresses and copy the "pubkey" it gives you.
2. { createmultisig 2 '["1st pubkey","2nd pubkey"]' }
3. Save the redeemScript.
4. Paste the same command in step-2 but replace "createmultisig" with "addmultisigaddress"

Hope it works.
chanz
Sr. Member
****
Offline Offline

Activity: 298
Merit: 250


View Profile
October 17, 2014, 05:33:16 PM
 #7

Ooh i'm glad it helped someone. Cheers.  Cheesy

My BTC address : 1KfS1c14Tg2hgQEVz2bCJeFox6FpyYFvM6
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!