Installation
Requirements
- React 19 or a compatible React framework
- Tailwind CSS
- A shadcn-compatible
components.json @satsterminal-sdk/borrow1.7.3 or later- A SatsTerminal API key and Bitcoin wallet adapter
Initialize shadcn
If your project does not already have acomponents.json, initialize shadcn:
Install the provider
Every SatsTerminal Borrow component reads the SDK instance and shared state fromBorrowProvider:
Install a component
Install components individually using their registry URL: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 yourcomponents.json. With the standard configuration, registry files are copied into:
components/for visual components and the providerhooks/for data and workflow hookslib/for reducers, types, calculations, and formatterscomponents/ui/for required shadcn primitives