Saibun (細分) - Japanese for "splitting into smaller parts"
A minimal, offline-capable tool for splitting UTXOs on the BSV blockchain.
Saibun is a precision tool for splitting BSV UTXOs (Unspent Transaction Outputs) into multiple smaller outputs. Whether you need to create dust outputs for token protocols, prepare UTXOs for batch operations, or simply organize your wallet's UTXO set - Saibun handles it with elegance.
- Fully Offline Capable - Build and sign transactions without any network access
- Client-Side Only - All cryptographic operations happen in your browser. Your private keys never leave your device
- xPub Derivation - Send outputs to addresses derived from an extended public key with customizable derivation paths
- QR Code Support - Easily scan or share addresses and private keys
- Minimal Design - Clean, focused interface without crypto hype aesthetics
- Node.js 18.x or higher
- pnpm 8.x or higher (or npm/yarn)
- Modern browser with JavaScript enabled
git clone https://github.com/msmrez/saibun.git
cd saibunUsing pnpm (recommended):
pnpm installUsing npm:
npm installUsing yarn:
yarn installImportant: After installation, ensure you have the latest security patches:
pnpm update react react-dom nextThis ensures you have React 19.2.1+ and Next.js 16.0.10+ with critical security fixes.
pnpm devThe application will be available at http://localhost:3000
pnpm dev- Start development server on port 3000pnpm build- Build for productionpnpm start- Start production server (requires build first)pnpm lint- Run ESLint
saibun/
├── app/ # Next.js app directory
│ ├── layout.tsx # Root layout with theme provider
│ ├── page.tsx # Main application page
│ ├── learn/ # Learn page
│ └── globals.css # Global styles
├── components/
│ ├── saibun/ # Core application components
│ │ ├── key-manager.tsx
│ │ ├── utxo-fetcher.tsx
│ │ ├── split-config.tsx
│ │ └── transaction-builder.tsx
│ ├── ui/ # UI component library (shadcn/ui)
│ └── theme-toggle.tsx # Theme switcher component
├── lib/
│ ├── bsv.ts # BSV transaction logic
│ └── utils.ts # Utility functions
└── public/ # Static assets
No environment variables required. The application runs entirely client-side.
pnpm buildpnpm startThe application can be deployed to any platform that supports Next.js:
- Vercel (recommended): Connect your GitHub repository
- Netlify: Use the Next.js build preset
- Self-hosted: Run
pnpm build && pnpm starton your server
-
Generate or Import Keys
- Click "Generate Key Pair" to create a new private key and address
- Or switch to "Import" tab and paste an existing WIF (Wallet Import Format) private key
- Your address will be displayed with a QR code for funding
-
Fund Your Address
- Send BSV to the displayed address
- Wait for the transaction to confirm (or proceed with unconfirmed for testing)
-
Fetch UTXOs
- In "Online" mode, click "Fetch UTXOs" to retrieve your unspent outputs from Bitails API
- The system will automatically fetch the raw transaction data needed for signing
-
Configure Split
- Choose recipient type: Single Address or xPub Derivation
- Set the number of UTXOs to create
- Set satoshis per output (minimum 1 sat)
- Adjust fee rate if needed (default 0.5 sat/byte)
- Any remaining balance automatically returns to your source address
-
Build & Broadcast
- Review the transaction details
- Click "Broadcast Transaction" to send via Bitails API
- Or "Download Raw Hex" to broadcast later from any BSV node
Saibun is designed to work completely offline. Here's how:
Before going offline, you need to gather the following data for each UTXO you want to spend:
-
Raw Transaction Hex - Download from:
https://api.bitails.io/download/tx/{txid}/hexThis is the complete transaction hex (starts with
01000000or02000000) -
Output Index (vout) - The index of the output you want to spend (usually 0, 1, 2, etc.)
-
Generate or Import Keys
- Generate a new key pair offline, or
- Import your existing WIF private key
-
Enter UTXO Data
- Switch to "Offline" mode in the UTXOs step
- For each UTXO you want to spend:
- Paste the raw transaction hex
- Enter the output index (vout)
- The system automatically extracts the txid and satoshi amount from the raw data
-
Configure Split
- Same as online mode - configure your recipients, amounts, and fees
-
Build Transaction
- The transaction is signed entirely offline using your private key
- Download the raw transaction hex file
-
Broadcast Later
- When you're back online, broadcast the raw hex using Bitails or any other indexer, Or any BSV node's
sendrawtransactionRPC:- Bitails API:
POST https://api.bitails.io/tx/broadcast
- Bitails API:
- When you're back online, broadcast the raw hex using Bitails or any other indexer, Or any BSV node's
- Uses standard P2PKH (Pay-to-Public-Key-Hash) scripts
- Signatures include
SIGHASH_ALL | SIGHASH_FORKIDas required by BSV - Fee calculation:
(inputs * 148 + outputs * 34 + 10) * feeRate
- Default path:
m/44'/145'/0'/0/{index} - Customizable derivation path via Advanced Settings
- Configurable starting index for address derivation
- Preview derived addresses before building transaction
- Minimum output: 1 satoshi (BSV has no practical dust limit)
@bsv/sdk- Official BSV SDK for transaction building and signingnext- React framework for productionreact- UI libraryqrcode.react- QR code generationnext-themes- Theme management@radix-ui/*- Accessible UI primitives
Saibun uses the Bitails API for:
- Fetching UTXOs:
GET /address/{address}/unspent - Fetching raw transactions:
GET /download/tx/{txid}/hex - Broadcasting transactions:
POST /tx/broadcast
- Private keys are generated and stored only in your browser's memory
- No data is sent to any server except when explicitly fetching UTXOs or broadcasting
- For maximum security, use offline mode on an air-gapped device
- Always verify transaction details before broadcasting
- Consider using a dedicated browser profile or incognito mode
- React: Requires 19.2.1+ (fixes CVE-2025-55182)
- Next.js: Requires 16.0.10+ (fixes CVE-2025-66478)
- @bsv/sdk: Uses official BSV SDK (1.10.3)
- Run
pnpm auditregularly to check for vulnerabilities
If you see Google Fonts errors during build, this is expected when building offline. The application uses system fonts as fallback.
If port 3000 is already in use:
pnpm dev -- -p 3001Run type checking:
pnpm exec tsc --noEmitIf you find Saibun useful, consider supporting its development:
BSV: 12smcX7jymSNSyq35JE8AhV1s3jV45rszz
BTC: bc1q2x9hzq8tl0stlrsfyxsyehuh59m08ghcl9rwxa
- Email: contact@saibun.io
- GitHub: github.com/msmrez/saibun
MIT License - Feel free to use, modify, and distribute.
Saibun - Precision UTXO splitting
