View Source Hyperliquid.Api.Exchange.CValidatorAction (hyperliquid v0.2.2)

Perform validator management actions.

See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint

Summary

Functions

Perform validator management actions.

Functions

Link to this function

request(action_type, params, opts \\ [])

View Source

Perform validator management actions.

Parameters

  • private_key: Private key for signing (hex string)
  • action_type: Type of action (:delegate, :undelegate, :change_signer, :edit_validator)
  • params: Action-specific parameters
  • opts: Optional parameters

Returns

  • {:ok, response} - Action result
  • {:error, term()} - Error details

Examples

# Delegate to validator
{:ok, result} = CValidatorAction.request(private_key, :delegate,
  validator: "0x...",
  wei: 100_000_000
)

# Undelegate from validator
{:ok, result} = CValidatorAction.request(private_key, :undelegate,
  validator: "0x...",
  wei: 100_000_000
)