Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Get public key from an address

Discussion in 'Daemon and QT Wallet Guides' started by JZA, May 27, 2017.

Tags:
  1. JZA

    JZA Active Member

    Joined:
    Jan 4, 2016
    Messages:
    511
    Likes Received:
    226
    Trophy Points:
    113
    Dash Address:
    XmZ3aBBWJdYa6hUJkWbTvwHMwMscmHQFNH
    Hi I want to know how to get the public key from an address on the console. I see ```importpubkey``` but I would need something more like a list or getpubkey.
     
  2. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    "validateaddress youraddresshere"
     
  3. JZA

    JZA Active Member

    Joined:
    Jan 4, 2016
    Messages:
    511
    Likes Received:
    226
    Trophy Points:
    113
    Dash Address:
    XmZ3aBBWJdYa6hUJkWbTvwHMwMscmHQFNH
    Anyway to get an uncompress address:
    [email protected]:~ $ dash-cli validateaddress XbbvfoNAxJXZPm4Ve8NcAhdBCG9yhkAfwp
    {
    "isvalid": true,
    "address": "XbbvfoNAxJXZPm4Ve8NcAhdBCG9yhkAfwp",
    "scriptPubKey": "76a9140a0a156e037c712b8192f1b766968b425053cf8988ac",
    "ismine": true,
    "iswatchonly": false,
    "isscript": false,
    "pubkey": "022c79e7699ebb6c07afdcdfeb1aac03ce4707f0c2628bcbef86b93e2e6b97d69f",
    "iscompressed": true,
    "account": ""
    }
    I get an iscompressed true.
     
  4. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
  5. JZA

    JZA Active Member

    Joined:
    Jan 4, 2016
    Messages:
    511
    Likes Received:
    226
    Trophy Points:
    113
    Dash Address:
    XmZ3aBBWJdYa6hUJkWbTvwHMwMscmHQFNH
    I think the compressed public key are not taken by electrum when creating a multi-sig wallet.
    [​IMG] [​IMG]
     
  6. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    Electrum is asking you for master public key i.e. the one that start with xpub. I guess it then derives addresses from both your and cosigner master pubkey in parallel to create each next multisig address but do not quote me for that :)

    If you need a single multisig address for a single set of addresses/pubkeys - use "addmultisigaddress" rpc in Dash Core instead.