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.

80 lines
1.4 KiB

  1. package core
  2. import (
  3. "github.com/tendermint/tendermint/account"
  4. sm "github.com/tendermint/tendermint/state"
  5. "github.com/tendermint/tendermint/types"
  6. )
  7. type ResponseGenPrivAccount struct {
  8. PrivAccount *account.PrivAccount
  9. }
  10. type ResponseGetAccount struct {
  11. Account *account.Account
  12. }
  13. type ResponseGetStorage struct {
  14. Key []byte
  15. Value []byte
  16. }
  17. type ResponseCall struct {
  18. Return []byte
  19. GasUsed uint64
  20. // TODO ...
  21. }
  22. type ResponseListAccounts struct {
  23. BlockHeight uint
  24. Accounts []*account.Account
  25. }
  26. type StorageItem struct {
  27. Key []byte
  28. Value []byte
  29. }
  30. type ResponseDumpStorage struct {
  31. StorageRoot []byte
  32. StorageItems []StorageItem
  33. }
  34. type ResponseBlockchainInfo struct {
  35. LastHeight uint
  36. BlockMetas []*types.BlockMeta
  37. }
  38. type ResponseGetBlock struct {
  39. BlockMeta *types.BlockMeta
  40. Block *types.Block
  41. }
  42. // curl -H 'content-type: text/plain;' http://127.0.0.1:8888/submit_tx?tx=...
  43. type ResponseBroadcastTx struct {
  44. Receipt Receipt
  45. }
  46. type ResponseStatus struct {
  47. GenesisHash []byte
  48. Network string
  49. LatestBlockHash []byte
  50. LatestBlockHeight uint
  51. LatestBlockTime int64 // nano
  52. }
  53. type ResponseNetInfo struct {
  54. NumPeers int
  55. Listening bool
  56. Network string
  57. }
  58. type ResponseSignTx struct {
  59. Tx types.Tx
  60. }
  61. type ResponseListValidators struct {
  62. BlockHeight uint
  63. BondedValidators []*sm.Validator
  64. UnbondingValidators []*sm.Validator
  65. }