pub enum TxPayload {
Show 18 variants
TokenCreate {
symbol: String,
decimals: u8,
master_authority: Address,
is_private: bool,
clawback_enabled: bool,
name: String,
},
TokenTransfer {
value: String,
recipient: Address,
token: Option<Address>,
},
TokenClawback {
from: Address,
recipient: Address,
value: String,
token: Address,
},
TokenGrantAuthority {
authority_type: String,
authority_address: Address,
value: Option<String>,
token: Address,
},
TokenRevokeAuthority {
authority_type: String,
authority_address: Address,
value: Option<String>,
token: Address,
},
TokenBlacklistAccount {
address: Address,
token: Address,
},
TokenWhitelistAccount {
address: Address,
token: Address,
},
TokenMint {
value: String,
recipient: Address,
token: Address,
},
TokenBridgeAndMint {
recipient: Address,
value: String,
source_chain_id: u64,
source_tx_hash: String,
bridge_metadata: String,
token: Address,
},
TokenBurn {
value: String,
token: Address,
},
TokenBurnAndBridge {
value: String,
sender: Address,
destination_chain_id: u64,
destination_address: String,
escrow_fee: String,
bridge_metadata: String,
bridge_param: Bytes,
token: Address,
},
TokenCloseAccount {
token: Address,
},
TokenPause {
token: Address,
},
TokenUnpause {
token: Address,
},
TokenUpdateMetadata {
metadata: TokenMetadata,
token: Address,
},
CreateMultiSig {
signers: Vec<MultiSigSignerInfo>,
threshold: u16,
multisig_address: Address,
},
Raw {
input: Bytes,
token: Address,
},
Empty,
}Expand description
Instructions supported by mint token
Variants§
TokenCreate
Create a new mint token. After the token is created, the
master_authority of the token is initialized with the provided
master_authority parameter.
Refer to TokenInstruction::CreateNewToken.
Fields
The master authority of the token.
is_private: booltrue if this token is private and only whitelisted addresses can
operate with the tokens
TokenTransfer
Transfer tokens from one account to another. The signer of message must be the owner of the source account. Otherwise the transaction may fail.
Refer to TokenInstruction::Transfer.
Fields
TokenClawback
Claw back tokens from a frozen account. The signer must be an issuer clawback authority and the source account must have been frozen via list management.
Refer to TokenInstruction::Clawback.
Fields
TokenGrantAuthority
Grant authority to another account. The signer of message must be the
Mint’s master_authority. Otherwise the transaction may fail.
Refer to TokenInstruction::GrantAuthority.
Fields
The type of authority to update.
The new authority address to grant or revoke.
TokenRevokeAuthority
Revoke authority to another account. The signer of message must be the
Mint’s master_authority. Otherwise the transaction may fail.
Refer to TokenInstruction::RevokeAuthority.
Fields
The type of authority to update.
The new authority
TokenBlacklistAccount
Add the account to the blacklisted accounts. The signer of message must
be the Mint’s blacklist_authority. Otherwise the transaction may fail.
Refer to TokenInstruction::BlacklistAccount.
TokenWhitelistAccount
Whitelist the a previously blacklisted account. The signer of message
must be the Mint’s blacklist_authority. Otherwise the transaction may
fail.
Refer to TokenInstruction::WhitelistAccount.
TokenMint
Mints new tokens to an account. The signer of the message must be Mint’s
mint_authority. Otherwise the transaction may fail.
Refer to TokenInstruction::MintTo.
Fields
TokenBridgeAndMint
Bridge tokens from another chain and mint them to an account. This instruction creates new tokens representing bridged assets. The signer must have bridge authority.
Refer to TokenInstruction::BridgeAndMint.
Fields
TokenBurn
Burns tokens by removing them from an account. The signer of the message
must be Mint’s mint_burn authority. Otherwise the transaction may
fail.
Refer to TokenInstruction::BurnFromAccount.
TokenBurnAndBridge
Burn tokens and initiate bridge to another chain. This instruction burns tokens and records bridge information for the destination chain. The signer must be the account owner or have appropriate authority.
Refer to TokenInstruction::BurnAndBridge.
Fields
sender: AddressThis field is obsolete and will be ignored. The tokens will be burnt from the signer’s wallet.
TokenCloseAccount
Close an account. Note that an account can be closed only if the token balance is zero.
Refer to TokenInstruction::CloseAccount.
TokenPause
Pause all transactions associated with the Mint. The signer of the
message must be the Mint’s pause_authority. Otherwise the
transaction may fail.
Refer to TokenInstruction::Pause.
TokenUnpause
Unpause transactions for the Mint. The signer of the message must be the
Mint’s pause_authority. Otherwise the transaction may fail.
Refer to TokenInstruction::Unpause.
TokenUpdateMetadata
Update token metadata. The signer of the message must be the Mint’s
metadata_update_authority. Otherwise the transaction may fail.
Refer to TokenInstruction::UpdateMetadata.
CreateMultiSig
Create a new multi-signature account. The account is controlled by multiple signers with a defined threshold for transaction approval.
Refer to MultiSigInstruction::CreateAccount.
Fields
signers: Vec<MultiSigSignerInfo>List of authorized signers with their weights
Raw
Raw transaction data, all unsupported instructions are encoded as raw data.
This variant is used for all instructions that are not supported by the current version of the API. Just for compatibility.
Empty
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TxPayload
impl<'de> Deserialize<'de> for TxPayload
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TxPayload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TxPayload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for TxPayload
impl Serialize for TxPayload
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for TxPayload
impl StructuralPartialEq for TxPayload
Auto Trait Implementations§
impl !Freeze for TxPayload
impl RefUnwindSafe for TxPayload
impl Send for TxPayload
impl Sync for TxPayload
impl Unpin for TxPayload
impl UnwindSafe for TxPayload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more