-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquery_msg.json
184 lines (184 loc) · 8.27 KB
/
query_msg.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryMsg",
"description": "Defines all routes in which the contract can be queried. These are all handled directly in the [contract file](crate::contract::query).",
"oneOf": [
{
"description": "This route can be used to retrieve a specific [AssetDefinitionV3](super::types::asset_definition::AssetDefinitionV3) from the contract's internal storage for inspection of its verifies and other properties. If the requested value is not found, a null response will be returned.",
"type": "object",
"required": [
"query_asset_definition"
],
"properties": {
"query_asset_definition": {
"type": "object",
"required": [
"asset_type"
],
"properties": {
"asset_type": {
"description": "The asset type to query for",
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "This route can be used to retrieve all [AssetDefinitionV3s](super::types::asset_definition::AssetDefinitionV3) stored in the contract. This response payload can be quite large if many complex definitions are stored, so it should only used in circumstances where all asset definitions need to be inspected or displayed. The query asset definition route is much more efficient.",
"type": "object",
"required": [
"query_asset_definitions"
],
"properties": {
"query_asset_definitions": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "This route can be used to retrieve a list of existing [AssetScopeAttribute](super::types::asset_scope_attribute::AssetScopeAttribute)s that have been added to a [Provenance Metadata Scope](https://docs.provenance.io/modules/metadata-module#metadata-scope) by this contract. This route will return a null (empty option) if the scope has never had a scope attribute added to it by the contract. This is a useful route for external consumers of the contract's data to determine if a scope (aka asset) has been successfully classified by a verifier.",
"type": "object",
"required": [
"query_asset_scope_attributes"
],
"properties": {
"query_asset_scope_attributes": {
"type": "object",
"required": [
"identifier"
],
"properties": {
"identifier": {
"description": "Expects an [AssetIdentifier](super::types::asset_identifier::AssetIdentifier)-compatible [SerializedEnum](super::types::serialized_enum::SerializedEnum).",
"allOf": [
{
"$ref": "#/definitions/SerializedEnum"
}
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "This route can be used to retrieve an existing [AssetScopeAttribute](super::types::asset_scope_attribute::AssetScopeAttribute) that has been added to a [Provenance Metadata Scope](https://docs.provenance.io/modules/metadata-module#metadata-scope) by this contract for a specific asset type. This route will return a null (empty option) if the scope has never had a scope attribute added to it by the contract. This is a useful route for external consumers of the contract's data to determine if a scope (aka asset) has been successfully classified by a verifier for a specific asset type.",
"type": "object",
"required": [
"query_asset_scope_attribute_for_asset_type"
],
"properties": {
"query_asset_scope_attribute_for_asset_type": {
"type": "object",
"required": [
"asset_type",
"identifier"
],
"properties": {
"asset_type": {
"description": "The asset type to query for",
"type": "string"
},
"identifier": {
"description": "Expects an [AssetIdentifier](super::types::asset_identifier::AssetIdentifier)-compatible [SerializedEnum](super::types::serialized_enum::SerializedEnum).",
"allOf": [
{
"$ref": "#/definitions/SerializedEnum"
}
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "This route can be used to retrieve an existing [FeePaymentDetail](super::types::fee_payment_detail::FeePaymentDetail) that has been stored from a [VerifierDetailV2](super::types::verifier_detail::VerifierDetailV2) during the [OnboardAsset](self::ExecuteMsg::OnboardAsset) execution route's processes. This route is useful in showing the expected fees to be paid when the [VerifyAsset](self::ExecuteMsg::VerifyAsset) route is executed.",
"type": "object",
"required": [
"query_fee_payments"
],
"properties": {
"query_fee_payments": {
"type": "object",
"required": [
"asset_type",
"identifier"
],
"properties": {
"asset_type": {
"description": "The asset type to query for pending verification fee payment details",
"type": "string"
},
"identifier": {
"description": "Expects an [AssetIdentifier](super::types::asset_identifier::AssetIdentifier)-compatible [SerializedEnum](super::types::serialized_enum::SerializedEnum).",
"allOf": [
{
"$ref": "#/definitions/SerializedEnum"
}
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "This route can be used to retrieve the internal contract state values. These are core configurations that denote how the contract behaves. They reflect the values created at instantiation and potentially modified during migration. It responds with a [StateV2](super::state::StateV2) struct value.",
"type": "object",
"required": [
"query_state"
],
"properties": {
"query_state": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "This route can be used to retrieve the internal contract version information. It elucidates the current version of the contract that was derived through instantiation or the most recent code migration. It responds with a [VersionInfoV1](crate::migrate::version_info::VersionInfoV1) struct value.",
"type": "object",
"required": [
"query_version"
],
"properties": {
"query_version": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
}
],
"definitions": {
"SerializedEnum": {
"description": "There is a bug in cosmwasm 1.0.0's interaction with serde-json-wasm that causes floating point operations to be added into the compiled wasm, so the previous solution of using things like AssetIdentifier directly and specifying them with a tag and content param in their serde annotation is impossible as of 1.0.0. This solution will allow existing requests to remain identical, but not generate floating point errors. It makes the schema less useful, but it's a hack to fix a bug, so...\n\nIt's also worth noting that this solution can only create enum switches that have Strings as their values. Anything different will not work for this solution and will require further adaptation and hackery.",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Specifies the type of enum to deserialize into. Maps into one of the values specified in the impl for this struct.",
"type": "string"
},
"value": {
"description": "Specifies the string value to be used for the type.",
"type": "string"
}
},
"additionalProperties": false
}
}
}