138 lines
3.9 KiB
JSON
138 lines
3.9 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "MixNodeBond",
|
|
"type": "object",
|
|
"required": [
|
|
"block_height",
|
|
"layer",
|
|
"mix_node",
|
|
"owner",
|
|
"pledge_amount",
|
|
"total_delegation"
|
|
],
|
|
"properties": {
|
|
"accumulated_rewards": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/Uint128"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"block_height": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"layer": {
|
|
"$ref": "#/definitions/Layer"
|
|
},
|
|
"mix_node": {
|
|
"$ref": "#/definitions/MixNode"
|
|
},
|
|
"owner": {
|
|
"$ref": "#/definitions/Addr"
|
|
},
|
|
"pledge_amount": {
|
|
"$ref": "#/definitions/Coin"
|
|
},
|
|
"proxy": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/Addr"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"total_delegation": {
|
|
"$ref": "#/definitions/Coin"
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"Coin": {
|
|
"type": "object",
|
|
"required": [
|
|
"amount",
|
|
"denom"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"$ref": "#/definitions/Uint128"
|
|
},
|
|
"denom": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Layer": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Gateway",
|
|
"One",
|
|
"Two",
|
|
"Three"
|
|
]
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
}
|