Skip to content

Commit

Permalink
updated schema
Browse files Browse the repository at this point in the history
  • Loading branch information
reuvenpo committed May 22, 2021
1 parent 22f066f commit 0221292
Show file tree
Hide file tree
Showing 3 changed files with 260 additions and 7 deletions.
42 changes: 42 additions & 0 deletions schema/handle_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
"amount": {
"$ref": "#/definitions/Uint128"
},
"memo": {
"type": [
"string",
"null"
]
},
"padding": {
"type": [
"string",
Expand Down Expand Up @@ -97,6 +103,12 @@
"amount": {
"$ref": "#/definitions/Uint128"
},
"memo": {
"type": [
"string",
"null"
]
},
"msg": {
"anyOf": [
{
Expand Down Expand Up @@ -135,6 +147,12 @@
"amount": {
"$ref": "#/definitions/Uint128"
},
"memo": {
"type": [
"string",
"null"
]
},
"padding": {
"type": [
"string",
Expand Down Expand Up @@ -311,6 +329,12 @@
"amount": {
"$ref": "#/definitions/Uint128"
},
"memo": {
"type": [
"string",
"null"
]
},
"owner": {
"$ref": "#/definitions/HumanAddr"
},
Expand Down Expand Up @@ -344,6 +368,12 @@
"amount": {
"$ref": "#/definitions/Uint128"
},
"memo": {
"type": [
"string",
"null"
]
},
"msg": {
"anyOf": [
{
Expand Down Expand Up @@ -386,6 +416,12 @@
"amount": {
"$ref": "#/definitions/Uint128"
},
"memo": {
"type": [
"string",
"null"
]
},
"owner": {
"$ref": "#/definitions/HumanAddr"
},
Expand Down Expand Up @@ -415,6 +451,12 @@
"amount": {
"$ref": "#/definitions/Uint128"
},
"memo": {
"type": [
"string",
"null"
]
},
"padding": {
"type": [
"string",
Expand Down
188 changes: 181 additions & 7 deletions schema/query_answer.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,36 @@
}
}
},
{
"type": "object",
"required": [
"transaction_history"
],
"properties": {
"transaction_history": {
"type": "object",
"required": [
"txs"
],
"properties": {
"total": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"txs": {
"type": "array",
"items": {
"$ref": "#/definitions/RichTx"
}
}
}
}
}
},
{
"type": "object",
"required": [
Expand Down Expand Up @@ -244,6 +274,45 @@
"HumanAddr": {
"type": "string"
},
"RichTx": {
"type": "object",
"required": [
"action",
"block_height",
"block_time",
"coins",
"id"
],
"properties": {
"action": {
"$ref": "#/definitions/TxAction"
},
"block_height": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"block_time": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"coins": {
"$ref": "#/definitions/Coin"
},
"id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"memo": {
"type": [
"string",
"null"
]
}
}
},
"Tx": {
"type": "object",
"required": [
Expand All @@ -262,6 +331,14 @@
"format": "uint64",
"minimum": 0.0
},
"block_time": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"coins": {
"$ref": "#/definitions/Coin"
},
Expand All @@ -273,21 +350,118 @@
"format": "uint64",
"minimum": 0.0
},
"memo": {
"type": [
"string",
"null"
]
},
"receiver": {
"$ref": "#/definitions/HumanAddr"
},
"sender": {
"$ref": "#/definitions/HumanAddr"
}
}
},
"TxAction": {
"anyOf": [
{
"type": "object",
"required": [
"transfer"
],
"properties": {
"transfer": {
"type": "object",
"required": [
"from",
"recipient",
"sender"
],
"properties": {
"from": {
"$ref": "#/definitions/HumanAddr"
},
"recipient": {
"$ref": "#/definitions/HumanAddr"
},
"sender": {
"$ref": "#/definitions/HumanAddr"
}
}
}
}
},
"timestamp": {
"type": [
"integer",
"null"
{
"type": "object",
"required": [
"mint"
],
"format": "uint64",
"minimum": 0.0
"properties": {
"mint": {
"type": "object",
"required": [
"minter",
"recipient"
],
"properties": {
"minter": {
"$ref": "#/definitions/HumanAddr"
},
"recipient": {
"$ref": "#/definitions/HumanAddr"
}
}
}
}
},
{
"type": "object",
"required": [
"burn"
],
"properties": {
"burn": {
"type": "object",
"required": [
"burner",
"owner"
],
"properties": {
"burner": {
"$ref": "#/definitions/HumanAddr"
},
"owner": {
"$ref": "#/definitions/HumanAddr"
}
}
}
}
},
{
"type": "object",
"required": [
"deposit"
],
"properties": {
"deposit": {
"type": "object"
}
}
},
{
"type": "object",
"required": [
"redeem"
],
"properties": {
"redeem": {
"type": "object"
}
}
}
}
]
},
"Uint128": {
"type": "string"
Expand Down
37 changes: 37 additions & 0 deletions schema/query_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,43 @@
}
}
},
{
"type": "object",
"required": [
"transaction_history"
],
"properties": {
"transaction_history": {
"type": "object",
"required": [
"address",
"key",
"page_size"
],
"properties": {
"address": {
"$ref": "#/definitions/HumanAddr"
},
"key": {
"type": "string"
},
"page": {
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"page_size": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
}
}
},
{
"type": "object",
"required": [
Expand Down

0 comments on commit 0221292

Please sign in to comment.