【教程】Qitmeer Wallet PC钱包使用教程

Qitmeer Wallet 使用教程

第一步:克隆代码,编译钱包 (download and build)

you can download from release. //你可以直接从 release下载
if you have golang environment, you can build it by yourself. //如果有 golong 环境,可以自己编译

$ git clone https://github.com/Qitmeer/qitmeer-wallet.git
$ cd qitmeer-wallet/
$ make

How to use help(使用帮助说明):$ ./qitmeer-wallet.exe qc --help

$ ./qitmeer-wallet.exe qc --help
qitmeer wallet command

Usage:
  qitmeer-wallet qc [command]

Available Commands:
  console               console
  create                create
  createnewaccount      create new account
  getaddressesbyaccount get addresses by account
  getbalance            getbalance
  getlisttxbyaddr       get all transactions for address
  importprivkey         import prikey
  listaccountsbalance   list Accounts Balance
  sendtoaddress         send transaction
  syncheight            Get the number of local synchronization blocks
  updateblock           Update local block data
  web                   web

Flags:
  -a, --appdatadir string       wallet db path
  -c, --configfile string       config file (default "config.toml")
      --create                  Create a new wallet
  -d, --debuglevel string       Logging level {trace, debug, info, warn, error, critical} (default "info")
  -h, --help                    help for qc
      --listeners stringArray   rpc listens (default [127.0.0.1:38130])
  -l, --logdir string           log data path
  -n, --network string          network (default "testnet")
  -P, --pubwalletpass string    data encryption password (default "public")
      --qcert string            Certificate path
      --qnotls                  tls (default true)
  -p, --qpass string            qitmeer node password (default "123456")
  -s, --qserver string          qitmeer node server (default "127.0.0.1:8030")
      --qtlsskipverify          tls skipverify (default true)
  -u, --quser string            qitmeer node user (default "admin")
      --rpcPass string          rpc pass,default by random (default "8v8XaqXxIDs6ErVQ5u5UedlP")
      --rpcUser string          rpc user,default by random (default "k9lYmnZs")
      --ui                      Start Wallet with RPC and webUI interface (default true)

Use "qitmeer-wallet qc [command] --help" for more information about a command.

第二步:使用命令行创建钱包 (Creating wallet using the qitmeer-wallet command )

  • ** 修改配置文件 config.toml(Modify config file config.toml)**

    主要配置项:节点信息 (Main configuration item: node information)

    模板(Template):sample-config.toml

#configFile=""  #Your config.toml profile directory
#appDataDir="" # Your DB storage path
#logDir="" # log path

#network="mainnet" #network mainnet,testnet,privnet default testnet
network="testnet"   
#Network select testnet(网络选择 testnet)

#Qitmeerd
QServer="127.0.0.1:8131"
QUser="admin"
QPass="123456"

QNoTLS=false
QTLSSkipVerify=true
#WalletPass="public" #Wallet encryption code default public
WalletPass="public"

MinTxFee=200000
# The minimum transaction fee in AtomMEER/kB default 200000 (aka. 0.002 Qitmeer/kB)
Confirmations=10
# Number of block confirmations

#web model
#listeners=["127.0.0.1:8130"]
#rpcUser=""
#rpcPass=""
#ui=true

QitmeerdSelect = "local"   
#This configuration enables node switching
# 这个配置能实现节点切换,这里选local,那么就会使用下边[[Qitmeerds]] 配置的local配置;

# local 节点对应的rpc配置
[[Qitmeerds]]  
  Name = "local"    
  RPCUser = "qitmeer"   
  RPCPassword = "qitmeer123"
  RPCServer = "127.0.0.1:18131"   //节点ip、端口 如:127.0.0.1:18131(本地节点rpclisten=0.0.0.0:18131 )
  RPCCert = ""
  NoTLS = false
  TLSSkipVerify = true
  Proxy = ""
  ProxyUser = ""
  ProxyPass = ""

# 可选节点 remote 对应的rpc配置
[[Qitmeerds]]   
  Name = "remote"
  RPCUser = "admin"
  RPCPassword = "admin123"
  RPCServer = "xxx.xxx.xxx.xxx:port"
  RPCCert = ""
  NoTLS = false
  TLSSkipVerify = true
  Proxy = ""
  ProxyUser = ""
  ProxyPass = ""

  • Use the ‘qitmeer wallet qc create’ command to create a wallet. It is recommended to enter the CMD page. There may be a permission problem in Git and it fails.(用 qitmeer-wallet qc create 命令创建钱包,建议进入cmd页面,git中可能存在权限问题而失败)
D:\git\qitmeer-wallet>qitmeer-wallet qc create
Enter the private passphrase for your new wallet:   // private key,即交易密码,比如123456
Confirm passphrase:    //确认密码

Do you want to add an additional layer of encryption for public data? (n/no/y/yes) [no]: y  //y表示给你的钱包数据设置双层加密密码;n表示默认,默认为public

Enter the public passphrase for your new wallet:    //输入一个密码
Confirm passphrase:  //确认密码

