> ## Documentation Index
> Fetch the complete documentation index at: https://public-perps-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Lighter provider instances, SDK-owned signing, setup, and configuration

This section covers behavior shared by the Lighter deployments exposed through the perps SDK. For general concepts, see [Action Pattern](/concepts/action-pattern).

Lighter signs actions with a per-account native keypair registered on-chain through `REGISTER_API_KEY`. Public provider metadata calls this an `SDK` signer: the Lighter plugin owns key generation, persistence, WASM loading, signing, and read-only token lifecycle. Applications do not instantiate a signer or pass a key store separately.

## Provider instances

| Provider key | Deployment                 | Settlement/deposit chain                          | Collateral | REST / WebSocket            |
| ------------ | -------------------------- | ------------------------------------------------- | ---------- | --------------------------- |
| `lighter`    | Lighter mainnet            | Ethereum deposit bridge; Lighter settlement chain | USDC       | Mainnet Lighter endpoints   |
| `lighter-rh` | Lighter on Robinhood Chain | Robinhood Chain                                   | USDG       | Robinhood Lighter endpoints |

Both providers expose the same normalized SDK contract but keep endpoints, caches, credentials, signing configuration, and asset registries isolated.

```typescript theme={null}
import { createPerpsClient, PerpsWsClient } from '@lifi/perps-sdk';
import {
  lighterProvider,
  lighterRhProvider,
  LIGHTER_RH_REST_URL,
  lighterWsProvider,
} from '@lifi/perps-sdk-provider-lighter';

const sdk = createPerpsClient({
  integrator: 'my-app',
  providers: [lighterProvider(), lighterRhProvider()],
});

const ws = new PerpsWsClient(sdk, {
  wsProviders: {
    lighter: lighterWsProvider(),
    'lighter-rh': lighterWsProvider({ restUrl: LIGHTER_RH_REST_URL }),
  },
});
```

Each provider defaults to encrypted browser `localStorage` for its signing key and read-only token. Pass `storage` to a provider factory only for SSR, tests, or a different persistence backend. Authenticated WebSocket channels automatically reuse `resolveAuthToken` from the co-registered REST provider; a custom resolver is only needed for a standalone WebSocket client.

## Topics

* [Signing Model](/providers/lighter/signing-model) — WASM signing, the native key versus the L1 wallet, and dual-authorized setup
* [Deposits](/providers/lighter/deposits) — provider-owned deposit discovery for Lighter mainnet and Robinhood Chain
* [Setup](/providers/lighter/setup) — registering the trading key and satisfying conditional gates
* [Trading](/providers/lighter/trading) — trading and account actions
* [Withdrawals](/providers/lighter/withdrawals) — per-asset/per-route balance discovery and settlement paths
* [WebSocket Protocol](/providers/lighter/websocket) — channel mapping and provider-owned authentication

## Defaults and constraints

* **Default margin mode:** `CROSS` when `marginMode` is omitted from `placeOrder` or `updateLeverage`.
* **Trade signing:** actions are authorized by the plugin's `SDK` signer with no per-trade wallet popup.
* **Order fields:** `price` is required.
* **Withdrawal destination:** the account owner address only.
* **Mainnet deposit:** Ethereum mainnet USDC plus ETH for gas.
* **Robinhood deposit:** Robinhood Chain USDG plus native gas.
* **Key slot:** slot `42` by default; re-registering the same slot replaces the prior key.

## Related pages

* [SDK / Providers](/sdk/providers) — provider discovery and deposit-flow descriptors
* [SDK / Withdrawal](/sdk/withdrawal) — withdrawable-balance discovery and submission
* [SDK / Streaming](/sdk/streaming) — normalized WebSocket subscriptions
* [SDK / Actions](/sdk/actions) — authorization-step variants
