Documentation ¶
Index ¶
- type Application
- func (app *Application) AccountByKey(rw http.ResponseWriter, r *http.Request)
- func (app *Application) AddQueryRoutes(r *mux.Router)
- func (app *Application) AppendTx(tx []byte) tmsp.Result
- func (app *Application) BeginBlock(height uint64)
- func (app *Application) CheckTx(tx []byte) tmsp.Result
- func (app *Application) Commit() tmsp.Result
- func (app *Application) EndBlock(height uint64) (diffs []*tmsp.Validator)
- func (app *Application) Info() string
- func (app *Application) InitChain(validators []*tmsp.Validator)
- func (app *Application) PostByKey(rw http.ResponseWriter, r *http.Request)
- func (app *Application) PostsForAccount(rw http.ResponseWriter, r *http.Request)
- func (app *Application) Query(query []byte) tmsp.Result
- func (app *Application) SearchAccounts(rw http.ResponseWriter, r *http.Request)
- func (app *Application) SetOption(key, value string) string
- type Proxy
- func (p Proxy) AddChainRoutes(r *mux.Router)
- func (p Proxy) GetBlock(rw http.ResponseWriter, r *http.Request)
- func (p Proxy) GetChain(rw http.ResponseWriter, r *http.Request)
- func (p Proxy) GetStatus(rw http.ResponseWriter, r *http.Request)
- func (p Proxy) GetValidators(rw http.ResponseWriter, r *http.Request)
- func (p Proxy) PostTransaction(rw http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application is the TMSP application for modifying state
func (*Application) AccountByKey ¶
func (app *Application) AccountByKey(rw http.ResponseWriter, r *http.Request)
func (*Application) AddQueryRoutes ¶
func (app *Application) AddQueryRoutes(r *mux.Router)
AddQueryRoutes add all routes for reading the app state (unsigned)
func (*Application) AppendTx ¶
func (app *Application) AppendTx(tx []byte) tmsp.Result
AppendTx actually does something
func (*Application) BeginBlock ¶
func (app *Application) BeginBlock(height uint64)
BeginBlock signals the beginning of a block, update service so we tag posts properly
func (*Application) CheckTx ¶
func (app *Application) CheckTx(tx []byte) tmsp.Result
CheckTx validates a tx for the mempool
func (*Application) Commit ¶
func (app *Application) Commit() tmsp.Result
Commit returns the application Merkle root hash
func (*Application) EndBlock ¶
func (app *Application) EndBlock(height uint64) (diffs []*tmsp.Validator)
EndBlock signals the end of a block, ignored now diffs: changed validators from app to TendermintCore
func (*Application) InitChain ¶
func (app *Application) InitChain(validators []*tmsp.Validator)
InitChain make it blockchain aware (but we ignore all but BeginBlock)
func (*Application) PostByKey ¶
func (app *Application) PostByKey(rw http.ResponseWriter, r *http.Request)
func (*Application) PostsForAccount ¶
func (app *Application) PostsForAccount(rw http.ResponseWriter, r *http.Request)
func (*Application) Query ¶
func (app *Application) Query(query []byte) tmsp.Result
Query returns contents behind given key
func (*Application) SearchAccounts ¶
func (app *Application) SearchAccounts(rw http.ResponseWriter, r *http.Request)
func (*Application) SetOption ¶
func (app *Application) SetOption(key, value string) string
SetOption is ignored for now
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy validates queries and sends appropriate ones to the tendermint core
func (Proxy) AddChainRoutes ¶
AddChainRoutes adds a routes for tendermint core interactions to the router
func (Proxy) GetBlock ¶
func (p Proxy) GetBlock(rw http.ResponseWriter, r *http.Request)
GetBlock validates the parameters and gets one block from tendermint core
func (Proxy) GetChain ¶
func (p Proxy) GetChain(rw http.ResponseWriter, r *http.Request)
GetChain returns a list of block headers between minHeight and maxHeight. Here, we require both and don't allow a query for more than 50 blocks at once
func (Proxy) GetStatus ¶
func (p Proxy) GetStatus(rw http.ResponseWriter, r *http.Request)
GetStatus returns the status of the tendermint core
func (Proxy) GetValidators ¶
func (p Proxy) GetValidators(rw http.ResponseWriter, r *http.Request)
GetValidators returns the current validator set
func (Proxy) PostTransaction ¶
func (p Proxy) PostTransaction(rw http.ResponseWriter, r *http.Request)
PostTransaction validates the posted transaction and submits it to the tendermint consensus engine Format: {"tx": "deadbeef"} - hex encoded transaction as tx key in a json blob