wearable_collection/
msgs.rs1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3use cosmwasm_std::{Binary, Coin};
4
5#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
6#[serde(rename_all = "snake_case")]
7pub enum ExecuteMsg {
8 ComposeNft {
10 target_token_id: String,
11 parts_token_ids: Vec<String>,
12 },
13
14 DecomposeNft {
16 target_token_id: String,
17 parts_token_ids: Vec<String>,
18 },
19
20 DecomposeAll {
22 target_token_id: String,
23 },
24
25 TransferComposedNft {
28 recipient: String,
29 token_id: String
30 },
31
32 SendComposedNft {
36 contract: String,
37 token_id: String,
38 msg: Binary,
39 },
40
41 SetWithdrawAddress { address: String },
43 RemoveWithdrawAddress {},
45 WithdrawFunds { amount: Coin },
48}
49
50#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
51#[serde(rename_all = "snake_case")]
52pub enum QueryMsg {
53 ChildDependentTokenInfo {
54 token_id: String
55 },
56
57 ParentDependentTokenInfo {
58 token_id: String
59 },
60
61 GetWithdrawAddress {},
62}
63
64#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug, Default)]
65pub struct Trait {
66 pub display_type: Option<String>,
67 pub trait_type: String,
68 pub value: String,
69}
70
71#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug, Default)]
72pub struct Metadata {
73 pub image: Option<String>,
74 pub image_data: Option<String>,
75 pub external_url: Option<String>,
76 pub description: Option<String>,
77 pub name: Option<String>,
78 pub attributes: Option<Vec<Trait>>,
79 pub background_color: Option<String>,
80 pub animation_url: Option<String>,
81 pub youtube_url: Option<String>,
82}
83
84#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
85pub struct NftInfoResponse {
86 pub token_uri: Option<String>,
90 pub extension: Option<Metadata>,
92 pub dependent_tokens: Option<Vec<String>>,
94}