Skip to main content

Installation

Requirements

  • React 19 or a compatible React framework
  • Tailwind CSS
  • A shadcn-compatible components.json
  • @satsterminal-sdk/borrow 1.7.3 or later
  • A SatsTerminal API key and Bitcoin wallet adapter

Initialize shadcn

If your project does not already have a components.json, initialize shadcn:

Install the provider

Every SatsTerminal Borrow component reads the SDK instance and shared state from BorrowProvider:
The CLI also installs the provider’s registry and npm dependencies.

Install a component

Install components individually using their registry URL:
You do not need to install borrow-core separately when a selected component declares it as a dependency.

Configure the provider

Wrap the borrowing interface with the installed provider:
autoRestore silently restores a valid persisted session. When no session can be restored, autoStart initializes one and may request a Bitcoin wallet signature. Your wallet adapter must satisfy the SDK’s WalletProvider interface. See React integration for wallet integration patterns.

Installed folders

The exact aliases come from your components.json. With the standard configuration, registry files are copied into:
  • components/ for visual components and the provider
  • hooks/ for data and workflow hooks
  • lib/ for reducers, types, calculations, and formatters
  • components/ui/ for required shadcn primitives
Continue to the Borrow quickstart to compose the installed components.