Commit Graph

852 Commits

Author SHA1 Message Date
Ethan Frey 0b9be1069f Cleanup some todos 2017-08-03 17:37:15 +02:00
Ethan Frey cdaee322bc Merge pull request #197 from orijtech/baseserver-repackaging
client/rest, modules/coin/rest: moved code around
2017-08-03 14:05:23 +02:00
Emmanuel Odeke 1a45755027 client/rest, modules/coin/rest: moved code around
After offline emails and a video call with @ethanfrey,
a goal was decided to move things around i.e:
- [X] Move /build/send and /query/account to modules/coin/rest

Due to that move, there is a lot of overlap between needed
code and utils so extracted common code to make
https://github.com/tendermint/tmlibs/pull/33
so make sure to pull in that commit into your tmlibs tree.

After code review feedback:
client/rest, modules/coin/rest: FoutputProof, PrepareSendTx helper

* Extract OutputProof to FoutputProof helper that can
be used in modules/coin/rest/handlers.go as proofs.FoutputProof
* Revert r.HandleFunc("/tx", doPostTx).Methods("POST") which
was erraneously deleted
* Use function signatures from "tendermint/tmblibs/common"
2017-08-02 12:57:29 -06:00
Ethan Frey 67f25f54ed Merge pull request #199 from tendermint/rm-gobasics
rm docs/go_basics.md, moved to /coding repo
2017-08-02 14:28:34 +02:00
Zach Ramsay 4ab913bc81 rm docs/go_basics.md, moved to /coding repo 2017-08-02 14:13:11 +02:00
Zach a91f75bcde Merge pull request #195 from tendermint/zramsay-patch-1
update readme, fixes #189
2017-08-01 15:11:04 -04:00
Zach 34e6789d0c update readme, fixes #189 2017-07-29 22:56:54 -04:00
Ethan Frey 0a7b8a3e96 Merge pull request #188 from tendermint/feature/blind-trust
Add a flag to skip all query proofs
2017-07-29 17:48:32 -04:00
Ethan Frey 75181a78c3 Hide trust flag 2017-07-29 17:41:13 -04:00
Ethan Frey 4652779a3d Fix up flag handling 2017-07-29 17:23:21 -04:00
Ethan Frey 8dd2371cc5 Don't require init when --trust-node is given 2017-07-29 17:23:21 -04:00
Ethan Frey b98bfc01ae Add --trust-node flag to cli to skip proofs on queries 2017-07-29 17:23:21 -04:00
Ethan Frey f0e2227ada Use password as key, allow 3 letter names 2017-07-29 17:16:24 -04:00
Ethan Frey 14bb65457c Add cli tests for rest 2017-07-29 17:11:23 -04:00
Ethan Frey b08b63089b Merge pull request #190 from orijtech/rest-server
client/rest, cmd/baseserver: started a basecoin REST client
2017-07-29 16:25:58 -04:00
Emmanuel Odeke 7c28374c38 Merge branch 'rest-server-query' into rest-server 2017-07-29 13:25:29 -06:00
Emmanuel Odeke c0743af51c
client/rest: implement /query/account/{signature}
Allows us to query account balance from the blockchain
for example:
/query/account/sigs:BDADF167E6CF2CDF2D621E590FF1FED2787A40E0
2017-07-29 13:20:51 -06:00
Emmanuel Odeke f8c302ae45 Merge branch 'tendermint-rest-server-comments' into rest-server 2017-07-29 12:05:59 -06:00
Ethan Frey de82c03804 Fixed up business logic in build/send 2017-07-29 09:28:45 -04:00
Emmanuel Odeke d4ab79ece0
client/rest, cmd/baseserver: started a basecoin REST client
```shell
$ go get -u -v github.com/tendermint/basecoin/cmd/baseserver
$ baseserver init
$ baseserver serve
```
A server that can be ran by default on port 8998
otherwise one can specify the port using flag `--port` like this:
```shell
$ baseserver serve --port 9999
```
to serve it on port 9999, accessible at http://localhost:9999

