Skip to main content

Module send

Module send 

Source
Expand description

Money moved on the venue: the actions that send USDC and spot tokens and move them between an account’s own balances, the plan that turns a move into exactly what is signed, amounts in the form that is hashed, a spot token as a transfer names it, and the check on a recipient.

Re-exports§

pub use actions::AgentSendAsset;
pub use actions::PERP_DEX;
pub use actions::SPOT_DEX;
pub use actions::SendAsset;
pub use actions::SpotOut;
pub use actions::SpotSend;
pub use actions::UsdClassTransfer;
pub use actions::UsdSend;
pub use actions::Withdraw3;
pub use amount::Amount;
pub use amount::BadAmount;
pub use amount::MAX_DECIMALS;
pub use amount::clean_amount;
pub use check::PreTransferCheck;
pub use check::pre_transfer_check;
pub use check::pre_transfer_check_request;
pub use plan::Balance;
pub use plan::Change;
pub use plan::Ctx;
pub use plan::Effect;
pub use plan::Plan;
pub use plan::Refused;
pub use plan::key;
pub use token::EvmContract;
pub use token::HYPE_EVM_DECIMALS;
pub use token::SpotToken;

Modules§

actions
The actions that move money, keys in the @nktkas/hyperliquid 0.33.2 order, amounts in normal form, addresses lowercase. The user-signed ones are signed by the account’s own wallet only; AgentSendAsset, an L1 action, by an agent for its master.
amount
Amounts the venue is asked to move: plain decimals, at most eight places, never zero, in the normal form that is hashed ("12.50" is "12.5", "007" is "7").
check
What the venue says about a recipient before a send (preTransferCheck): whether it is sanctioned, whether it exists, and the fee a first transfer to it pays.
plan
From a move’s typed values to exactly what is signed: the action, its nonce, who may sign it, and the balance that should change once it lands. An agent’s signature on a user-signed action recovers to the agent, which holds nothing, so Signers::Main refuses it before signing.
token
A spot token as a transfer names it, read from the caller’s spotMeta: its NAME:0x.. wire form, whether it is the network’s HYPE (whose index and id differ between the networks), and where and at how many places it crosses to HyperEVM.