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: DEFAULT, 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 choice step in the provider’s setup array. It is USER-signed. The options are disabled (shown as Manual), unifiedAccount (recommended), and portfolioMargin. The user explicitly chooses and authorizes every transition, and the SDK never applies the step on its own. An account that never set a mode reports abstractionMode: null and behaves as Standard mode. The deprecated dexAbstraction value remains readable for existing accounts but is not offered as a selection.params.mode of each option on the accountMode step (Provider.setup[].options[]). Hyperliquid enforces transition rules at execution time; the SDK does not silently migrate the account during setup. See Setup for the step descriptor.
Account Configuration
Theconfig object returned by getAccount() is a discriminated union over provider. For provider: 'hyperliquid' it carries the following Hyperliquid-specific state:
HyperliquidAccountConfig also declares an optional builderFeeApproval; the SDK’s Hyperliquid getAccount() never populates it.
The SDK validates all config requirements automatically. These fields are useful for displaying account status in your UI.