chaeplin
Well-known member
* This guide use dumpprivkey and importprivkey
* Purpose of this guide is less hassle in wallet backup.
* Tested in testnet
* user ms06 and user ms05
* As address(private key) for NM is in both wallet, spend in main wallet could spend some portion of NM's 1K.
----> This will not break backup, but masternode could be invalided.
* If you spend using NM's wallet, backup is breaked, you should backup NM wallet also.
Keypool is diffrent in both wallet, so do not spend using NM's wallet.
Use backuped wallet, then backup backuped wallet.
* http://paper.darkcoin.io/
* Other scenario.
: dump privkey of existing NMs, import to existing(or new) wallet.
* current main wallet, user ms06
* make a new address
* backup wallet
* tx 1k to new address
* check balance
* dump privkey of new address
* at user ms05, new wallet.
* balance is zero
* import privkey
* encrypt wallet
done.
As long as you backup main wallet, backup of NM wallet(user ms05 wallet) is not needed.
* Purpose of this guide is less hassle in wallet backup.
* Tested in testnet
* user ms06 and user ms05
* As address(private key) for NM is in both wallet, spend in main wallet could spend some portion of NM's 1K.
----> This will not break backup, but masternode could be invalided.
* If you spend using NM's wallet, backup is breaked, you should backup NM wallet also.
Keypool is diffrent in both wallet, so do not spend using NM's wallet.
Use backuped wallet, then backup backuped wallet.
* http://paper.darkcoin.io/
Code:
Spend your Darkcoins by importing your private key to the client wallet.
Keep in mind when you import your single key to a Darkcoin p2p client and
spend funds your key will be bundled with other private keys in the p2p client wallet.
When you perform a transaction your change will be sent to another Darkcoin address
within the p2p client wallet. You must then backup the p2p client wallet and
keep it safe as your remaining Darkcoins will be stored there.
Satoshi advised that one should never delete a wallet.
* Other scenario.
: dump privkey of existing NMs, import to existing(or new) wallet.
Code:
dumpprivkey <darkcoinaddress>
Reveals the private key corresponding to <darkcoinaddress>
Code:
importprivkey <darkcoinprivkey> [label] [rescan=true]
Adds a private key (as returned by dumpprivkey) to your wallet.
This may take a while, as a rescan is done, looking for existing transactions.
Note: There's no need to import public key, as in ECDSA (unlike RSA) this can be computed from private key.
* current main wallet, user ms06
Code:
ms06@x60t:~> darkcoind listaddressgroupings
[
[
[
"mjSs4eLL18NsVcobKjSJsGChkK6YyeaZSr",
1234.00000000,
"ttt"
]
],
[
[
"muj9oHwCtoWLcrALSfV7yQS2yh1KLpbXo6",
1425.60000000,
"0"
]
],
[
[
"mgosBEJMvd27HiHcm1LLJqTekMAkaxHAvZ",
5511.50020000,
"123"
],
[
"mvz342xruamQuhz8XVwBy2tW15e3rFXZCK",
0.04720000
]
]
]
* make a new address
Code:
ms06@x60t:~> darkcoind getaccountaddress NM01
n4kjkQ4GoB56gwhZDsTr9kWoc1cuKeBcqZ
* backup wallet
Code:
ms06@x60t:~> darkcoind backupwallet ~/darkcoind_wallet_0099.dat
* tx 1k to new address
Code:
ms06@x60t:~> darkcoind walletpassphrase password_long 100
ms06@x60t:~> darkcoind sendfrom 123 n4kjkQ4GoB56gwhZDsTr9kWoc1cuKeBcqZ 1000
49a28459d2adf8ebdd975bcc21c03090ea3398837143063e945fdd5a589c3162
* check balance
Code:
ms06@x60t:~> darkcoind listaddressgroupings
[
[
[
"mjSs4eLL18NsVcobKjSJsGChkK6YyeaZSr",
1234.00000000,
"ttt"
]
],
[
[
"muj9oHwCtoWLcrALSfV7yQS2yh1KLpbXo6",
425.60000000,
"0"
]
],
[
[
"n4kjkQ4GoB56gwhZDsTr9kWoc1cuKeBcqZ",
1000.00000000,
"NM01"
]
],
[
[
"mgosBEJMvd27HiHcm1LLJqTekMAkaxHAvZ",
4508.69300000,
"123"
],
[
"mxuX4HiZsw37Uy75kJwZYxs2gg9psMRcaW",
2.80720000
],
[
"mvz342xruamQuhz8XVwBy2tW15e3rFXZCK",
0.04720000
]
],
[
[
"mgfmNyUwU92wKDRjJHHberGGudiBSNjyDw",
1000.00000000,
"NM02"
]
]
]
* dump privkey of new address
Code:
ms06@x60t:~> darkcoind dumpprivkey n4kjkQ4GoB56gwhZDsTr9kWoc1cuKeBcqZ
cQjuUGLHWqDTnyZRpMzejNd5wKjpHRWqJYMFUgjdjScuChewJnFA
* at user ms05, new wallet.
* balance is zero
Code:
ms05@x60t:~/.darkcoin> darkcoind listaddressgroupings
[
]
* import privkey
Code:
ms05@x60t:~/.darkcoin> darkcoind importprivkey cQjuUGLHWqDTnyZRpMzejNd5wKjpHRWqJYMFUgjdjScuChewJnFA 0 true
ms05@x60t:~/.darkcoin> darkcoind listaddressgroupings
[
[
[
"n4kjkQ4GoB56gwhZDsTr9kWoc1cuKeBcqZ",
1000.00000000,
"0"
]
]
]
* encrypt wallet
Code:
ms05@x60t:~/.darkcoin> darkcoind encryptwallet passphrase
wallet encrypted; DarkCoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.
done.
As long as you backup main wallet, backup of NM wallet(user ms05 wallet) is not needed.
Last edited by a moderator: