lighter or lighter-rh, use the provider metadata and checkSetup() flow. The plugin owns the native signing key, encrypted persistence, WASM signer, and read-only token lifecycle; applications supply the user wallet only when a descriptor includes USER.
A brand-new address must complete its first-deposit flow before setup. REGISTER_API_KEY needs the venue-assigned account_index, so an unfunded account returns accountExists: false with no setup steps.
checkSetup() drains SDK-only internal steps such as setReferrer itself. It returns user-facing steps in descriptor sequence order.
Setup descriptors
registerApiKey
Registers a provider-native Lighter keypair at an on-chain key slot. The new key signs the WASM ChangePubKey blob and the user’s L1 wallet countersigns the EIP-191 authorization.
The default slot is
42. Re-registering the same slot replaces its prior key. Each provider instance namespaces its persisted key, so lighter and lighter-rh credentials never collide.
setReferrer
Applies LI.FI’s configured referral code through the Lighter native signer. This descriptor is omitted unless both the referral code and referral X handle are configured. It is an internal SDK step: checkSetup() attempts it inline and does not render it as a wallet action.
approveIntegrator
Authorizes LI.FI’s integrator account and maximum fee cap. Lighter requires both the native WASM signature and the L1 owner’s EIP-191 signature when the integrator belongs to another address with non-zero fee caps.
Options descriptors
Options never gate trading and are read throughgetAccount().settings.