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

Link to this function

request(token, amount, source_dex, destination_recipient, destination_chain_id, gas_limit, data, opts \\ [])

View Source

Send tokens from core to EVM with a custom data payload.

Parameters

  • token: Token identifier
  • amount: Amount to send (string)
  • source_dex: Source DEX
  • destination_recipient: Destination EVM address
  • destination_chain_id: Destination chain ID (integer)
  • gas_limit: Gas limit (integer)
  • data: Hex-encoded calldata
  • opts: 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