#[non_exhaustive]pub enum TypedAction {
Show 41 variants
SendAsset {
metaflux_chain: String,
source_dex: u32,
destination_dex: u32,
asset: u32,
destination: Address,
amount: String,
to_perp: bool,
nonce: u64,
},
UsdClassTransfer {
metaflux_chain: String,
ntl: String,
to_perp: bool,
nonce: u64,
},
Withdraw {
metaflux_chain: String,
asset: u32,
amount: String,
destination_chain_id: u32,
use_cctp: bool,
nonce: u64,
},
ApproveAgent {
metaflux_chain: String,
agent_address: Address,
agent_name: String,
expires_at_ms: u64,
nonce: u64,
},
SetReferrer {
metaflux_chain: String,
referrer: Address,
nonce: u64,
},
ApproveBuilderFee {
metaflux_chain: String,
builder: Address,
max_fee_bps: u16,
nonce: u64,
},
SetDisplayName {
metaflux_chain: String,
display_name: String,
nonce: u64,
},
SetPositionMode {
metaflux_chain: String,
hedge: bool,
nonce: u64,
},
UserPortfolioMargin {
metaflux_chain: String,
enroll: bool,
nonce: u64,
},
ConvertToMultiSigUser {
metaflux_chain: String,
signers: Vec<Address>,
threshold: u32,
nonce: u64,
},
UpdateLeverage {
metaflux_chain: String,
asset: u32,
leverage: u32,
is_isolated: bool,
nonce: u64,
},
ClaimRewards {
metaflux_chain: String,
validator: Address,
nonce: u64,
},
LinkStakingUser {
metaflux_chain: String,
target: Address,
nonce: u64,
},
CreateVault {
metaflux_chain: String,
name: String,
lock_period_secs: u64,
kind: u8,
nonce: u64,
},
VaultModify {
metaflux_chain: String,
vault_id: u64,
new_name: String,
nonce: u64,
},
SpotMarginClose {
metaflux_chain: String,
pair: u32,
limit_px: u64,
nonce: u64,
},
SetMetaliquiditySet {
metaflux_chain: String,
account: Address,
allowed: bool,
nonce: u64,
},
RegisterMetaliquidityOperator {
metaflux_chain: String,
vault_id: u64,
operator: Address,
allowed: bool,
expires_at_ms: u64,
nonce: u64,
},
UpdateIsolatedMargin {
metaflux_chain: String,
asset: u32,
delta: String,
nonce: u64,
},
TopUpIsolatedOnlyMargin {
metaflux_chain: String,
asset: u32,
amount: String,
nonce: u64,
},
TokenDelegate {
metaflux_chain: String,
validator: Address,
amount: String,
is_undelegate: bool,
nonce: u64,
},
VaultTransfer {
metaflux_chain: String,
vault_id: u64,
deposit: bool,
amount: String,
nonce: u64,
},
VaultWithdraw {
metaflux_chain: String,
vault_id: u64,
shares: String,
nonce: u64,
},
SpotMarginDeposit {
metaflux_chain: String,
pair: u32,
amount: String,
nonce: u64,
},
SpotMarginWithdraw {
metaflux_chain: String,
pair: u32,
amount: String,
nonce: u64,
},
SpotMarginOpen {
metaflux_chain: String,
pair: u32,
size: u64,
limit_px: u64,
borrow: String,
nonce: u64,
},
EarnDeposit {
metaflux_chain: String,
asset: u32,
amount: String,
nonce: u64,
},
EarnWithdraw {
metaflux_chain: String,
asset: u32,
shares: String,
nonce: u64,
},
AgentSetAbstraction {
metaflux_chain: String,
user: Address,
kind: u8,
value: String,
nonce: u64,
},
MbWithdraw {
metaflux_chain: String,
chain: u8,
asset: u32,
amount: u64,
dst_addr: String,
nonce: u64,
},
CoreEvmTransfer {
metaflux_chain: String,
amount: String,
to_evm: bool,
destination: Address,
asset: u32,
nonce: u64,
},
CreateSubAccount {
metaflux_chain: String,
name: String,
has_explicit_index: bool,
explicit_index: u32,
shared_stp_group: bool,
nonce: u64,
},
SubAccountTransfer {
metaflux_chain: String,
sub_index: u32,
deposit: bool,
amount: String,
nonce: u64,
},
SubAccountSpotTransfer {
metaflux_chain: String,
sub_index: u32,
token: u32,
deposit: bool,
amount: String,
nonce: u64,
},
CDeposit {
metaflux_chain: String,
amount: String,
nonce: u64,
},
CWithdraw {
metaflux_chain: String,
amount: String,
nonce: u64,
},
UserDexAbstraction {
metaflux_chain: String,
enabled: bool,
nonce: u64,
},
UserSetAbstraction {
metaflux_chain: String,
kind: u8,
value: String,
nonce: u64,
},
PriorityBid {
metaflux_chain: String,
asset: u32,
bid_bps: u16,
nonce: u64,
},
CancelAllOrders {
metaflux_chain: String,
has_asset: bool,
asset: u32,
nonce: u64,
},
SubmitEncryptedOrder {
metaflux_chain: String,
ciphertext: Vec<u8>,
commitment: [u8; 32],
threshold: u8,
target_block: u64,
reveal_deadline_ms: u64,
nonce: u64,
},
}Expand description
One wallet-signed action per variant, carrying exactly its EIP-712 fields in
declared (= encodeType = message) order.
These are the actions the node accepts under the typed signing scheme.
Decimal magnitudes are String and hashed verbatim — set them to the
canonical text you intend to send on the wire.
The leading metaflux_chain tag is filled in for you when you build a
variant through crate::rest::exchange::Exchange; if you construct one
directly, use metaflux_chain_tag for the target chain id.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SendAsset
SendAsset(string metafluxChain,uint32 sourceDex,uint32 destinationDex,uint32 asset,address destination,string amount,bool toPerp,uint64 nonce)
Fields
UsdClassTransfer
UsdClassTransfer(string metafluxChain,string ntl,bool toPerp,uint64 nonce)
Fields
Withdraw
Withdraw(string metafluxChain,uint32 asset,string amount,uint32 destinationChainId,bool useCctp,uint64 nonce)
Fields
ApproveAgent
ApproveAgent(string metafluxChain,address agentAddress,string agentName,uint64 expiresAtMs,uint64 nonce)
Fields
SetReferrer
SetReferrer(string metafluxChain,address referrer,uint64 nonce)
Fields
ApproveBuilderFee
ApproveBuilderFee(string metafluxChain,address builder,uint16 maxFeeBps,uint64 nonce)
Fields
SetDisplayName
SetDisplayName(string metafluxChain,string displayName,uint64 nonce)
Fields
SetPositionMode
SetPositionMode(string metafluxChain,bool hedge,uint64 nonce)
UserPortfolioMargin
UserPortfolioMargin(string metafluxChain,bool enroll,uint64 nonce)
Fields
ConvertToMultiSigUser
ConvertToMultiSigUser(string metafluxChain,address[] signers,uint32 threshold,uint64 nonce)
Fields
UpdateLeverage
UpdateLeverage(string metafluxChain,uint32 asset,uint32 leverage,bool isIsolated,uint64 nonce)
Fields
ClaimRewards
ClaimRewards(string metafluxChain,address validator,uint64 nonce). The
zero address means “claim all”.
Fields
validator: AddressValidator address, or Address::ZERO to claim everything.
LinkStakingUser
LinkStakingUser(string metafluxChain,address target,uint64 nonce)
Fields
CreateVault
CreateVault(string metafluxChain,string name,uint64 lockPeriodSecs,uint8 kind,uint64 nonce)
Fields
VaultModify
VaultModify(string metafluxChain,uint64 vaultId,string newName,uint64 nonce)
Fields
SpotMarginClose
SpotMarginClose(string metafluxChain,uint32 pair,uint64 limitPx,uint64 nonce)
Fields
SetMetaliquiditySet
SetMetaliquiditySet(string metafluxChain,address account,bool allowed,uint64 nonce)
Fields
RegisterMetaliquidityOperator
RegisterMetaliquidityOperator(string metafluxChain,uint64 vaultId,address operator,bool allowed,uint64 expiresAtMs,uint64 nonce)
Fields
UpdateIsolatedMargin
UpdateIsolatedMargin(string metafluxChain,uint32 asset,string delta,uint64 nonce)
Fields
TopUpIsolatedOnlyMargin
TopUpIsolatedOnlyMargin(string metafluxChain,uint32 asset,string amount,uint64 nonce)
Fields
TokenDelegate
TokenDelegate(string metafluxChain,address validator,string amount,bool isUndelegate,uint64 nonce)
Fields
VaultTransfer
VaultTransfer(string metafluxChain,uint64 vaultId,bool deposit,string amount,uint64 nonce)
Fields
VaultWithdraw
VaultWithdraw(string metafluxChain,uint64 vaultId,string shares,uint64 nonce)
Fields
Share count as a canonical decimal string.
SpotMarginDeposit
SpotMarginDeposit(string metafluxChain,uint32 pair,string amount,uint64 nonce)
Fields
SpotMarginWithdraw
SpotMarginWithdraw(string metafluxChain,uint32 pair,string amount,uint64 nonce)
Fields
SpotMarginOpen
SpotMarginOpen(string metafluxChain,uint32 pair,uint64 size,uint64 limitPx,string borrow,uint64 nonce)
Fields
EarnDeposit
EarnDeposit(string metafluxChain,uint32 asset,string amount,uint64 nonce)
Fields
EarnWithdraw
EarnWithdraw(string metafluxChain,uint32 asset,string shares,uint64 nonce)
Fields
Share count as a canonical decimal string.
AgentSetAbstraction
AgentSetAbstraction(string metafluxChain,address user,uint8 kind,string value,uint64 nonce)
Fields
MbWithdraw
MbWithdraw(string metafluxChain,uint8 chain,uint32 asset,uint64 amount,string dstAddr,uint64 nonce)
The signed chain is the mapped uint8 (0 = Solana, 1 = Base,
2 = Arbitrum); the POST params.chain carries the string name.
Fields
CoreEvmTransfer
CoreEvmTransfer(string metafluxChain,string amount,bool toEvm,address destination,uint32 asset,uint64 nonce)
Fields
CreateSubAccount
CreateSubAccount(string metafluxChain,string name,bool hasExplicitIndex,uint32 explicitIndex,bool sharedStpGroup,uint64 nonce)
The optional explicit index flattens to a presence bool + value (0
when absent).
Fields
Share the parent’s STP group.
SubAccountTransfer
SubAccountTransfer(string metafluxChain,uint32 subIndex,bool deposit,string amount,uint64 nonce)
Fields
SubAccountSpotTransfer
SubAccountSpotTransfer(string metafluxChain,uint32 subIndex,uint32 token,bool deposit,string amount,uint64 nonce)
Fields
CDeposit
CDeposit(string metafluxChain,string amount,uint64 nonce) — spot MTF → free staking pool.
Fields
CWithdraw
CWithdraw(string metafluxChain,string amount,uint64 nonce) — free staking pool → spot MTF.
Fields
UserDexAbstraction
UserDexAbstraction(string metafluxChain,bool enabled,uint64 nonce)
Fields
UserSetAbstraction
UserSetAbstraction(string metafluxChain,uint8 kind,string value,uint64 nonce)
Fields
PriorityBid
PriorityBid(string metafluxChain,uint32 asset,uint16 bidBps,uint64 nonce)
Fields
CancelAllOrders
CancelAllOrders(string metafluxChain,bool hasAsset,uint32 asset,uint64 nonce)
The optional asset filter flattens to a presence bool + value (0 when
“all assets”).
Fields
SubmitEncryptedOrder
SubmitEncryptedOrder(string metafluxChain,bytes ciphertext,bytes32 commitment,uint8 threshold,uint64 targetBlock,uint64 revealDeadlineMs,uint64 nonce)
ciphertext hashes as EIP-712 bytes (keccak256(raw)); commitment
is a bytes32 carried verbatim into one word.
Fields
Implementations§
Trait Implementations§
Source§impl Clone for TypedAction
impl Clone for TypedAction
Source§fn clone(&self) -> TypedAction
fn clone(&self) -> TypedAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TypedAction
impl Debug for TypedAction
impl Eq for TypedAction
Source§impl PartialEq for TypedAction
impl PartialEq for TypedAction
Source§fn eq(&self, other: &TypedAction) -> bool
fn eq(&self, other: &TypedAction) -> bool
self and other values to be equal, and is used by ==.