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.

26 lines
1.2 KiB

  1. package core
  2. import (
  3. "github.com/tendermint/tendermint/rpc"
  4. )
  5. /*
  6. TODO: support Call && GetStorage.
  7. */
  8. var Routes = map[string]*rpc.RPCFunc{
  9. "status": rpc.NewRPCFunc(Status, []string{}),
  10. "net_info": rpc.NewRPCFunc(NetInfo, []string{}),
  11. "blockchain": rpc.NewRPCFunc(BlockchainInfo, []string{"minHeight", "maxHeight"}),
  12. "get_block": rpc.NewRPCFunc(GetBlock, []string{"height"}),
  13. "get_account": rpc.NewRPCFunc(GetAccount, []string{"address"}),
  14. "get_storage": rpc.NewRPCFunc(GetStorage, []string{"address", "key"}),
  15. "call": rpc.NewRPCFunc(Call, []string{"address", "data"}),
  16. "call_code": rpc.NewRPCFunc(CallCode, []string{"code", "data"}),
  17. "list_validators": rpc.NewRPCFunc(ListValidators, []string{}),
  18. "dump_storage": rpc.NewRPCFunc(DumpStorage, []string{"address"}),
  19. "broadcast_tx": rpc.NewRPCFunc(BroadcastTx, []string{"tx"}),
  20. "list_accounts": rpc.NewRPCFunc(ListAccounts, []string{}),
  21. "unsafe/gen_priv_account": rpc.NewRPCFunc(GenPrivAccount, []string{}),
  22. "unsafe/sign_tx": rpc.NewRPCFunc(SignTx, []string{"tx", "privAccounts"}),
  23. }