Enum secret_toolkit_snip721::handle::HandleMsg
source · pub enum HandleMsg {
Show 21 variants
TransferNft {
recipient: String,
token_id: String,
memo: Option<String>,
padding: Option<String>,
},
SendNft {
contract: String,
token_id: String,
msg: Option<Binary>,
memo: Option<String>,
padding: Option<String>,
},
Approve {
spender: String,
token_id: String,
expires: Option<Expiration>,
padding: Option<String>,
},
Revoke {
spender: String,
token_id: String,
padding: Option<String>,
},
ApproveAll {
operator: String,
expires: Option<Expiration>,
padding: Option<String>,
},
RevokeAll {
operator: String,
padding: Option<String>,
},
SetWhitelistedApproval {
address: String,
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<String>,
public_metadata: Option<Metadata>,
private_metadata: Option<Metadata>,
memo: Option<String>,
padding: Option<String>,
},
AddMinters {
minters: Vec<String>,
padding: Option<String>,
},
RemoveMinters {
minters: Vec<String>,
padding: Option<String>,
},
SetMinters {
minters: Vec<String>,
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
Fields
transfer a token
SendNft
Fields
send a token and call receiving contract’s (Batch)ReceiveNft
Approve
Fields
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
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
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
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
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
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
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
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
Reveal the private metadata of a sealed token and mark the token as having been unwrapped
Implementations§
source§impl HandleMsg
impl HandleMsg
sourcepub fn to_cosmos_msg(
&self,
block_size: usize,
code_hash: String,
contract_addr: String,
send_amount: Option<Uint128>
) -> StdResult<CosmosMsg>
pub fn to_cosmos_msg( &self, block_size: usize, code_hash: String, contract_addr: String, send_amount: Option<Uint128> ) -> StdResult<CosmosMsg>
Returns a StdResult
Arguments
block_size
- pad the message to blocks of this sizecode_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