sequence. The user-facing flow is coordinated by checkSetup() and executeProviderSetupAction(); the plugin keeps the session and trading credential client-side.
siweLogin— sign in with the wallet and establish a venue session.createDepositAddress— provision the user’s Ethereum USDC margin-wallet destination.acceptProviderTerms— accept the venue terms.registerApiKey— create the client-held trading key.setReferrer— apply LI.FI’s referral through the session (conditional and SDK-only).
checkSetup() completes SDK-only internal setup such as setReferrer inline. It returns actions that need the user in sequence order, with SIWE prioritized so later session steps can run.
Setup descriptors
siweLogin
The user wallet signs the exact backend-issued ERC-4361 challenge. The resulting venue session remains client-side.
createDepositAddress
A client-only session step that provisions the user’s provider-managed deposit address. Its public SessionActionStep marker carries policy, not credentials or a venue request:
getDepositFlow() returns setupRequired with siweLogin and createDepositAddress while logged out, only createDepositAddress while signed in but unprovisioned, and then lifiSwap to Ethereum USDC with the provisioned toAddress.
acceptProviderTerms
Records acceptance through the client-held session. No backend-bound signed step is produced.
registerApiKey
Creates the venue trading key through the session. The credential remains client-side and later signs HMAC trading requests.
setReferrer
Applies LI.FI’s configured referral through the userland session token. The venue endpoint does not accept API-key authentication, so this is a session step rather than HMAC. It is omitted when no referral code is configured and executed internally by checkSetup() when pending.