Next.js Integration
1. Install Dependencies
npm install @bsv/simple2. Configure next.config.ts
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
serverExternalPackages: [
"@bsv/wallet-toolbox",
"knex",
"better-sqlite3",
"tedious",
"mysql",
"mysql2",
"pg",
"pg-query-stream",
"oracledb",
"dotenv"
]
};
export default nextConfig;3. Browser Wallet (Client Components)
Basic Page
Auto-Check MessageBox on Connect
4. Server API Routes (Handler Factories)
Server Wallet
Identity Registry
DID Resolver
Credential Issuer
Key Persistence
5. Client-Side Funding Flow
6. .gitignore
7. Environment Variables
Common Issues
Problem
Solution
Last updated