Implemented:
- [X] /keys POST -- generate a new key
- [X] /keys GET  -- list all keys
- [X] /keys/{name}  DELETE-- delete a named key
- [X] /keys/{name}  GET -- get a named key
- [X] /keys/{name}  POST, PUT -- update a named key
- [X] /sign POST -- sign a transaction
- [X] /build/send POST -- send money from one actor to another. However,
  still needs testing and verification of output
- [X] /tx POST -- post a transaction to the blockchain. However, still
  needs testing and verification of output

This base code to get the handlers starters was adapted from:
* https://github.com/tendermint/go-crypto/blob/master/keys/server
* https://github.com/tendermint/basecoin/blob/unstable/client/commands/proxy/root.go

Updates #186
2017-07-29 04:12:24 -06:00
Ethan Frey eae1883f3d Add sign and post helper functions 2017-07-28 10:35:39 -04:00
Ethan Frey 4245bb8a67 Merge branch 'feature/186-http-api' into unstable 2017-07-27 22:21:45 -04:00
Ethan Frey 9037b3508a Clean up spec to focus on mvp with moving coins 2017-07-27 22:21:00 -04:00
Ethan Frey 549993246e First draft of API from our discussion 2017-07-27 22:20:59 -04:00
Ethan Frey 79435666ce Merge pull request #171 from tendermint/feature/38-ibc-with-light-client
Rewrite IBC to use light client verification
2017-07-27 22:20:25 -04:00
Ethan Frey 450823b5f3 Bump to 0.6.2 2017-07-27 22:11:17 -04:00
Ethan Frey bd14f0bfb9 Fix up imports after megre 2017-07-27 16:49:22 -04:00
Ethan Frey 6632d88b3d IBC post packet test passes 2017-07-27 16:41:37 -04:00
Ethan Frey f32e6c9b7d Updated light-client 2017-07-27 16:41:36 -04:00
Ethan Frey e90d6db516 Update seed to a given height 2017-07-27 16:41:13 -04:00
Ethan Frey d0920ac1cf Add post packet to cli and test... bug 2017-07-27 16:41:13 -04:00
Ethan Frey b7abee64f0 Test creating packet and query via cli 2017-07-27 16:41:12 -04:00
Ethan Frey 95b16b3830 Code cleanup from emmanuels comment 2017-07-27 16:41:12 -04:00
Ethan Frey 9640547c01 Expose credit tx to cli and test 2017-07-27 16:41:12 -04:00
Ethan Frey 3027eeb3c3 Add CreditTx and tests 2017-07-27 16:41:12 -04:00
Ethan Frey 6135345af8 Add issuer position to grant credit 2017-07-27 16:36:47 -04:00
Ethan Frey 89a8c0bf08 Remvoed old ibc code 2017-07-27 16:36:47 -04:00
Ethan Frey b7f31ad70a Test sendtx with foreign addr creates proper ibc packet 2017-07-27 16:36:15 -04:00
Ethan Frey aad5a0f3a0 Test query ibc status and fix bugs 2017-07-27 16:30:20 -04:00
Ethan Frey fd10387eb5 Tested register and update ibc via cli 2017-07-27 16:30:20 -04:00
Ethan Frey de537c34ac Add cli support for register/update ibc 2017-07-27 16:27:06 -04:00
Ethan Frey 746ae28eaa Add ibc query commands 2017-07-27 16:27:06 -04:00
Ethan Frey 374f078b79 IBC test just rawtx, coin ibc in that module 2017-07-27 16:27:06 -04:00
Ethan Frey a925c8545c Refactored ibc test packet gen 2017-07-27 16:27:06 -04:00
Ethan Frey 0c5f0bdf77 Test outgoing ibc packets add to the chain credit properly 2017-07-27 16:27:06 -04:00
Ethan Frey 555e0d8ec8 test receiving and verifying incoming ibc packets 2017-07-27 16:26:00 -04:00
Ethan Frey 06492fa212 testing ibc post packet 2017-07-27 16:25:05 -04:00
Ethan Frey 9b099a2f36 Fix up ibc to work with new cli reorg 2017-07-27 16:25:05 -04:00
Ethan Frey 8659c4db68 Cleanup ibc handler per bucky 2017-07-27 16:25:05 -04:00
Ethan Frey 272a65a2c7 Add tests for creating packets 2017-07-27 16:25:05 -04:00