Account Types
Hyperliquid supports multiple account types that determine how margin and balances are managed. The wire-level values reported by theuserAbstraction info endpoint and exposed via account.config.abstractionMode are the camelCase strings below; the SDK exports them as the HlAbstractionMode constant from @lifi/perps-sdk-provider-hyperliquid (keys: DISABLED, UNIFIED_ACCOUNT, PORTFOLIO_MARGIN, DEX_ABSTRACTION).
Builder fees: builder-code addresses must be in
disabled (Standard) mode to accrue builder fees. API consumers: in unifiedAccount and portfolioMargin, all balances and holds are reported in the spot clearinghouse state — individual perp-DEX user states are not meaningful.Backend Behavior
accountMode is a post-setup option and never gates trading. The provider advertises disabled, unifiedAccount (default), and portfolioMargin; the user explicitly chooses and authorizes every transition. The deprecated dexAbstraction value remains readable for existing accounts but is not offered as a new selection.Provider.options[].params[].values. Hyperliquid enforces transition rules at execution time; the SDK does not silently migrate the account during setup.
Account Configuration
Theconfig object returned by getAccount() is a discriminated union over provider. For provider: 'hyperliquid' it carries the following Hyperliquid-specific state:
The SDK validates all config requirements automatically. These fields are useful for displaying account status in your UI.