Enum secret_toolkit_snip721::handle::HandleMsg
source · [−]pub enum HandleMsg {
Show 21 variants
TransferNft {
recipient: HumanAddr,
token_id: String,
memo: Option<String>,
padding: Option<String>,
},
SendNft {
contract: HumanAddr,
token_id: String,
msg: Option<Binary>,
memo: Option<String>,
padding: Option<String>,
},
Approve {
spender: HumanAddr,
token_id: String,
expires: Option<Expiration>,
padding: Option<String>,
},
Revoke {
spender: HumanAddr,
token_id: String,
padding: Option<String>,
},
ApproveAll {
operator: HumanAddr,
expires: Option<Expiration>,
padding: Option<String>,
},
RevokeAll {
operator: HumanAddr,
padding: Option<String>,
},
SetWhitelistedApproval {
address: HumanAddr,
token_id: Option<String>,
view_owner: Option<AccessLevel>,
view_private_metadata: Option<AccessLevel>,
transfer: Option<AccessLevel>,
expires: Option<Expiration>,
padding: Option<String>,
},
RegisterReceiveNft {
code_hash: String,
also_implements_batch_receive_nft: Option<bool>,
padding: Option<String>,
},
SetViewingKey {
key: String,
padding: Option<String>,
},
MintNft {
token_id: Option<String>,
owner: Option<HumanAddr>,
public_metadata: Option<Metadata>,
private_metadata: Option<Metadata>,
memo: Option<String>,
padding: Option<String>,
},
AddMinters {
minters: Vec<HumanAddr>,
padding: Option<String>,
},
RemoveMinters {
minters: Vec<HumanAddr>,
padding: Option<String>,
},
SetMinters {
minters: Vec<HumanAddr>,
padding: Option<String>,
},
SetMetadata {
token_id: String,
public_metadata: Option<Metadata>,
private_metadata: Option<Metadata>,
padding: Option<String>,
},
BatchMintNft {
mints: Vec<Mint>,
padding: Option<String>,
},
BatchTransferNft {
transfers: Vec<Transfer>,
padding: Option<String>,
},
BatchSendNft {
sends: Vec<Send>,
padding: Option<String>,
},
BurnNft {
token_id: String,
memo: Option<String>,
padding: Option<String>,
},
BatchBurnNft {
burns: Vec<Burn>,
padding: Option<String>,
},
SetGlobalApproval {
token_id: Option<String>,
view_owner: Option<AccessLevel>,
view_private_metadata: Option<AccessLevel>,
expires: Option<Expiration>,
padding: Option<String>,
},
Reveal {
token_id: String,
padding: Option<String>,
},
}
Expand description
SNIP-721 contract handle messages
Variants
TransferNft
transfer a token
SendNft
send a token and call receiving contract’s (Batch)ReceiveNft
Approve
Fields
spender: HumanAddr
address being granted the permission
token_id: String
id of the token that the spender can transfer
expires: Option<Expiration>
optional expiration for this approval
gives the spender permission to transfer the specified token. If you are the owner
of the token, you can use SetWhitelistedApproval
to accomplish the same thing. If
you are an operator, you can only use Approve
Revoke
Fields
spender: HumanAddr
address whose permission is revoked
token_id: String
id of the token that the spender can no longer transfer
revokes the spender’s permission to transfer the specified token. If you are the owner
of the token, you can use SetWhitelistedApproval
to accomplish the same thing. If you
are an operator, you can only use Revoke, but you can not revoke the transfer approval
of another operator
ApproveAll
Fields
operator: HumanAddr
address being granted permission to transfer
expires: Option<Expiration>
optional expiration for this approval
provided for cw721 compliance, but can be done with SetWhitelistedApproval
…
gives the operator permission to transfer all of the message sender’s tokens
RevokeAll
Fields
operator: HumanAddr
address whose permissions are revoked
provided for cw721 compliance, but can be done with SetWhitelistedApproval
…
revokes the operator’s permission to transfer any of the message sender’s tokens
SetWhitelistedApproval
Fields
address: HumanAddr
address being granted/revoked permission
view_owner: Option<AccessLevel>
optional permission level for viewing the owner
view_private_metadata: Option<AccessLevel>
optional permission level for viewing private metadata
transfer: Option<AccessLevel>
optional permission level for transferring
expires: Option<Expiration>
optional expiration
add/remove approval(s) for a specific address on the token(s) you own. Any permissions that are omitted will keep the current permission setting for that whitelist address
RegisterReceiveNft
Fields
code_hash: String
receving contract’s code hash
register that the message sending contract implements ReceiveNft and possibly BatchReceiveNft
SetViewingKey
set viewing key
MintNft
Fields
mint new token
AddMinters
Fields
add addresses with minting authority
RemoveMinters
Fields
revoke minting authority from addresses
SetMinters
Fields
define list of addresses with minting authority
SetMetadata
Fields
token_id: String
id of the token whose metadata should be updated
set the public and/or private metadata.
BatchMintNft
Fields
Mint multiple tokens
BatchTransferNft
Fields
transfer many tokens
BatchSendNft
Fields
send many tokens and call receiving contracts’ (Batch)ReceiveNft
BurnNft
Fields
token_id: String
token to burn
burn a token
BatchBurnNft
Fields
burn many tokens
SetGlobalApproval
Fields
view_owner: Option<AccessLevel>
optional permission level for viewing the owner
view_private_metadata: Option<AccessLevel>
optional permission level for viewing private metadata
expires: Option<Expiration>
optional expiration
add/remove approval(s) that whitelist everyone (makes public)
Reveal
Fields
token_id: String
id of the token to unwrap
Reveal the private metadata of a sealed token and mark the token as having been unwrapped
Implementations
sourceimpl HandleMsg
impl HandleMsg
sourcepub fn to_cosmos_msg(
&self,
block_size: usize,
callback_code_hash: String,
contract_addr: HumanAddr,
send_amount: Option<Uint128>
) -> StdResult<CosmosMsg>
pub fn to_cosmos_msg(
&self,
block_size: usize,
callback_code_hash: String,
contract_addr: HumanAddr,
send_amount: Option<Uint128>
) -> StdResult<CosmosMsg>
Returns a StdResult
Arguments
block_size
- pad the message to blocks of this sizecallback_code_hash
- String holding the code hash of the contract being calledcontract_addr
- address of the contract being calledsend_amount
- Optional Uint128 amount of native coin to send with the callback message NOTE: No SNIP721 messages send native coin, but the parameter is included in case that ever changes
Trait Implementations
impl StructuralPartialEq for HandleMsg
Auto Trait Implementations
impl RefUnwindSafe for HandleMsg
impl Send for HandleMsg
impl Sync for HandleMsg
impl Unpin for HandleMsg
impl UnwindSafe for HandleMsg
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more