NOTE: Use the --walletpass option to configure your public passphrase.
pubPass: public   // public key,也就是登录钱包的密码;这是你输入的加密钱包数据的密码,会显示出来
Do you have an existing wallet seed you want to use? (n/no/y/yes) [no]: n   //有没有seed,n表示没有,可以先新创建钱包,之后再用自己的助记词导入钱包

Your wallet generation seed is:
49909fc0879fa6408cfaa651898e0c2b7f9cf0490479ec5aa3fa0b75a4650809  //新创建的钱包seed,要重新导入钱包的话不用记
IMPORTANT: Keep the seed in a safe place as you
will NOT be able to restore your wallet without it.
Please keep in mind that anyone who has access
to the seed can also restore your wallet thereby
giving them access to all your funds, so it is
imperative that you keep it in a secure location.
Once you have stored the seed in a safe and secure location, enter "OK" to continue: OK  //直接OK确认,不保存上边的seed,重新导入钱包

Creating the wallet...   //钱包创建中
pri:a539abecba5ab3bd2655b883e8c5ee4ff0cc15eddaba9f4ee7c3032ad6cc7f9f
The wallet has been created successfully.   
createWallet succ   //钱包创建完成

第三步:更新 db,同步钱包

update db (update to the specified block or update all,syncheight can view the current DB synchronization height)

D:\git\qitmeer-wallet>qitmeer-wallet qc updateblock
updateblock: error sendPostRequest: httpClient.Do err: Post https://47.74.143.132:1836: http: server gave HTTP response to HTTPS client

现以上报错,请将配置文件 config.toml 中的 QNoTLS=false 改为 QNoTLS=true ,然后再输入 qitmeer-wallet qc updateblock, 钱包将开始同步区块(If the above error appears, please change ‘QNoTLS = false’ to ‘QNoTLS = true’ in the config.toml, and then enter ‘qitmeer wallet qc updateblock’. The wallet will start to synchronize blocks出):

D:\git\qitmeer-wallet>qitmeer-wallet qc updateblock
   update blcok:5551/19449  //区块同步进度显示

第四步:导入钱包,给他人转账(Import your wallet and send money)

  • 利用助记词生成 seed(Generating seed with mnemonics)
$ qitmeer-wallet qx mnemonictoseed "mnemonics"    //引号里填写上你的助记词,生成seed
  • 利用 seed 生成私钥(Generating private key by seed)
$ qitmeer-wallet qx seedtopri "seed"   // 引号里把刚生成的seed复制过来,seed生成私钥   
  • 利用私钥导入钱包(Import wallet with private key)
qitmeer-wallet qc importprivkey {pri-key} “pri-password”   //用刚生成的私钥导入钱包 ,密码是第二步创建钱包时输入的私人密码123456

output 输出显示:

`ImportPrivKey: OK`

第五步:给他人地址转账(send money to other address)

  • 先同步钱包(Synchronize first)
$ qitmeer-wallet qc updateblock
  • 查询地址余额(get balance)
$ qitmeer-wallet qc getbalance TmmyDepcTnyEsBqGFvK4tjVGUPmeEwyhapB

0 MEER  //这是查询结果
  • 给他人地址转账(send money to other address)
qitmeer-wallet sendtoaddress TmbsdsjwzuGboFQ9GcKg6EUmrr3tokzozyF 数量  私人密码

如果转账成功,会输出如下显示:

[INFO] SendRawTransaction txSign response msg msg="\"0af1bdee4c126acaead11f6f57afea7c1d7b9f959631995e30c43e0fb98d73cd\""

010000000202fe1c6c7b3c97ed7288385f70b24e27dc5d6c3a42a8e4837400a3963b68282a00
000000ffffffff03ae71858941bb98d20fe4bb84dbe3d0ebda43822ef97a6a03f38687396707
8100000000ffffffff0200c817a8040000001976a9144fe5ad60f3823122be0383d2c48f8419
b05c00f588ac80f8d663010000001976a9143d10ba0e5a0ecf10205da56e2e6287d95041e8ec
88ac0000000000000000026a47304402206185a573e2de73eba8b80b4c1df094dc7d7bd4ddbe
8cdf2feb9908847ed48da002203e61fc443d7e0ac94bc4c3ad066152c85e99d2c25720f7499a
1e8c5a459615bd012103b8e947dae908101fa20abd3e68211e26b09fb3b32a588cf98637fc2e
207e624f6b483045022100aa9a723bcda8f73214e23fc7f32e2cbac3b66893f9fb9155393de9
f1c21920830220155e886892ec54ea0206859e0b0196b659a83d314c499b52c1fa88125f2d28
3a012103b8e947dae908101fa20abd3e68211e26b09fb3b32a588cf98637fc2e207e624f

====================
以上是命令行交互式钱包使用方式,下边给出web界面钱包使用方式

六、使用 web 钱包(Using web model)

  • 使用命令 qitmeer-wallet web 打开web钱包界面

    $ qitmeer-wallet  web
    web model 
    //如此便打开了web钱包界面
    

    其余的根据页面提示就可以操作

我怎么样能 获取少量币做测试用呢?

  • 交易所购买
  • 用矿机挖
  • 找他人赠送(购买)