> ## Documentation Index
> Fetch the complete documentation index at: https://blackswan-23965643.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the BlackSwan JavaScript SDK with npm, yarn, pnpm

> Install blackswan-sdk with npm, yarn, or pnpm to query on-chain credit profiles, trust scores, APRs, and loan history. Requires Node.js 16+.

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

<CodeGroup>
  ```bash npm theme={null}
  npm install blackswan-sdk
  ```

  ```bash yarn theme={null}
  yarn add blackswan-sdk
  ```

  ```bash pnpm theme={null}
  pnpm add blackswan-sdk
  ```
</CodeGroup>

## 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](https://www.alchemy.com/), [Infura](https://www.infura.io/), or the public [Polygon RPC](https://polygon.technology/developers)

<Note>
  TypeScript support is built into `blackswan-sdk` — no need to install a
  separate `@types` package. Type definitions ship directly with the library.
</Note>

## Next steps

<Card title="Configure the client" icon="gear" href="/sdks/javascript/configuration">
  Initialize `BlackSwanClient` with your network and RPC URL to start making calls.
</Card>
