cosmos-sdk/client/rest
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
..
README.md client/rest, cmd/baseserver: started a basecoin REST client 2017-07-29 04:12:24 -06:00
cmd.go client/rest, modules/coin/rest: moved code around 2017-08-02 12:57:29 -06:00
handlers.go client/rest, modules/coin/rest: moved code around 2017-08-02 12:57:29 -06:00
helpers.go Add sign and post helper functions 2017-07-28 10:35:39 -04:00
proxy.go client/rest, cmd/baseserver: started a basecoin REST client 2017-07-29 04:12:24 -06:00
types.go client/rest, modules/coin/rest: moved code around 2017-08-02 12:57:29 -06:00

README.md

basecoin-server

Proxy server

This package exposes access to key management i.e

  • creating
  • listing
  • updating
  • deleting

The HTTP handlers can be embedded in a larger server that does things like signing transactions and posting them to a Tendermint chain (which requires domain-knowledge of the transaction types and is out of scope of this generic app).

Key Management

We expose a couple of methods for safely managing your keychain. If you are embedding this in a larger server, you will typically want to mount all these paths /keys.

HTTP Method Route Description
POST / Requires a name and passphrase to create a brand new key
GET / Retrieves the list of all available key names, along with their public key and address
GET /{name} Updates the passphrase for the given key. It requires you to correctly provide the current passphrase, as well as a new one.
DELETE /{name} Permanently delete this private key. It requires you to correctly provide the current passphrase.