operators_response.json 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "title": "OperatorsResponse",
  4. "type": "object",
  5. "required": [
  6. "operators"
  7. ],
  8. "properties": {
  9. "operators": {
  10. "type": "array",
  11. "items": {
  12. "$ref": "#/definitions/Approval"
  13. }
  14. }
  15. },
  16. "definitions": {
  17. "Approval": {
  18. "type": "object",
  19. "required": [
  20. "expires",
  21. "spender"
  22. ],
  23. "properties": {
  24. "expires": {
  25. "description": "When the Approval expires (maybe Expiration::never)",
  26. "allOf": [
  27. {
  28. "$ref": "#/definitions/Expiration"
  29. }
  30. ]
  31. },
  32. "spender": {
  33. "description": "Account that can transfer/send the token",
  34. "type": "string"
  35. }
  36. }
  37. },
  38. "Expiration": {
  39. "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)",
  40. "oneOf": [
  41. {
  42. "description": "AtHeight will expire when `env.block.height` >= height",
  43. "type": "object",
  44. "required": [
  45. "at_height"
  46. ],
  47. "properties": {
  48. "at_height": {
  49. "type": "integer",
  50. "format": "uint64",
  51. "minimum": 0.0
  52. }
  53. },
  54. "additionalProperties": false
  55. },
  56. {
  57. "description": "AtTime will expire when `env.block.time` >= time",
  58. "type": "object",
  59. "required": [
  60. "at_time"
  61. ],
  62. "properties": {
  63. "at_time": {
  64. "$ref": "#/definitions/Timestamp"
  65. }
  66. },
  67. "additionalProperties": false
  68. },
  69. {
  70. "description": "Never will never expire. Used to express the empty variant",
  71. "type": "object",
  72. "required": [
  73. "never"
  74. ],
  75. "properties": {
  76. "never": {
  77. "type": "object"
  78. }
  79. },
  80. "additionalProperties": false
  81. }
  82. ]
  83. },
  84. "Timestamp": {
  85. "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```",
  86. "allOf": [
  87. {
  88. "$ref": "#/definitions/Uint64"
  89. }
  90. ]
  91. },
  92. "Uint64": {
  93. "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```",
  94. "type": "string"
  95. }
  96. }
  97. }