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

Functions

Get the current client version.

Get the Keccak-256 hash of the given data.

Types

Functions

Link to this function

client_version(opts \\ [])

View Source
@spec client_version(opts()) :: result()

Get the current client version.

Returns

  • {:ok, string} - Client version string

Example

{:ok, "Hyperliquid/v1.0.0"} = Web3.client_version()
@spec sha3(String.t(), opts()) :: result()

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")