Steer Protocol
Build

SDK Integration

Use the Collateral Rail SDK from browser apps, bots, and backend services.

Purpose

Use the SDK when your code needs typed clients, swap call descriptors, signed quote helpers, manifest parsing, readiness checks, liquidation helpers, or event parsing.

Install:

npm install @steerprotocol/collateral-rail-sdk

For production signed quote swaps, build calls for SignedCollateralSwapRouter. The router keeps Uniswap v4 swap controls explicit while the signed quote payload controls vault settlement eligibility.

import {
  buildExactInputSignedQuoteCallDescriptor,
  createProtocolPublicClient,
  defaultSwapDeadline,
} from "@steerprotocol/collateral-rail-sdk";

Integration Checklist

  1. Resolve the active deployment manifest.
  2. Build or fetch signed quote hookData.
  3. Use router helpers for exact-input, exact-output, or target-output swaps.
  4. Simulate with the intended account and chain.
  5. Submit with a wallet client.
  6. Parse settlement and risk logs from the receipt.

Boundaries

  • Browser apps should not hold quote signer private keys.
  • Server code should own quote issuance policy.
  • Bots may own liquidation candidate discovery, but should reuse SDK controller reads and hook-data builders.
  • Generated wagmi actions are available, but viem-first helpers are the stable integration path.

On this page