Files
nym/contracts/name-service/schema/raw/execute.json
T
Jon Häggblad 6d3570913b Verify address with identity key in name-service contract (#3640)
* Validate nym address

* wip: check client_id match

* wip: now compiles

* Fix first set of tests

* Another set of fixed tests

* Fix rebase issues

* rustfmt

* register tests updated

* integration tests now working

* Remove commented out code and unused imports

* Tidy up

* Fix error

* Update schema

* Fix example

* Add assertion in test

* update nym-cli to be able to register names

* Remove left-over dbg
2023-08-17 11:22:11 +02:00

202 lines
4.9 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecuteMsg",
"oneOf": [
{
"description": "Announcing a name pointing to a nym-address",
"type": "object",
"required": [
"register"
],
"properties": {
"register": {
"type": "object",
"required": [
"name",
"owner_signature"
],
"properties": {
"name": {
"$ref": "#/definitions/NameDetails"
},
"owner_signature": {
"$ref": "#/definitions/MessageSignature"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Delete a name entry by id",
"type": "object",
"required": [
"delete_id"
],
"properties": {
"delete_id": {
"type": "object",
"required": [
"name_id"
],
"properties": {
"name_id": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Delete a name entry by name",
"type": "object",
"required": [
"delete_name"
],
"properties": {
"delete_name": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"$ref": "#/definitions/NymName"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Change the deposit required for announcing a name",
"type": "object",
"required": [
"update_deposit_required"
],
"properties": {
"update_deposit_required": {
"type": "object",
"required": [
"deposit_required"
],
"properties": {
"deposit_required": {
"$ref": "#/definitions/Coin"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
],
"definitions": {
"Address": {
"description": "String representation of a nym address, which is of the form client_id.client_enc@gateway_id. NOTE: entirely unvalidated.",
"oneOf": [
{
"type": "object",
"required": [
"nym_address"
],
"properties": {
"nym_address": {
"$ref": "#/definitions/NymAddressInner"
}
},
"additionalProperties": false
}
]
},
"Coin": {
"type": "object",
"required": [
"amount",
"denom"
],
"properties": {
"amount": {
"$ref": "#/definitions/Uint128"
},
"denom": {
"type": "string"
}
}
},
"MessageSignature": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
},
"NameDetails": {
"type": "object",
"required": [
"address",
"identity_key",
"name"
],
"properties": {
"address": {
"description": "The address of the name alias.",
"allOf": [
{
"$ref": "#/definitions/Address"
}
]
},
"identity_key": {
"description": "The identity key of the registered name.",
"type": "string"
},
"name": {
"description": "The name pointing to the nym address",
"allOf": [
{
"$ref": "#/definitions/NymName"
}
]
}
},
"additionalProperties": false
},
"NymAddressInner": {
"type": "object",
"required": [
"client_enc",
"client_id",
"gateway_id"
],
"properties": {
"client_enc": {
"type": "string"
},
"client_id": {
"type": "string"
},
"gateway_id": {
"type": "string"
}
},
"additionalProperties": false
},
"NymName": {
"description": "Name stored and pointing a to a nym-address",
"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"
}
}
}