2015-04-07 11:44:25 -07:00
|
|
|
package core
|
|
|
|
|
|
|
|
import (
|
2015-05-16 14:41:36 -07:00
|
|
|
rpc "github.com/tendermint/tendermint/rpc/server"
|
2015-04-07 11:44:25 -07:00
|
|
|
)
|
|
|
|
|
2015-07-22 18:43:20 -04:00
|
|
|
// TODO: eliminate redundancy between here and reading code from core/
|
2015-04-07 11:44:25 -07:00
|
|
|
var Routes = map[string]*rpc.RPCFunc{
|
2016-01-02 16:23:29 -08:00
|
|
|
"subscribe": rpc.NewWSRPCFunc(Subscribe, []string{"event"}),
|
|
|
|
"unsubscribe": rpc.NewWSRPCFunc(Unsubscribe, []string{"event"}),
|
2015-11-01 11:34:08 -08:00
|
|
|
"status": rpc.NewRPCFunc(Status, []string{}),
|
|
|
|
"net_info": rpc.NewRPCFunc(NetInfo, []string{}),
|
|
|
|
"blockchain": rpc.NewRPCFunc(BlockchainInfo, []string{"minHeight", "maxHeight"}),
|
|
|
|
"genesis": rpc.NewRPCFunc(Genesis, []string{}),
|
|
|
|
"get_block": rpc.NewRPCFunc(GetBlock, []string{"height"}),
|
|
|
|
"list_validators": rpc.NewRPCFunc(ListValidators, []string{}),
|
|
|
|
"dump_consensus_state": rpc.NewRPCFunc(DumpConsensusState, []string{}),
|
|
|
|
"broadcast_tx": rpc.NewRPCFunc(BroadcastTx, []string{"tx"}),
|
|
|
|
"list_unconfirmed_txs": rpc.NewRPCFunc(ListUnconfirmedTxs, []string{}),
|
2015-07-23 17:06:38 -07:00
|
|
|
// subscribe/unsubscribe are reserved for websocket events.
|
2015-04-07 11:44:25 -07:00
|
|
|
}
|