If you wanna be an NEO developer, you need your NEO public key to apply testNet NEO&GAS, and it's kind of tricky to get your own public key. You cannot get it from a Neon Wallet, you need to use Neo CLI(command line interface). Today I'm here to show you how to create a new wallet and get your public key using NEO-CLI in Linux Ubuntu 16.04.
這陣子想要試試看在NEO上面的應用開發,所以要申請一下TestNet上面的NEO還有GAS。殊不知申請的步驟裡要輸入Public Key,而不是Public Address,搞的我一個頭兩個大。好不容易搞懂要用NEO的CLI(command line interface)才能看到自己的公鑰,只好親手來試試囉
It's actually very easy, all you have to do is download neo-cli, compile it and run some simple commands.
其實CLI真的沒有想像中可怕,但是看到黑底白字就會覺得好像要很專業才有辦法使用。其實整個過程也就只是安裝些套件,然後下點簡單指令罷了。所以我就紀錄一下在Ubuntu 16.04環境下如何創立新的錢包,並且讀取自己的Public Key吧!
sudo apt-get install libleveldb-dev sqlite3 libsqlite3-dev libunwind8-dev
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
Then, update the package cache and install .NET Core
sudo apt-get update
sudo apt-get install dotnet-sdk-2.0.0
https://github.com/neo-project/neo-cli/releases
dotnet neo-cli.dll
You should be able to run NEO CLI!
help and find some instructions about the commands(And more detail here)
create wallet [path under neo-cli/].Remeber that the filename should be ended with .json or .db3
open wallet: [your wallet path]