npm install @bsv/simple @bsv/sdk@bsv/sdk is a peer dependency — it must be installed alongside @bsv/simple.
The library provides three entry points:
| Import Path | Environment | Use Case |
|---|---|---|
@bsv/simple/browser |
Browser | Connect to user's wallet extension |
@bsv/simple/server |
Node.js | Server wallet with private key |
@bsv/simple |
Both | All exports (use with care — includes server-only code) |
import { createWallet, Certifier, DID, Overlay } from '@bsv/simple/browser'
import { CredentialSchema, CredentialIssuer, MemoryRevocationStore } from '@bsv/simple/browser'import { ServerWallet, FileRevocationStore } from '@bsv/simple/server'Or with dynamic import (recommended in frameworks like Next.js):
const { ServerWallet } = await import('@bsv/simple/server')The library ships with full TypeScript declarations. No additional @types/ packages are needed.
import type { BrowserWallet } from '@bsv/simple/browser'
import type { PaymentOptions, TokenOptions, SendOptions } from '@bsv/simple'Next.js with Turbopack requires additional configuration to prevent server-only packages from being bundled for the browser. See the Next.js Integration Guide for the required next.config.ts setup.
No special configuration needed. Import from @bsv/simple/browser in your components.
No special configuration needed. Use @bsv/simple/browser for browser apps or @bsv/simple/server for Node.js scripts.