How to deposit and withdraw from Hyperliquid to any Relay Chain
chainId=999
. This document details how to deposit and withdraw from Hyperliquid within your app.
Action | Parameter | Input | Description |
---|---|---|---|
Deposit to Hyperliquid | toChainId | 1337 | Hyperliquid Chain Id |
recipient | Hyperliquid Address | ||
Withdrawals from Hyperliquid | useDepositAddress*** | true | |
fromChainId | 1337 | Hyperliquid Chain Id |
useDepositAddress:true
is a required param do to the current structure of hypercore.
clearinghouseState
as the type
. Then you can read the withdrawable
property which should be a USD value in human readable format.
domain
- static except for the chainId
.chainId
is the active chain id in the connected wallet. This is the chain id that will sign the message. Next up is the types. These are also static and can be hardcoded.primaryType
should match the name of the first type.value
dynamic execution datasignatureChainId
is the hex representation of the aforementioned active chain id.“ok”
.
To see how an example you can have a look at our publicly available SDK.