encode_spot_send

Documentation for eth_defi.hyperliquid.core_writer.encode_spot_send function.

encode_spot_send(destination, token_id, amount_wei)

Encode a CoreWriter spotSend action (action ID 6).

Sends tokens between HyperCore spot accounts.

Note

This does not bridge linked tokens back to HyperEVM. For Core -> HyperEVM USDC withdrawals use encode_send_asset() with the token’s system address as the destination.

Parameters
  • destination (Union[eth_typing.evm.HexAddress, str]) – Recipient address (typically the Safe address for bridging back).

  • token_id (int) – HyperCore token index (0 = USDC).

  • amount_wei (int) – Amount in HyperCore wei (uint64).

Returns

Raw action bytes for CoreWriter.sendRawAction().

Return type

bytes