pub enum HyperliquidNetwork {
Mainnet,
Testnet,
}Expand description
REST/WS endpoints, selectable at construction time. Mainnet is the
default; Testnet points at the official testnet replica
(api.hyperliquid-testnet.xyz) — real order-book mechanics, simulated
balances (faucet-funded). Configurable per Sho 2026-09-21: cleanest at
client construction, not via env or compile-time flags.
Variants§
Mainnet
Production: api.hyperliquid.xyz
Testnet
Official testnet replica: api.hyperliquid-testnet.xyz
Implementations§
Source§impl HyperliquidNetwork
impl HyperliquidNetwork
pub fn info_url(&self) -> &'static str
pub fn exchange_url(&self) -> &'static str
pub fn ws_url(&self) -> &'static str
Sourcepub fn eip712_source(&self) -> &'static str
pub fn eip712_source(&self) -> &'static str
EIP-712 phantom-agent source for L1 action signing.
Hyperliquid mainnet uses “a”, testnet uses “b” — matches the official
Python SDK (construct_phantom_agent).
Trait Implementations§
Source§impl Clone for HyperliquidNetwork
impl Clone for HyperliquidNetwork
impl Copy for HyperliquidNetwork
Source§impl Debug for HyperliquidNetwork
impl Debug for HyperliquidNetwork
Source§impl Default for HyperliquidNetwork
impl Default for HyperliquidNetwork
impl Eq for HyperliquidNetwork
Source§impl PartialEq for HyperliquidNetwork
impl PartialEq for HyperliquidNetwork
impl StructuralPartialEq for HyperliquidNetwork
Auto Trait Implementations§
impl Freeze for HyperliquidNetwork
impl RefUnwindSafe for HyperliquidNetwork
impl Send for HyperliquidNetwork
impl Sync for HyperliquidNetwork
impl Unpin for HyperliquidNetwork
impl UnsafeUnpin for HyperliquidNetwork
impl UnwindSafe for HyperliquidNetwork
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.