Documentation Index
Fetch the complete documentation index at: https://developer.satsterminal.com/llms.txt
Use this file to discover all available pages before exploring further.
SatsTerminal SDK
The SDK is modular. You can install the all-in-one package or pick individual products:
satsterminal-sdk (suite): exports the legacy swaps client (SatsTerminal) and factories for swaps/borrow/bridge via createClient.
@satsterminal-sdk/swaps: swaps-only package.
@satsterminal-sdk/borrow: borrow-only package.
@satsterminal-sdk/bridge: bridge BTC Runes to Spark wRunes and back, plus USDC -> USDB on Spark.
Installation options
# Suite (recommended for multiple products)
npm install satsterminal-sdk
# Swaps only
npm install @satsterminal-sdk/swaps
# Borrow only
npm install @satsterminal-sdk/borrow
# Bridge only
npm install @satsterminal-sdk/bridge
Minimal examples
Suite with shared apiKey:
import { createClient } from "satsterminal-sdk";
import { ChainType } from "@satsterminal-sdk/borrow";
const { swaps, borrow, bridge } = createClient({
apiKey: process.env.API_KEY!,
borrow: { chain: ChainType.BASE, wallet },
bridge: true,
});
await bridge.spark.runes.getBTCDepositAddress({
userPublicKey: "0x...",
runeId: "840000:3",
amount: "1000000",
});
Swaps-only (legacy surface):
import { SatsTerminal } from "satsterminal-sdk";
const swaps = new SatsTerminal({ apiKey: process.env.API_KEY! });
Borrow-only:
import { BorrowSDK, ChainType } from "@satsterminal-sdk/borrow";
const borrow = new BorrowSDK({ apiKey: process.env.API_KEY!, chain: ChainType.ARBITRUM, wallet });