SDKs
Three TypeScript packages, one for each side of the market. All three are on npm and hold no keys: your users' wallets sign.
| I want to | Docs | npm |
|---|---|---|
| Offer a credit line against BTC | Borrow SDK | @surgecredit/borrow-sdk |
| Offer yield on USDC | Earn SDK | @surgecredit/earn-sdk |
| Bid on liquidated BTC collateral | Auction SDK | @surgecredit/auction-sdk |
Install with viem, for example:
npm install @surgecredit/borrow-sdk viemNot using TypeScript
Earn and auctions can be integrated with direct contract calls on Base: see Earn Contracts and Auction Contracts.
Testing
Each SDK takes a network: "mainnet" (Bitcoin and Base) or "signet" (Surge's custom signet and Base Sepolia). See Testing on signet before you start.
Using these docs with an AI tool
- llms.txt: an index of every page.
- llms-full.txt: the full docs as plain text.

