You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
1.0 KiB

  1. package core
  2. import (
  3. rpc "github.com/tendermint/tendermint/rpc/server"
  4. )
  5. // TODO: eliminate redundancy between here and reading code from core/
  6. var Routes = map[string]*rpc.RPCFunc{
  7. "subscribe": rpc.NewWSRPCFunc(Subscribe, []string{"event"}),
  8. "unsubscribe": rpc.NewWSRPCFunc(Unsubscribe, []string{"event"}),
  9. "status": rpc.NewRPCFunc(Status, []string{}),
  10. "net_info": rpc.NewRPCFunc(NetInfo, []string{}),
  11. "blockchain": rpc.NewRPCFunc(BlockchainInfo, []string{"minHeight", "maxHeight"}),
  12. "genesis": rpc.NewRPCFunc(Genesis, []string{}),
  13. "get_block": rpc.NewRPCFunc(GetBlock, []string{"height"}),
  14. "list_validators": rpc.NewRPCFunc(ListValidators, []string{}),
  15. "dump_consensus_state": rpc.NewRPCFunc(DumpConsensusState, []string{}),
  16. "broadcast_tx": rpc.NewRPCFunc(BroadcastTx, []string{"tx"}),
  17. "list_unconfirmed_txs": rpc.NewRPCFunc(ListUnconfirmedTxs, []string{}),
  18. // subscribe/unsubscribe are reserved for websocket events.
  19. }