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.

29 lines
1.7 KiB

10 years ago
  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. "status": rpc.NewRPCFunc(Status, []string{}),
  8. "net_info": rpc.NewRPCFunc(NetInfo, []string{}),
  9. "blockchain": rpc.NewRPCFunc(BlockchainInfo, []string{"minHeight", "maxHeight"}),
  10. "genesis": rpc.NewRPCFunc(Genesis, []string{}),
  11. "get_block": rpc.NewRPCFunc(GetBlock, []string{"height"}),
  12. "get_account": rpc.NewRPCFunc(GetAccount, []string{"address"}),
  13. "get_storage": rpc.NewRPCFunc(GetStorage, []string{"address", "key"}),
  14. "call": rpc.NewRPCFunc(Call, []string{"fromAddress", "toAddress", "data"}),
  15. "call_code": rpc.NewRPCFunc(CallCode, []string{"fromAddress", "code", "data"}),
  16. "list_validators": rpc.NewRPCFunc(ListValidators, []string{}),
  17. "dump_consensus_state": rpc.NewRPCFunc(DumpConsensusState, []string{}),
  18. "dump_storage": rpc.NewRPCFunc(DumpStorage, []string{"address"}),
  19. "broadcast_tx": rpc.NewRPCFunc(BroadcastTx, []string{"tx"}),
  20. "list_unconfirmed_txs": rpc.NewRPCFunc(ListUnconfirmedTxs, []string{}),
  21. "list_accounts": rpc.NewRPCFunc(ListAccounts, []string{}),
  22. "get_name": rpc.NewRPCFunc(GetName, []string{"name"}),
  23. "list_names": rpc.NewRPCFunc(ListNames, []string{}),
  24. "unsafe/gen_priv_account": rpc.NewRPCFunc(GenPrivAccount, []string{}),
  25. "unsafe/sign_tx": rpc.NewRPCFunc(SignTx, []string{"tx", "privAccounts"}),
  26. // subscribe/unsubscribe are reserved for websocket events.
  27. }