Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: 3 noob questions: native_pubkey, native_address, wallet_dump_private_key  (Read 228 times)

0 Members and 1 Guest are viewing this topic.

Online FractalNode

  • Full Member
  • ***
  • Posts: 61
    • View Profile

Hi

1. What is the difference between native_pubkey & native_address
console > wallet_account_list_public_keys <my_name1>
(...)
"native_pubkey": "BTS5KXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"native_address": "BTS5EXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
(...)

2.
Why wallet_account_list_public_keys <my_name2>  command gives me a different number of items than <my_name1>

3.
how to properly store all private keys (3) accounts in the wallet to retrieve the BTS on another system?

4.
whether a sufficient command for each account
>> wallet_dump_private_key BTS7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
« Last Edit: May 27, 2015, 11:50:29 PM by marcobitsharesx »

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12074
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Welcome to BitShares!

1.
The pubkey is a point on the ECC curve and the address is a hash of that point (Base58 encoded with checksum)
This is the python code I use to derive the address from pubkey
Code: [Select]
def pub2btsaddr(btspubkey) :
   myaddress = ripemd160(hashlib.sha512(btspubkey.decode('hex')).digest())
   return "BTS" + btsBase58CheckEncode(myaddress)
https://github.com/xeroc/python-bitsharestools/blob/master/bitsharestools/address.py

2.
In BitShares, all your "accounts" would be a "wallet" in bitcoin .. they carry many hundreds to thousands of keys .. especially when you are dealing with TITAN transactions
All of them are deterministically derived from the owner or active key

3.
You only need the accounts_owner key which you can dump with wallet_dump_account_private_key <account> "owner_key"
from which all subkeys can be derived (hint: BIP32).
You may want to read http://wiki.bitshares.org/index.php/RecoveringFunds

4.
nop .. those just give the private key of a particular address/pubkey .. you should instead use wallet_dump_account_private_key <account> "owner_key"
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Online FractalNode

  • Full Member
  • ***
  • Posts: 61
    • View Profile

4.
I understand it so:
<wif_key> == wallet_dump_account_private_key <account> "owner_key"

in case of damage I can run the command:
wallet_import_private_key <wif_key> [account_name] [create_new_account] [rescan]

it means:
wallet_import_private_key <( wallet_dump_account_private_key <account> "owner_key")> <[previous_account_name]> [new_account_uniqe_name] [rescan]


3.
I understand that it is safe to import one of the three accounts on another operating system with a command from point. 4

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12074
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
4.
I understand it so:
<wif_key> == wallet_dump_account_private_key <account> "owner_key"

in case of damage I can run the command:
wallet_import_private_key <wif_key> [account_name] [create_new_account] [rescan]

it means:
wallet_import_private_key <( wallet_dump_account_private_key <account> "owner_key")> <[previous_account_name]> [new_account_uniqe_name] [rescan]

Yes .. and if you registered you account on the blockchain you can import your account simply by
wallet_import_private_key <wif_key>
and the wallet will figure out the rest ..

once you reimported your account .. you can regenerate all keys every been generated by issuing wallet_regenerate_keys as described in the wiki

Quote
3.
I understand that it is safe to import one of the three accounts on another operating system with a command from point. 4
Jup .. only exception would be if you imported private keys into your account from elsewhere (e.g. imported AGS funds, or sharedrops, or what ever)
all keys that have been generated deterministically by the client or TITAN can be recovered by wallet_regenerate_keys
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

 

Google+