/** * Lighter RH (Lighter's Robinhood instance) deposits for Robinhood Chain tokens via VaultDepositooor. * * Mirrors the Mallard helper: a host attaches these calls to a destination * candidate's `generateActionsParams`, Relay delivers the token on Robinhood * Chain (4663), and the calls credit the Lighter RH account owned by the recipient: * 1. approve(token, VAULT_DEPOSITOR, MAX) * 2. VAULT_DEPOSITOR.depositWithTick(token, RH_ZKLIGHTER, * deposit(recipient, assetIndex, routeType, AMOUNT_PLACEHOLDER), 0, tick, recipient) */ import { LIGHTER_RH_STOCK_ASSETS, type LighterRhDepositAsset } from '@funkit/connect-core/clients/lighter'; import { type LighterRhRouteType } from '@funkit/fun-relay'; import { type Address } from 'viem'; import type { FunkitCheckoutActionParams } from '../providers/FunkitCheckoutContext/types'; export { LIGHTER_RH_STOCK_ASSETS }; export type { LighterRhDepositAsset, LighterRhRouteType }; export interface LighterRhDepositActionsConfig { /** Owner of the Lighter RH account credited by the deposit (typically the connected wallet). */ recipientAddress: Address | undefined; /** Robinhood Chain token deposited: USDG or one of {@link LIGHTER_RH_STOCK_ASSETS}. */ tokenAddress: Address; /** Balance credited. Defaults to perps for USDG (collateral) and spot for stocks. */ routeType?: LighterRhRouteType; } /** * Builds the `generateActionsParams` callback for a Lighter RH deposit of a * Robinhood Chain token. * * Usage: * ```ts * generateActionsParams: createLighterRhDepositActions({ * recipientAddress: address, * tokenAddress: AAPL_ON_ROBINHOOD_CHAIN, * }) * ``` * * Build these candidates once a wallet is connected, and set the candidate's * `customRecipient` to that wallet: the owner is captured here (the callback * rejects when it is missing), and the recipient replaces any account index a * previous Lighter route set. * * @throws if `tokenAddress` is not a Lighter RH deposit asset (a host config error). */ export declare function createLighterRhDepositActions(config: LighterRhDepositActionsConfig): () => Promise;