Files
nym/contracts/mixnet/schema/execute_msg.json
2022-03-23 20:40:24 +01:00

630 lines
14 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecuteMsg",
"oneOf": [
{
"type": "object",
"required": [
"reconcile_delegations"
],
"properties": {
"reconcile_delegations": {
"type": "object"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"checkpoint_mixnodes"
],
"properties": {
"checkpoint_mixnodes": {
"type": "object"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"compound_operator_reward_on_behalf"
],
"properties": {
"compound_operator_reward_on_behalf": {
"type": "object",
"required": [
"owner"
],
"properties": {
"owner": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"compound_delegator_reward_on_behalf"
],
"properties": {
"compound_delegator_reward_on_behalf": {
"type": "object",
"required": [
"mix_identity",
"owner"
],
"properties": {
"mix_identity": {
"type": "string"
},
"owner": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"compound_operator_reward"
],
"properties": {
"compound_operator_reward": {
"type": "object"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"compound_delegator_reward"
],
"properties": {
"compound_delegator_reward": {
"type": "object",
"required": [
"mix_identity"
],
"properties": {
"mix_identity": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"bond_mixnode"
],
"properties": {
"bond_mixnode": {
"type": "object",
"required": [
"mix_node",
"owner_signature"
],
"properties": {
"mix_node": {
"$ref": "#/definitions/MixNode"
},
"owner_signature": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"unbond_mixnode"
],
"properties": {
"unbond_mixnode": {
"type": "object"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"update_mixnode_config"
],
"properties": {
"update_mixnode_config": {
"type": "object",
"required": [
"profit_margin_percent"
],
"properties": {
"profit_margin_percent": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"update_mixnode_config_on_behalf"
],
"properties": {
"update_mixnode_config_on_behalf": {
"type": "object",
"required": [
"owner",
"profit_margin_percent"
],
"properties": {
"owner": {
"type": "string"
},
"profit_margin_percent": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"bond_gateway"
],
"properties": {
"bond_gateway": {
"type": "object",
"required": [
"gateway",
"owner_signature"
],
"properties": {
"gateway": {
"$ref": "#/definitions/Gateway"
},
"owner_signature": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"unbond_gateway"
],
"properties": {
"unbond_gateway": {
"type": "object"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"update_contract_state_params"
],
"properties": {
"update_contract_state_params": {
"$ref": "#/definitions/ContractStateParams"
}
},
"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": [
"reward_mixnode"
],
"properties": {
"reward_mixnode": {
"type": "object",
"required": [
"identity",
"params"
],
"properties": {
"identity": {
"type": "string"
},
"params": {
"$ref": "#/definitions/NodeRewardParams"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"delegate_to_mixnode_on_behalf"
],
"properties": {
"delegate_to_mixnode_on_behalf": {
"type": "object",
"required": [
"delegate",
"mix_identity"
],
"properties": {
"delegate": {
"type": "string"
},
"mix_identity": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"undelegate_from_mixnode_on_behalf"
],
"properties": {
"undelegate_from_mixnode_on_behalf": {
"type": "object",
"required": [
"delegate",
"mix_identity"
],
"properties": {
"delegate": {
"type": "string"
},
"mix_identity": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"bond_mixnode_on_behalf"
],
"properties": {
"bond_mixnode_on_behalf": {
"type": "object",
"required": [
"mix_node",
"owner",
"owner_signature"
],
"properties": {
"mix_node": {
"$ref": "#/definitions/MixNode"
},
"owner": {
"type": "string"
},
"owner_signature": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"unbond_mixnode_on_behalf"
],
"properties": {
"unbond_mixnode_on_behalf": {
"type": "object",
"required": [
"owner"
],
"properties": {
"owner": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"bond_gateway_on_behalf"
],
"properties": {
"bond_gateway_on_behalf": {
"type": "object",
"required": [
"gateway",
"owner",
"owner_signature"
],
"properties": {
"gateway": {
"$ref": "#/definitions/Gateway"
},
"owner": {
"type": "string"
},
"owner_signature": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"unbond_gateway_on_behalf"
],
"properties": {
"unbond_gateway_on_behalf": {
"type": "object",
"required": [
"owner"
],
"properties": {
"owner": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"write_rewarded_set"
],
"properties": {
"write_rewarded_set": {
"type": "object",
"required": [
"expected_active_set_size",
"rewarded_set"
],
"properties": {
"expected_active_set_size": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"rewarded_set": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"advance_current_epoch"
],
"properties": {
"advance_current_epoch": {
"type": "object"
}
},
"additionalProperties": false
}
],
"definitions": {
"ContractStateParams": {
"type": "object",
"required": [
"minimum_gateway_pledge",
"minimum_mixnode_pledge",
"mixnode_active_set_size",
"mixnode_rewarded_set_size"
],
"properties": {
"minimum_gateway_pledge": {
"$ref": "#/definitions/Uint128"
},
"minimum_mixnode_pledge": {
"$ref": "#/definitions/Uint128"
},
"mixnode_active_set_size": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"mixnode_rewarded_set_size": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
},
"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",
"profit_margin_percent",
"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
},
"profit_margin_percent": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
},
"sphinx_key": {
"type": "string"
},
"verloc_port": {
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"version": {
"type": "string"
}
}
},
"NodeRewardParams": {
"type": "object",
"required": [
"in_active_set",
"reward_blockstamp",
"uptime"
],
"properties": {
"in_active_set": {
"type": "boolean"
},
"reward_blockstamp": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"uptime": {
"$ref": "#/definitions/Uint128"
}
}
},
"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"
}
}
}