{ "contract_name": "network-monitors", "contract_version": "0.1.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InstantiateMsg", "type": "object", "required": [ "orchestrator_address" ], "properties": { "orchestrator_address": { "description": "Address of the initial network monitor orchestrator.", "type": "string" } }, "additionalProperties": false }, "execute": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ExecuteMsg", "oneOf": [ { "description": "Change the admin", "type": "object", "required": [ "update_admin" ], "properties": { "update_admin": { "type": "object", "required": [ "admin" ], "properties": { "admin": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Authorise new network monitor orchestrator", "type": "object", "required": [ "authorise_network_monitor_orchestrator" ], "properties": { "authorise_network_monitor_orchestrator": { "type": "object", "required": [ "address" ], "properties": { "address": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Revoke network monitor orchestrator authorisation.", "type": "object", "required": [ "revoke_network_monitor_orchestrator" ], "properties": { "revoke_network_monitor_orchestrator": { "type": "object", "required": [ "address" ], "properties": { "address": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Authorise new network monitor (or renew authorisation) granting additional privileges when sending mixnet packets to Nym nodes.", "type": "object", "required": [ "authorise_network_monitor" ], "properties": { "authorise_network_monitor": { "type": "object", "required": [ "address" ], "properties": { "address": { "type": "string", "format": "ip" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Revoke network monitor authorisation.", "type": "object", "required": [ "revoke_network_monitor" ], "properties": { "revoke_network_monitor": { "type": "object", "required": [ "address" ], "properties": { "address": { "type": "string", "format": "ip" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Revoke all network monitor authorisations.", "type": "string", "enum": [ "revoke_all_network_monitors" ] } ] }, "query": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "QueryMsg", "oneOf": [ { "type": "object", "required": [ "admin" ], "properties": { "admin": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "network_monitor_orchestrators" ], "properties": { "network_monitor_orchestrators": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "network_monitor_agents" ], "properties": { "network_monitor_agents": { "type": "object", "properties": { "limit": { "description": "Controls the maximum number of entries returned by the query. Note that too large values will be overwritten by a saner default.", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "start_next_after": { "description": "Pagination control for the values returned by the query. Note that the provided value itself will **not** be used for the response.", "type": [ "string", "null" ], "format": "ip" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "migrate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "MigrateMsg", "type": "object", "additionalProperties": false }, "sudo": null, "responses": { "admin": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "AdminResponse", "description": "Returned from Admin.query_admin()", "type": "object", "properties": { "admin": { "type": [ "string", "null" ] } }, "additionalProperties": false }, "network_monitor_agents": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "AuthorisedNetworkMonitorsPagedResponse", "type": "object", "required": [ "authorised" ], "properties": { "authorised": { "type": "array", "items": { "$ref": "#/definitions/AuthorisedNetworkMonitor" } }, "start_next_after": { "type": [ "string", "null" ], "format": "ip" } }, "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" }, "AuthorisedNetworkMonitor": { "type": "object", "required": [ "address", "authorised_at", "authorised_by" ], "properties": { "address": { "description": "The Ip address associated with the network monitor agent.", "type": "string", "format": "ip" }, "authorised_at": { "description": "Timestamp of when the network monitor was authorised.", "allOf": [ { "$ref": "#/definitions/Timestamp" } ] }, "authorised_by": { "description": "The address of the orchestrator that authorised the network monitor agent.", "allOf": [ { "$ref": "#/definitions/Addr" } ] } }, "additionalProperties": false }, "Timestamp": { "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", "allOf": [ { "$ref": "#/definitions/Uint64" } ] }, "Uint64": { "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", "type": "string" } } }, "network_monitor_orchestrators": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "AuthorisedNetworkMonitorOrchestratorsResponse", "type": "object", "required": [ "authorised" ], "properties": { "authorised": { "type": "array", "items": { "$ref": "#/definitions/AuthorisedNetworkMonitorOrchestrator" } } }, "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" }, "AuthorisedNetworkMonitorOrchestrator": { "type": "object", "required": [ "address", "authorised_at" ], "properties": { "address": { "description": "The address associated with the network monitor orchestrator.", "allOf": [ { "$ref": "#/definitions/Addr" } ] }, "authorised_at": { "description": "Timestamp of when the network monitor was authorised.", "allOf": [ { "$ref": "#/definitions/Timestamp" } ] } }, "additionalProperties": false }, "Timestamp": { "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", "allOf": [ { "$ref": "#/definitions/Uint64" } ] }, "Uint64": { "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", "type": "string" } } } } }