Build a TWAP order, encrypt it with ECIES, sign it, and submit to the TWAP service.
This guide walks through submitting a TWAP order to the Tachyon TWAP service. The service is separate from the relayer, it has its own HTTP API and its own ECIES public key.
The TypeScript SDK is WIP. The flow below shows the raw steps you can implement today; the SDK will wrap them.
This pubkey is distinct from the relayer’s ECIES pubkey. Orders must be encrypted to this key so only the TWAP service (inside the TEE) can decrypt them.
const res = await fetch(`${TWAP_URL}/orders/${orderId}`);const { order } = await res.json();console.log(order.status); // "active" | "completed" | "cancelled"console.log(order.tranchesFilled, "/", order.totalTranches);console.log(order.amountSpent);console.log(order.intentIds); // BridgeIntent IDs, one per fired tranche
Each tranche is a BridgeIntent on the source chain bridge contract. Track individual tranche settlement through the relayer’s GET /intent-details/:intentId using each intentId from order.intentIds.
Recipients are stored encrypted in the relayer via POST /store-recipients after each createIntent call. The winning solver fetches them via GET /get-recipients/:intentId (which only returns the decrypted list to the auction winner) and delivers to those addresses on the destination chain.