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.

59 lines
1.3 KiB

  1. package http
  2. // The types in this file define the JSON encoding for RPC method parameters
  3. // from the client to the server.
  4. import (
  5. "github.com/tendermint/tendermint/libs/bytes"
  6. )
  7. type abciQueryArgs struct {
  8. Path string `json:"path"`
  9. Data bytes.HexBytes `json:"data"`
  10. Height int64 `json:"height,string"`
  11. Prove bool `json:"prove"`
  12. }
  13. type txArgs struct {
  14. Tx []byte `json:"tx"`
  15. }
  16. type txKeyArgs struct {
  17. TxKey []byte `json:"tx_key"`
  18. }
  19. type unconfirmedArgs struct {
  20. Limit *int `json:"limit,string,omitempty"`
  21. }
  22. type heightArgs struct {
  23. Height *int64 `json:"height,string,omitempty"`
  24. }
  25. type hashArgs struct {
  26. Hash bytes.HexBytes `json:"hash"`
  27. Prove bool `json:"prove,omitempty"`
  28. }
  29. type blockchainInfoArgs struct {
  30. MinHeight int64 `json:"minHeight,string"`
  31. MaxHeight int64 `json:"maxHeight,string"`
  32. }
  33. type genesisChunkArgs struct {
  34. Chunk uint `json:"chunk,string"`
  35. }
  36. type searchArgs struct {
  37. Query string `json:"query"`
  38. Prove bool `json:"prove,omitempty"`
  39. OrderBy string `json:"order_by,omitempty"`
  40. Page *int `json:"page,string,omitempty"`
  41. PerPage *int `json:"per_page,string,omitempty"`
  42. }
  43. type validatorArgs struct {
  44. Height *int64 `json:"height,string,omitempty"`
  45. Page *int `json:"page,string,omitempty"`
  46. PerPage *int `json:"per_page,string,omitempty"`
  47. }