Integration guide
How a wallet or solver integrates with Occlusion.
Wallets
1. Install the SDK and obtain an API key (prefix determines testnet or live). 2. Build the intent from the user's swap parameters. 3. Let the SDK generate the proof locally — keys never leave the device. 4. Subscribe to the settlement webhook or poll by commitment.
typescript · wallet.ts
import { Occlusion } from "@occlusion/sdk";
const occ = new Occlusion(process.env.OCLU_KEY);
const intent = await occ.intents.submit({
chainId: 4663,
sell: { token: "ETH", amount: "12.5" },
buy: { token: "USDC" },
maxSlippageBps: 30,
shield: "orchard",
});
occ.on("settlement", (e) => {
if (e.commitment === intent.commitment) console.log(e.nullifier);
});Solvers
1. Post a bond to the registry. 2. Run the solver client, which joins the decryption round and receives routing fields. 3. Return a sealed bid with an executability proof. 4. On selection, submit the atomic bundle before the block deadline.
typescript · solver.ts
occ.solver.onIntent(async (req) => {
const route = await findRoute(req.fields);
return occ.solver.bid(req.commitment, route);
});