View Source Hyperliquid.Api.Exchange.SendToEvmWithData (hyperliquid v0.3.1)
Send tokens from core to EVM with a custom data payload.
See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint
Summary
Functions
Send tokens from core to EVM with a custom data payload.
Functions
Link to this function
request(token, amount, source_dex, destination_recipient, destination_chain_id, gas_limit, data, opts \\ [])
View SourceSend tokens from core to EVM with a custom data payload.
Parameters
token: Token identifieramount: Amount to send (string)source_dex: Source DEXdestination_recipient: Destination EVM addressdestination_chain_id: Destination chain ID (integer)gas_limit: Gas limit (integer)data: Hex-encoded calldataopts: Optional parameters
Options
:private_key- Private key for signing (falls back to config):expected_address- Expected checksummed Ethereum address (0x-prefixed). When provided, validates that the private key derives to this address, preventing accidental use of an agent sub-key for a funds transfer.:address_encoding- "hex" (default) or "base58"
Returns
{:ok, response}- Transfer result{:error, term()}- Error details