2017-05-12 13:15:20 -07:00
|
|
|
# Basic run through of using basecli....
|
|
|
|
|
|
|
|
To keep things clear, let's have two shells...
|
|
|
|
|
|
|
|
`$` is for basecoin (server), `%` is for basecli (client)
|
|
|
|
|
|
|
|
## Set up your basecli with a new key
|
|
|
|
|
|
|
|
```
|
|
|
|
% export BCHOME=~/.democli
|
|
|
|
% basecli keys new demo
|
|
|
|
% basecli keys get demo -o json
|
|
|
|
```
|
|
|
|
|
|
|
|
And set up a few more keys for fun...
|
|
|
|
|
|
|
|
```
|
|
|
|
% basecli keys new buddy
|
|
|
|
% basecli keys list
|
2017-06-20 21:38:54 -07:00
|
|
|
% ME=$(basecli keys get demo | awk '{print $2}')
|
|
|
|
% YOU=$(basecli keys get buddy | awk '{print $2}')
|
2017-05-12 13:15:20 -07:00
|
|
|
```
|
|
|
|
|
2017-06-20 21:38:54 -07:00
|
|
|
## Set up a clean basecoin, initialized with your account
|
2017-05-12 13:15:20 -07:00
|
|
|
|
|
|
|
```
|
2017-06-20 21:38:54 -07:00
|
|
|
$ export BCHOME=~/.demoserve
|
|
|
|
$ basecoin init $ME
|
2017-05-12 13:15:20 -07:00
|
|
|
$ basecoin start
|
|
|
|
```
|
|
|
|
|
|
|
|
## Connect your basecli the first time
|
|
|
|
|
|
|
|
```
|
2017-06-15 11:29:26 -07:00
|
|
|
% basecli init --chain-id test_chain_id --node tcp://localhost:46657
|
2017-05-12 13:15:20 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
## Check your balances...
|
|
|
|
|
|
|
|
```
|
2017-06-20 21:38:54 -07:00
|
|
|
% basecli query account $ME
|
|
|
|
% basecli query account $YOU
|
2017-05-12 13:15:20 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
## Send the money
|
|
|
|
|
|
|
|
```
|
|
|
|
% basecli tx send --name demo --amount 1000mycoin --sequence 1 --to $YOU
|
|
|
|
-> copy hash to HASH
|
2017-06-20 21:38:54 -07:00
|
|
|
% basecli query tx $HASH
|
|
|
|
% basecli query account $YOU
|
2017-05-12 13:15:20 -07:00
|
|
|
```
|
|
|
|
|