Home | 简体中文 | 繁体中文 | 杂文 | 知乎专栏 | Github | OSChina 博客 | 云社区 | 云栖社区 | Facebook | Linkedin | 视频教程 | 打赏(Donations) | About
知乎专栏多维度架构微信号 netkiller-ebook | QQ群:128659835 请注明“读者”

5.2. 账号

5.2.1. 创建公钥和私钥

				
$ cleos create key				
				
			
				
[root@netkiller etc]# cleos create key
Private key: 5JXxZEQZNjyxNKSGHcdiAwE4uALykxwvgtAyLRxEygQJP9eULkH
Public key: EOS69EZcBVwgRz3AbHheR3ZpeHtaoHAPyLXfvmsiqYMAtazN3WdiL				
				
			

5.2.2. 导入私钥

				
$ cleos wallet import 5K8apwojp2U4mcv1xAAjP541QFUEhkRWxskYbL3ZzCq1VoBwuSX			
				
			

5.2.3. 查看私钥

				
$ cleos wallet private_keys --password ${your_wallet_password}				
				
			

5.2.4. 创建账号

创建秘钥对

				
[root@netkiller ~]# cleos create key
Private key: 5JFMTVk4EjWW54xk73AMRPf5JbpFV2Cm7vtgt1jr9zVaPgLmaLQ
Public key: EOS7fcRYssRt5SXVnsPpRNzj86E9h5g62hBgKwr1NSzRmSpH9byZr
				
			

导入私钥

				
[root@netkiller ~]# cleos wallet import 5JFMTVk4EjWW54xk73AMRPf5JbpFV2Cm7vtgt1jr9zVaPgLmaLQ
imported private key for: EOS7fcRYssRt5SXVnsPpRNzj86E9h5g62hBgKwr1NSzRmSpH9byZr		
	
[root@netkiller ~]# cleos wallet keys
[
  "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
  "EOS7fcRYssRt5SXVnsPpRNzj86E9h5g62hBgKwr1NSzRmSpH9byZr"
]	
				
			

创建账号 neo

				
[root@netkiller ~]# cleos wallet unlock				
[root@netkiller ~]# cleos create account eosio neo EOS7fcRYssRt5SXVnsPpRNzj86E9h5g62hBgKwr1NSzRmSpH9byZr EOS7fcRYssRt5SXVnsPpRNzj86E9h5g62hBgKwr1NSzRmSpH9byZr
executed transaction: e138b1e7557d76b3560b898942db942eb23b43f8387c60083741ab4d0680e139  200 bytes  311 us
#         eosio <= eosio::newaccount            {"creator":"eosio","name":"neo","owner":{"threshold":1,"keys":[{"key":"EOS7fcRYssRt5SXVnsPpRNzj86E9h...
warning: transaction executed locally, but may not be confirmed by the network yet