View Source Hyperliquid.Rpc.Web3 (hyperliquid v0.2.2)
Web3-related JSON-RPC methods for Hyperliquid EVM.
Usage
alias Hyperliquid.Rpc.Web3
{:ok, version} = Web3.client_version()
Summary
Types
@type opts() :: Hyperliquid.Transport.Rpc.rpc_opts()
@type result() :: Hyperliquid.Transport.Rpc.rpc_result()
Functions
Get the current client version.
Returns
{:ok, string}- Client version string
Example
{:ok, "Hyperliquid/v1.0.0"} = Web3.client_version()
Get the Keccak-256 hash of the given data.
Parameters
data: Data to hash as hex string
Returns
{:ok, hex_string}- Keccak-256 hash
Example
{:ok, hash} = Web3.sha3("0x68656c6c6f")