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