1use persistence_std_derive::CosmwasmExt;
2#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(
5 Clone,
6 PartialEq,
7 Eq,
8 ::prost::Message,
9 ::serde::Serialize,
10 ::serde::Deserialize,
11 ::schemars::JsonSchema,
12 CosmwasmExt,
13)]
14#[proto_message(type_url = "/cosmos.nft.v1beta1.EventSend")]
15pub struct EventSend {
16 #[prost(string, tag = "1")]
18 #[serde(alias = "classID")]
19 pub class_id: ::prost::alloc::string::String,
20 #[prost(string, tag = "2")]
22 #[serde(alias = "ID")]
23 pub id: ::prost::alloc::string::String,
24 #[prost(string, tag = "3")]
26 pub sender: ::prost::alloc::string::String,
27 #[prost(string, tag = "4")]
29 pub receiver: ::prost::alloc::string::String,
30}
31#[allow(clippy::derive_partial_eq_without_eq)]
33#[derive(
34 Clone,
35 PartialEq,
36 Eq,
37 ::prost::Message,
38 ::serde::Serialize,
39 ::serde::Deserialize,
40 ::schemars::JsonSchema,
41 CosmwasmExt,
42)]
43#[proto_message(type_url = "/cosmos.nft.v1beta1.EventMint")]
44pub struct EventMint {
45 #[prost(string, tag = "1")]
47 #[serde(alias = "classID")]
48 pub class_id: ::prost::alloc::string::String,
49 #[prost(string, tag = "2")]
51 #[serde(alias = "ID")]
52 pub id: ::prost::alloc::string::String,
53 #[prost(string, tag = "3")]
55 pub owner: ::prost::alloc::string::String,
56}
57#[allow(clippy::derive_partial_eq_without_eq)]
59#[derive(
60 Clone,
61 PartialEq,
62 Eq,
63 ::prost::Message,
64 ::serde::Serialize,
65 ::serde::Deserialize,
66 ::schemars::JsonSchema,
67 CosmwasmExt,
68)]
69#[proto_message(type_url = "/cosmos.nft.v1beta1.EventBurn")]
70pub struct EventBurn {
71 #[prost(string, tag = "1")]
73 #[serde(alias = "classID")]
74 pub class_id: ::prost::alloc::string::String,
75 #[prost(string, tag = "2")]
77 #[serde(alias = "ID")]
78 pub id: ::prost::alloc::string::String,
79 #[prost(string, tag = "3")]
81 pub owner: ::prost::alloc::string::String,
82}
83#[allow(clippy::derive_partial_eq_without_eq)]
85#[derive(
86 Clone,
87 PartialEq,
88 Eq,
89 ::prost::Message,
90 ::serde::Serialize,
91 ::serde::Deserialize,
92 ::schemars::JsonSchema,
93 CosmwasmExt,
94)]
95#[proto_message(type_url = "/cosmos.nft.v1beta1.Class")]
96pub struct Class {
97 #[prost(string, tag = "1")]
99 #[serde(alias = "ID")]
100 pub id: ::prost::alloc::string::String,
101 #[prost(string, tag = "2")]
103 pub name: ::prost::alloc::string::String,
104 #[prost(string, tag = "3")]
106 pub symbol: ::prost::alloc::string::String,
107 #[prost(string, tag = "4")]
109 pub description: ::prost::alloc::string::String,
110 #[prost(string, tag = "5")]
112 pub uri: ::prost::alloc::string::String,
113 #[prost(string, tag = "6")]
115 pub uri_hash: ::prost::alloc::string::String,
116 #[prost(message, optional, tag = "7")]
118 pub data: ::core::option::Option<crate::shim::Any>,
119}
120#[allow(clippy::derive_partial_eq_without_eq)]
122#[derive(
123 Clone,
124 PartialEq,
125 Eq,
126 ::prost::Message,
127 ::serde::Serialize,
128 ::serde::Deserialize,
129 ::schemars::JsonSchema,
130 CosmwasmExt,
131)]
132#[proto_message(type_url = "/cosmos.nft.v1beta1.NFT")]
133pub struct Nft {
134 #[prost(string, tag = "1")]
136 #[serde(alias = "classID")]
137 pub class_id: ::prost::alloc::string::String,
138 #[prost(string, tag = "2")]
140 #[serde(alias = "ID")]
141 pub id: ::prost::alloc::string::String,
142 #[prost(string, tag = "3")]
144 pub uri: ::prost::alloc::string::String,
145 #[prost(string, tag = "4")]
147 pub uri_hash: ::prost::alloc::string::String,
148 #[prost(message, optional, tag = "10")]
150 pub data: ::core::option::Option<crate::shim::Any>,
151}
152#[allow(clippy::derive_partial_eq_without_eq)]
154#[derive(
155 Clone,
156 PartialEq,
157 Eq,
158 ::prost::Message,
159 ::serde::Serialize,
160 ::serde::Deserialize,
161 ::schemars::JsonSchema,
162 CosmwasmExt,
163)]
164#[proto_message(type_url = "/cosmos.nft.v1beta1.GenesisState")]
165pub struct GenesisState {
166 #[prost(message, repeated, tag = "1")]
168 pub classes: ::prost::alloc::vec::Vec<Class>,
169 #[prost(message, repeated, tag = "2")]
171 pub entries: ::prost::alloc::vec::Vec<Entry>,
172}
173#[allow(clippy::derive_partial_eq_without_eq)]
175#[derive(
176 Clone,
177 PartialEq,
178 Eq,
179 ::prost::Message,
180 ::serde::Serialize,
181 ::serde::Deserialize,
182 ::schemars::JsonSchema,
183 CosmwasmExt,
184)]
185#[proto_message(type_url = "/cosmos.nft.v1beta1.Entry")]
186pub struct Entry {
187 #[prost(string, tag = "1")]
189 pub owner: ::prost::alloc::string::String,
190 #[prost(message, repeated, tag = "2")]
192 pub nfts: ::prost::alloc::vec::Vec<Nft>,
193}
194#[allow(clippy::derive_partial_eq_without_eq)]
196#[derive(
197 Clone,
198 PartialEq,
199 Eq,
200 ::prost::Message,
201 ::serde::Serialize,
202 ::serde::Deserialize,
203 ::schemars::JsonSchema,
204 CosmwasmExt,
205)]
206#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryBalanceRequest")]
207#[proto_query(
208 path = "/cosmos.nft.v1beta1.Query/Balance",
209 response_type = QueryBalanceResponse
210)]
211pub struct QueryBalanceRequest {
212 #[prost(string, tag = "1")]
214 #[serde(alias = "classID")]
215 pub class_id: ::prost::alloc::string::String,
216 #[prost(string, tag = "2")]
218 pub owner: ::prost::alloc::string::String,
219}
220#[allow(clippy::derive_partial_eq_without_eq)]
222#[derive(
223 Clone,
224 PartialEq,
225 Eq,
226 ::prost::Message,
227 ::serde::Serialize,
228 ::serde::Deserialize,
229 ::schemars::JsonSchema,
230 CosmwasmExt,
231)]
232#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryBalanceResponse")]
233pub struct QueryBalanceResponse {
234 #[prost(uint64, tag = "1")]
236 #[serde(
237 serialize_with = "crate::serde::as_str::serialize",
238 deserialize_with = "crate::serde::as_str::deserialize"
239 )]
240 pub amount: u64,
241}
242#[allow(clippy::derive_partial_eq_without_eq)]
244#[derive(
245 Clone,
246 PartialEq,
247 Eq,
248 ::prost::Message,
249 ::serde::Serialize,
250 ::serde::Deserialize,
251 ::schemars::JsonSchema,
252 CosmwasmExt,
253)]
254#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryOwnerRequest")]
255#[proto_query(
256 path = "/cosmos.nft.v1beta1.Query/Owner",
257 response_type = QueryOwnerResponse
258)]
259pub struct QueryOwnerRequest {
260 #[prost(string, tag = "1")]
262 #[serde(alias = "classID")]
263 pub class_id: ::prost::alloc::string::String,
264 #[prost(string, tag = "2")]
266 #[serde(alias = "ID")]
267 pub id: ::prost::alloc::string::String,
268}
269#[allow(clippy::derive_partial_eq_without_eq)]
271#[derive(
272 Clone,
273 PartialEq,
274 Eq,
275 ::prost::Message,
276 ::serde::Serialize,
277 ::serde::Deserialize,
278 ::schemars::JsonSchema,
279 CosmwasmExt,
280)]
281#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryOwnerResponse")]
282pub struct QueryOwnerResponse {
283 #[prost(string, tag = "1")]
285 pub owner: ::prost::alloc::string::String,
286}
287#[allow(clippy::derive_partial_eq_without_eq)]
289#[derive(
290 Clone,
291 PartialEq,
292 Eq,
293 ::prost::Message,
294 ::serde::Serialize,
295 ::serde::Deserialize,
296 ::schemars::JsonSchema,
297 CosmwasmExt,
298)]
299#[proto_message(type_url = "/cosmos.nft.v1beta1.QuerySupplyRequest")]
300#[proto_query(
301 path = "/cosmos.nft.v1beta1.Query/Supply",
302 response_type = QuerySupplyResponse
303)]
304pub struct QuerySupplyRequest {
305 #[prost(string, tag = "1")]
307 #[serde(alias = "classID")]
308 pub class_id: ::prost::alloc::string::String,
309}
310#[allow(clippy::derive_partial_eq_without_eq)]
312#[derive(
313 Clone,
314 PartialEq,
315 Eq,
316 ::prost::Message,
317 ::serde::Serialize,
318 ::serde::Deserialize,
319 ::schemars::JsonSchema,
320 CosmwasmExt,
321)]
322#[proto_message(type_url = "/cosmos.nft.v1beta1.QuerySupplyResponse")]
323pub struct QuerySupplyResponse {
324 #[prost(uint64, tag = "1")]
326 #[serde(
327 serialize_with = "crate::serde::as_str::serialize",
328 deserialize_with = "crate::serde::as_str::deserialize"
329 )]
330 pub amount: u64,
331}
332#[allow(clippy::derive_partial_eq_without_eq)]
334#[derive(
335 Clone,
336 PartialEq,
337 Eq,
338 ::prost::Message,
339 ::serde::Serialize,
340 ::serde::Deserialize,
341 ::schemars::JsonSchema,
342 CosmwasmExt,
343)]
344#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryNFTsRequest")]
345#[proto_query(
346 path = "/cosmos.nft.v1beta1.Query/NFTs",
347 response_type = QueryNfTsResponse
348)]
349pub struct QueryNfTsRequest {
350 #[prost(string, tag = "1")]
352 #[serde(alias = "classID")]
353 pub class_id: ::prost::alloc::string::String,
354 #[prost(string, tag = "2")]
356 pub owner: ::prost::alloc::string::String,
357 #[prost(message, optional, tag = "3")]
359 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
360}
361#[allow(clippy::derive_partial_eq_without_eq)]
363#[derive(
364 Clone,
365 PartialEq,
366 Eq,
367 ::prost::Message,
368 ::serde::Serialize,
369 ::serde::Deserialize,
370 ::schemars::JsonSchema,
371 CosmwasmExt,
372)]
373#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryNFTsResponse")]
374pub struct QueryNfTsResponse {
375 #[prost(message, repeated, tag = "1")]
377 pub nfts: ::prost::alloc::vec::Vec<Nft>,
378 #[prost(message, optional, tag = "2")]
380 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
381}
382#[allow(clippy::derive_partial_eq_without_eq)]
384#[derive(
385 Clone,
386 PartialEq,
387 Eq,
388 ::prost::Message,
389 ::serde::Serialize,
390 ::serde::Deserialize,
391 ::schemars::JsonSchema,
392 CosmwasmExt,
393)]
394#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryNFTRequest")]
395#[proto_query(path = "/cosmos.nft.v1beta1.Query/NFT", response_type = QueryNftResponse)]
396pub struct QueryNftRequest {
397 #[prost(string, tag = "1")]
399 #[serde(alias = "classID")]
400 pub class_id: ::prost::alloc::string::String,
401 #[prost(string, tag = "2")]
403 #[serde(alias = "ID")]
404 pub id: ::prost::alloc::string::String,
405}
406#[allow(clippy::derive_partial_eq_without_eq)]
408#[derive(
409 Clone,
410 PartialEq,
411 Eq,
412 ::prost::Message,
413 ::serde::Serialize,
414 ::serde::Deserialize,
415 ::schemars::JsonSchema,
416 CosmwasmExt,
417)]
418#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryNFTResponse")]
419pub struct QueryNftResponse {
420 #[prost(message, optional, tag = "1")]
422 pub nft: ::core::option::Option<Nft>,
423}
424#[allow(clippy::derive_partial_eq_without_eq)]
426#[derive(
427 Clone,
428 PartialEq,
429 Eq,
430 ::prost::Message,
431 ::serde::Serialize,
432 ::serde::Deserialize,
433 ::schemars::JsonSchema,
434 CosmwasmExt,
435)]
436#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryClassRequest")]
437#[proto_query(
438 path = "/cosmos.nft.v1beta1.Query/Class",
439 response_type = QueryClassResponse
440)]
441pub struct QueryClassRequest {
442 #[prost(string, tag = "1")]
444 #[serde(alias = "classID")]
445 pub class_id: ::prost::alloc::string::String,
446}
447#[allow(clippy::derive_partial_eq_without_eq)]
449#[derive(
450 Clone,
451 PartialEq,
452 Eq,
453 ::prost::Message,
454 ::serde::Serialize,
455 ::serde::Deserialize,
456 ::schemars::JsonSchema,
457 CosmwasmExt,
458)]
459#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryClassResponse")]
460pub struct QueryClassResponse {
461 #[prost(message, optional, tag = "1")]
463 pub class: ::core::option::Option<Class>,
464}
465#[allow(clippy::derive_partial_eq_without_eq)]
467#[derive(
468 Clone,
469 PartialEq,
470 Eq,
471 ::prost::Message,
472 ::serde::Serialize,
473 ::serde::Deserialize,
474 ::schemars::JsonSchema,
475 CosmwasmExt,
476)]
477#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryClassesRequest")]
478#[proto_query(
479 path = "/cosmos.nft.v1beta1.Query/Classes",
480 response_type = QueryClassesResponse
481)]
482pub struct QueryClassesRequest {
483 #[prost(message, optional, tag = "1")]
485 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
486}
487#[allow(clippy::derive_partial_eq_without_eq)]
489#[derive(
490 Clone,
491 PartialEq,
492 Eq,
493 ::prost::Message,
494 ::serde::Serialize,
495 ::serde::Deserialize,
496 ::schemars::JsonSchema,
497 CosmwasmExt,
498)]
499#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryClassesResponse")]
500pub struct QueryClassesResponse {
501 #[prost(message, repeated, tag = "1")]
503 pub classes: ::prost::alloc::vec::Vec<Class>,
504 #[prost(message, optional, tag = "2")]
506 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
507}
508#[allow(clippy::derive_partial_eq_without_eq)]
510#[derive(
511 Clone,
512 PartialEq,
513 Eq,
514 ::prost::Message,
515 ::serde::Serialize,
516 ::serde::Deserialize,
517 ::schemars::JsonSchema,
518 CosmwasmExt,
519)]
520#[proto_message(type_url = "/cosmos.nft.v1beta1.MsgSend")]
521pub struct MsgSend {
522 #[prost(string, tag = "1")]
524 #[serde(alias = "classID")]
525 pub class_id: ::prost::alloc::string::String,
526 #[prost(string, tag = "2")]
528 #[serde(alias = "ID")]
529 pub id: ::prost::alloc::string::String,
530 #[prost(string, tag = "3")]
532 pub sender: ::prost::alloc::string::String,
533 #[prost(string, tag = "4")]
535 pub receiver: ::prost::alloc::string::String,
536}
537#[allow(clippy::derive_partial_eq_without_eq)]
539#[derive(
540 Clone,
541 PartialEq,
542 Eq,
543 ::prost::Message,
544 ::serde::Serialize,
545 ::serde::Deserialize,
546 ::schemars::JsonSchema,
547 CosmwasmExt,
548)]
549#[proto_message(type_url = "/cosmos.nft.v1beta1.MsgSendResponse")]
550pub struct MsgSendResponse {}
551pub struct NftQuerier<'a, Q: cosmwasm_std::CustomQuery> {
552 querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
553}
554impl<'a, Q: cosmwasm_std::CustomQuery> NftQuerier<'a, Q> {
555 pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
556 Self { querier }
557 }
558 pub fn balance(
559 &self,
560 class_id: ::prost::alloc::string::String,
561 owner: ::prost::alloc::string::String,
562 ) -> Result<QueryBalanceResponse, cosmwasm_std::StdError> {
563 QueryBalanceRequest { class_id, owner }.query(self.querier)
564 }
565 pub fn owner(
566 &self,
567 class_id: ::prost::alloc::string::String,
568 id: ::prost::alloc::string::String,
569 ) -> Result<QueryOwnerResponse, cosmwasm_std::StdError> {
570 QueryOwnerRequest { class_id, id }.query(self.querier)
571 }
572 pub fn supply(
573 &self,
574 class_id: ::prost::alloc::string::String,
575 ) -> Result<QuerySupplyResponse, cosmwasm_std::StdError> {
576 QuerySupplyRequest { class_id }.query(self.querier)
577 }
578 pub fn nf_ts(
579 &self,
580 class_id: ::prost::alloc::string::String,
581 owner: ::prost::alloc::string::String,
582 pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
583 ) -> Result<QueryNfTsResponse, cosmwasm_std::StdError> {
584 QueryNfTsRequest {
585 class_id,
586 owner,
587 pagination,
588 }
589 .query(self.querier)
590 }
591 pub fn nft(
592 &self,
593 class_id: ::prost::alloc::string::String,
594 id: ::prost::alloc::string::String,
595 ) -> Result<QueryNftResponse, cosmwasm_std::StdError> {
596 QueryNftRequest { class_id, id }.query(self.querier)
597 }
598 pub fn class(
599 &self,
600 class_id: ::prost::alloc::string::String,
601 ) -> Result<QueryClassResponse, cosmwasm_std::StdError> {
602 QueryClassRequest { class_id }.query(self.querier)
603 }
604 pub fn classes(
605 &self,
606 pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
607 ) -> Result<QueryClassesResponse, cosmwasm_std::StdError> {
608 QueryClassesRequest { pagination }.query(self.querier)
609 }
610}