e84af4f601
* Skip ReadOnlyBucket deserialization errors * empty migration * clippy * cargo schema * Drop invalid delegation data * Dont drop old data * Add todo * Unify on type param * gateways are different * cargo fmt Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com>
350 lines
8.1 KiB
JSON
350 lines
8.1 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "ExecuteMsg",
|
|
"anyOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"bond_mixnode"
|
|
],
|
|
"properties": {
|
|
"bond_mixnode": {
|
|
"type": "object",
|
|
"required": [
|
|
"mix_node"
|
|
],
|
|
"properties": {
|
|
"mix_node": {
|
|
"$ref": "#/definitions/MixNode"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"unbond_mixnode"
|
|
],
|
|
"properties": {
|
|
"unbond_mixnode": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"bond_gateway"
|
|
],
|
|
"properties": {
|
|
"bond_gateway": {
|
|
"type": "object",
|
|
"required": [
|
|
"gateway"
|
|
],
|
|
"properties": {
|
|
"gateway": {
|
|
"$ref": "#/definitions/Gateway"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"unbond_gateway"
|
|
],
|
|
"properties": {
|
|
"unbond_gateway": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"update_state_params"
|
|
],
|
|
"properties": {
|
|
"update_state_params": {
|
|
"$ref": "#/definitions/StateParams"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"delegate_to_mixnode"
|
|
],
|
|
"properties": {
|
|
"delegate_to_mixnode": {
|
|
"type": "object",
|
|
"required": [
|
|
"mix_identity"
|
|
],
|
|
"properties": {
|
|
"mix_identity": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"undelegate_from_mixnode"
|
|
],
|
|
"properties": {
|
|
"undelegate_from_mixnode": {
|
|
"type": "object",
|
|
"required": [
|
|
"mix_identity"
|
|
],
|
|
"properties": {
|
|
"mix_identity": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"delegate_to_gateway"
|
|
],
|
|
"properties": {
|
|
"delegate_to_gateway": {
|
|
"type": "object",
|
|
"required": [
|
|
"gateway_identity"
|
|
],
|
|
"properties": {
|
|
"gateway_identity": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"undelegate_from_gateway"
|
|
],
|
|
"properties": {
|
|
"undelegate_from_gateway": {
|
|
"type": "object",
|
|
"required": [
|
|
"gateway_identity"
|
|
],
|
|
"properties": {
|
|
"gateway_identity": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"reward_mixnode"
|
|
],
|
|
"properties": {
|
|
"reward_mixnode": {
|
|
"type": "object",
|
|
"required": [
|
|
"identity",
|
|
"uptime"
|
|
],
|
|
"properties": {
|
|
"identity": {
|
|
"type": "string"
|
|
},
|
|
"uptime": {
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"reward_gateway"
|
|
],
|
|
"properties": {
|
|
"reward_gateway": {
|
|
"type": "object",
|
|
"required": [
|
|
"identity",
|
|
"uptime"
|
|
],
|
|
"properties": {
|
|
"identity": {
|
|
"type": "string"
|
|
},
|
|
"uptime": {
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
],
|
|
"definitions": {
|
|
"Decimal": {
|
|
"description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)",
|
|
"type": "string"
|
|
},
|
|
"Gateway": {
|
|
"type": "object",
|
|
"required": [
|
|
"clients_port",
|
|
"host",
|
|
"identity_key",
|
|
"location",
|
|
"mix_port",
|
|
"sphinx_key",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"clients_port": {
|
|
"type": "integer",
|
|
"format": "uint16",
|
|
"minimum": 0.0
|
|
},
|
|
"host": {
|
|
"type": "string"
|
|
},
|
|
"identity_key": {
|
|
"description": "Base58 encoded ed25519 EdDSA public key of the gateway used to derive shared keys with clients",
|
|
"type": "string"
|
|
},
|
|
"location": {
|
|
"type": "string"
|
|
},
|
|
"mix_port": {
|
|
"type": "integer",
|
|
"format": "uint16",
|
|
"minimum": 0.0
|
|
},
|
|
"sphinx_key": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"MixNode": {
|
|
"type": "object",
|
|
"required": [
|
|
"host",
|
|
"http_api_port",
|
|
"identity_key",
|
|
"mix_port",
|
|
"sphinx_key",
|
|
"verloc_port",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"host": {
|
|
"type": "string"
|
|
},
|
|
"http_api_port": {
|
|
"type": "integer",
|
|
"format": "uint16",
|
|
"minimum": 0.0
|
|
},
|
|
"identity_key": {
|
|
"description": "Base58 encoded ed25519 EdDSA public key.",
|
|
"type": "string"
|
|
},
|
|
"mix_port": {
|
|
"type": "integer",
|
|
"format": "uint16",
|
|
"minimum": 0.0
|
|
},
|
|
"sphinx_key": {
|
|
"type": "string"
|
|
},
|
|
"verloc_port": {
|
|
"type": "integer",
|
|
"format": "uint16",
|
|
"minimum": 0.0
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"StateParams": {
|
|
"type": "object",
|
|
"required": [
|
|
"epoch_length",
|
|
"gateway_bond_reward_rate",
|
|
"gateway_delegation_reward_rate",
|
|
"minimum_gateway_bond",
|
|
"minimum_mixnode_bond",
|
|
"mixnode_active_set_size",
|
|
"mixnode_bond_reward_rate",
|
|
"mixnode_delegation_reward_rate"
|
|
],
|
|
"properties": {
|
|
"epoch_length": {
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"gateway_bond_reward_rate": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"gateway_delegation_reward_rate": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"minimum_gateway_bond": {
|
|
"$ref": "#/definitions/Uint128"
|
|
},
|
|
"minimum_mixnode_bond": {
|
|
"$ref": "#/definitions/Uint128"
|
|
},
|
|
"mixnode_active_set_size": {
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"mixnode_bond_reward_rate": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"mixnode_delegation_reward_rate": {
|
|
"$ref": "#/definitions/Decimal"
|
|
}
|
|
}
|
|
},
|
|
"Uint128": {
|
|
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 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 `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|