Skip to content

Commit

Permalink
Open up API and add instructions for get wallet balance
Browse files Browse the repository at this point in the history
Signed-off-by: Yilun <zyl.skysniper@gmail.com>
  • Loading branch information
yilunzhang committed Sep 2, 2018
1 parent bfe98fd commit 7926840
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,27 @@ $ ./nknd
If you are using Docker then you should run the following command instead:

```shell
$ docker run -p 30000-30003:30000-30003 -v $PWD:/nkn -it nkn nknd
$ docker run -p 30000-30003:30000-30003 -v $PWD:/nkn --name nkn -it nkn nknd
```

If everything goes well, you should be part of our TestNet now! You can query
your wallet balance (which includes the Testnet token you've mined) by:

```shell
$ ./nknc wallet -l balance
```

or if you are using Docker:

```shell
$ docker exec -it nkn nknc wallet -l balance
```

If everything goes well, you should be part of our TestNet now!
**Note that Testnet token is for testing purpose only, and may be cleared at any
time when Testnet resets.**

If not, you may want to check if some of the previous steps went wrong. If the
problem still persists, [create an
If anything goes wrong, you may want to check if any of the previous steps went
wrong. If the problem still persists, [create an
issue](https://github.com/nknorg/nkn/issues/new) or ask us in our [Discord
group](#community).

Expand Down
2 changes: 1 addition & 1 deletion api/common/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -1031,8 +1031,8 @@ var InitialAPIHandlers = map[string]APIHandler{
"getnodestate": {Handler: getNodeState, AccessCtrl: BIT_JSONRPC},
"getchordringinfo": {Handler: getChordRingInfo, AccessCtrl: BIT_JSONRPC},
"getunspendoutput": {Handler: getUnspendOutput, AccessCtrl: BIT_JSONRPC},
"getbalance": {Handler: getBalance, AccessCtrl: BIT_JSONRPC},
"setdebuginfo": {Handler: setDebugInfo},
"getbalance": {Handler: getBalance},
"registasset": {Handler: registAsset},
"issueasset": {Handler: issueAsset},
"sendtoaddress": {Handler: sendToAddress},
Expand Down

0 comments on commit 7926840

Please sign in to comment.