-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
##Bitcoin.Core钱包 | ||
###导入方式 | ||
####1.导入私钥 | ||
bitcoin-cli importprivkey [privkey] [accountname] [true|false] | ||
<ul> | ||
|
||
[privatekey]私钥</br> | ||
[accountname]账户名(默认"",可选)</br> | ||
[true|false] 是否rescan(默认true,可选)</br> | ||
</ul> | ||
<ul> | ||
|
||
ps:rescan需要花费大约1个小时,在此期间rpc会阻塞 | ||
无法进行rpc操作,因此需要等待rescan完成。 | ||
</ul> | ||
####2.导入助记词 | ||
导入助记词有两个步骤:1.通过助记词生成钱包文件。2.通过rpc命令导入钱包文件(需要等待)</br> | ||
<ul> | ||
|
||
<li>1.通过助记词生成钱包文件</br> | ||
进入key-migrate当前目录</br> | ||
生成钱包文件 *./key-migrate -m "填写助记词"*</br> | ||
得到钱包文件全路径 | ||
<li>2.导入钱包文件: | ||
bitcoin-cli importwallet [filename] | ||
</ul> | ||
<ul> | ||
|
||
filename:为钱包全路径(通过./key-migrate返回得到) | ||
ps:rescan需要花费大约1个小时,在此期间rpc会阻塞 | ||
无法进行rpc操作,因此需要等待rescan完成。 | ||
</ul> | ||
实例: | ||
<li>cd /home/lc (key-migrate文件路径为/home/lc) | ||
<li>sudo chmod +x key-migrate | ||
<li>./key-migrate -m "weapon quick crush salad cricket radio master steak assume build ice ice" | ||
<li>返回 succeed and writen to file:/tmp/wallet-keys969403900 | ||
<li>导入钱包文件 bitcoin-cli importwallet /tmp/wallet-keys969403900 | ||
<li>等待rescan(约一个小时) | ||
###备份方式 | ||
####1.备份私钥 | ||
bitcoin-cli dumpprivkey [address] </br> | ||
[address]地址</br> | ||
<ul> | ||
|
||
返回私钥字符串 | ||
</ul> | ||
|
||
####2.备份钱包文件(私钥的集合) | ||
bitcoin-cli dumpwallet [filename] | ||
<ul> | ||
|
||
返回文件全路径 | ||
</ul> |
Binary file not shown.
Binary file not shown.