This commit is contained in:
Jędrzej Stuczyński
2024-02-15 12:17:06 +00:00
parent 45686f7ca6
commit ad2552ec78
6 changed files with 340 additions and 171 deletions
+170 -140
View File
@@ -180,15 +180,11 @@
"commit_dealings_chunk": {
"type": "object",
"required": [
"chunk",
"resharing"
"chunk"
],
"properties": {
"chunk": {
"$ref": "#/definitions/PartialContractDealing"
},
"resharing": {
"type": "boolean"
}
},
"additionalProperties": false
@@ -271,6 +267,32 @@
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"trigger_reset"
],
"properties": {
"trigger_reset": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"trigger_resharing"
],
"properties": {
"trigger_resharing": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
}
],
"definitions": {
@@ -365,19 +387,6 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"get_initial_dealers"
],
"properties": {
"get_initial_dealers": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
@@ -431,10 +440,10 @@
{
"type": "object",
"required": [
"get_past_dealers"
"get_dealer_indices"
],
"properties": {
"get_past_dealers": {
"get_dealer_indices": {
"type": "object",
"properties": {
"limit": {
@@ -813,15 +822,11 @@
"required": [
"epoch_id",
"state",
"state_progress",
"time_configuration"
],
"properties": {
"epoch_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"finish_timestamp": {
"deadline": {
"anyOf": [
{
"$ref": "#/definitions/Timestamp"
@@ -831,9 +836,17 @@
}
]
},
"epoch_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"state": {
"$ref": "#/definitions/EpochState"
},
"state_progress": {
"$ref": "#/definitions/StateProgress"
},
"time_configuration": {
"$ref": "#/definitions/TimeConfiguration"
}
@@ -956,6 +969,38 @@
}
]
},
"StateProgress": {
"type": "object",
"required": [
"registered_dealers",
"submitted_dealings",
"submitted_key_shares",
"verified_keys"
],
"properties": {
"registered_dealers": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"submitted_dealings": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"submitted_key_shares": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"verified_keys": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
},
"additionalProperties": false
},
"TimeConfiguration": {
"type": "object",
"required": [
@@ -1154,15 +1199,109 @@
"additionalProperties": false
},
"DealerType": {
"type": "string",
"enum": [
"current",
"past",
"unknown"
"oneOf": [
{
"type": "string",
"enum": [
"unknown"
]
},
{
"type": "object",
"required": [
"current"
],
"properties": {
"current": {
"type": "object",
"required": [
"assigned_index"
],
"properties": {
"assigned_index": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"past"
],
"properties": {
"past": {
"type": "object",
"required": [
"assigned_index"
],
"properties": {
"assigned_index": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
}
},
"get_dealer_indices": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "PagedDealerIndexResponse",
"type": "object",
"required": [
"indices"
],
"properties": {
"indices": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"$ref": "#/definitions/Addr"
},
{
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
],
"maxItems": 2,
"minItems": 2
}
},
"start_next_after": {
"description": "Field indicating paging information for the following queries if the caller wishes to get further entries.",
"anyOf": [
{
"$ref": "#/definitions/Addr"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"definitions": {
"Addr": {
"description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.",
"type": "string"
}
}
},
"get_dealing_chunk": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "DealingChunkResponse",
@@ -1455,115 +1594,6 @@
}
}
},
"get_initial_dealers": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Nullable_InitialReplacementData",
"anyOf": [
{
"$ref": "#/definitions/InitialReplacementData"
},
{
"type": "null"
}
],
"definitions": {
"Addr": {
"description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.",
"type": "string"
},
"InitialReplacementData": {
"type": "object",
"required": [
"initial_dealers",
"initial_height"
],
"properties": {
"initial_dealers": {
"type": "array",
"items": {
"$ref": "#/definitions/Addr"
}
},
"initial_height": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
}
},
"get_past_dealers": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "PagedDealerResponse",
"type": "object",
"required": [
"dealers",
"per_page"
],
"properties": {
"dealers": {
"type": "array",
"items": {
"$ref": "#/definitions/DealerDetails"
}
},
"per_page": {
"type": "integer",
"format": "uint",
"minimum": 0.0
},
"start_next_after": {
"description": "Field indicating paging information for the following queries if the caller wishes to get further entries.",
"anyOf": [
{
"$ref": "#/definitions/Addr"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"definitions": {
"Addr": {
"description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.",
"type": "string"
},
"DealerDetails": {
"type": "object",
"required": [
"address",
"announce_address",
"assigned_index",
"bte_public_key_with_proof",
"ed25519_identity"
],
"properties": {
"address": {
"$ref": "#/definitions/Addr"
},
"announce_address": {
"type": "string"
},
"assigned_index": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"bte_public_key_with_proof": {
"type": "string"
},
"ed25519_identity": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"get_state": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "State",
+27 -5
View File
@@ -91,15 +91,11 @@
"commit_dealings_chunk": {
"type": "object",
"required": [
"chunk",
"resharing"
"chunk"
],
"properties": {
"chunk": {
"$ref": "#/definitions/PartialContractDealing"
},
"resharing": {
"type": "boolean"
}
},
"additionalProperties": false
@@ -182,6 +178,32 @@
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"trigger_reset"
],
"properties": {
"trigger_reset": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"trigger_resharing"
],
"properties": {
"trigger_resharing": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
}
],
"definitions": {
+2 -15
View File
@@ -41,19 +41,6 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"get_initial_dealers"
],
"properties": {
"get_initial_dealers": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
@@ -107,10 +94,10 @@
{
"type": "object",
"required": [
"get_past_dealers"
"get_dealer_indices"
],
"properties": {
"get_past_dealers": {
"get_dealer_indices": {
"type": "object",
"properties": {
"limit": {
@@ -5,15 +5,11 @@
"required": [
"epoch_id",
"state",
"state_progress",
"time_configuration"
],
"properties": {
"epoch_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"finish_timestamp": {
"deadline": {
"anyOf": [
{
"$ref": "#/definitions/Timestamp"
@@ -23,9 +19,17 @@
}
]
},
"epoch_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"state": {
"$ref": "#/definitions/EpochState"
},
"state_progress": {
"$ref": "#/definitions/StateProgress"
},
"time_configuration": {
"$ref": "#/definitions/TimeConfiguration"
}
@@ -148,6 +152,38 @@
}
]
},
"StateProgress": {
"type": "object",
"required": [
"registered_dealers",
"submitted_dealings",
"submitted_key_shares",
"verified_keys"
],
"properties": {
"registered_dealers": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"submitted_dealings": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"submitted_key_shares": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"verified_keys": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
},
"additionalProperties": false
},
"TimeConfiguration": {
"type": "object",
"required": [
@@ -57,11 +57,59 @@
"additionalProperties": false
},
"DealerType": {
"type": "string",
"enum": [
"current",
"past",
"unknown"
"oneOf": [
{
"type": "string",
"enum": [
"unknown"
]
},
{
"type": "object",
"required": [
"current"
],
"properties": {
"current": {
"type": "object",
"required": [
"assigned_index"
],
"properties": {
"assigned_index": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"past"
],
"properties": {
"past": {
"type": "object",
"required": [
"assigned_index"
],
"properties": {
"assigned_index": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
}
@@ -0,0 +1,46 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "PagedDealerIndexResponse",
"type": "object",
"required": [
"indices"
],
"properties": {
"indices": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"$ref": "#/definitions/Addr"
},
{
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
],
"maxItems": 2,
"minItems": 2
}
},
"start_next_after": {
"description": "Field indicating paging information for the following queries if the caller wishes to get further entries.",
"anyOf": [
{
"$ref": "#/definitions/Addr"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"definitions": {
"Addr": {
"description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.",
"type": "string"
}
}
}