All of the steps in this guide can be done through the UX or programmatically.
Why it works differently
Most of the API is driven by signed actions: your wallet produces a single-key EIP-712 signature and the protocol verifies it (see Action signing). A multi-sig or smart contract has no single private key, so it cannot produce that signature directly. Instead, a contract owner operates entirely through L1 onchain actions — transactions it sends to theOnchainActionManager contract. The exchange’s L1 listener picks each one up and
applies it, authorized by the transaction’s msg.sender. Two building blocks are enough to run
an account end to end:
Deposit
Creating and funding the account is already an L1 call — the same for every owner. See
Programmatic Onboarding.
Set session key
Authorize an EOA session key from L1, then let that key sign trades, transfers, and vault
operations offchain.
The account owner is whatever address you pass as
owner when depositing, and the L1 listener
authorizes onchain actions by the transaction’s msg.sender. So the same contract that owns
the account must send the OnchainActionManager transactions — set the session key from the
multi-sig itself, not from an unrelated EOA.Set up and operate
1
Create and fund the account
The first deposit creates the account and its subaccounts automatically.Make sure that either
owneraddress you pass intoOnchainActionMAnager.depositToNewSubaccount()is the multi-sig / smart contract, or- the
walletyou send topublic/register_deposit_addressis the multi-sig / smart contract.
An onchain Set Session Key is ignored if the account does not exist yet.
2
Authorize a session key via L1
Submit a Set Session Key onchain action from the owner contract. This registers an EOA
session key with the protocol scopes you choose (see Access scopes).
3
Operate with the session key
From here everything is normal: the session key logs in and
signs actions — trading, transfers, and creating or curating a vault
— with no further L1 transactions.When connecting to the UX with the session key you will be prompted to choose between signing in
as the session key or the smart contract.
4
Revoke
Remove a key by sending the same action with expiry
0 — the only way to delete a key (the
offchain API has no revoke).Related
Session keys
What a session key is, its scopes, and its lifecycle.
Access scopes
The full protocol and off-chain scope catalog to scope a key tightly.
Programmatic Onboarding
Create and fund the account with an L1 deposit.
Create a Vault
Run a vault from the account with the session key.
