Skip to main content
The BlackSwan JavaScript SDK is a TypeScript-first library that gives you direct access to BlackSwan’s decentralized credit infrastructure. It works in both server-side Node.js environments and modern browsers, letting you query on-chain credit profiles, trust scores, APRs, and loan history with a clean, promise-based API.

Install the package

Requirements

Before you start, make sure your environment meets the following requirements:
  • Runtime: Node.js 16 or later, or a modern browser environment (Chrome, Firefox, Safari, Edge)
  • RPC provider: An active RPC endpoint from Alchemy, Infura, or the public Polygon RPC
TypeScript support is built into blackswan-sdk — no need to install a separate @types package. Type definitions ship directly with the library.

Next steps

Configure the client

Initialize BlackSwanClient with your network and RPC URL to start making calls.