Get a BSV wallet connected and send your first payment in under 5 minutes.
- Node.js 18+
- A BSV wallet browser extension (such as MetaNet Client)
- A funded BSV wallet (mainnet or testnet)
npm install @bsv/simple @bsv/sdkimport { createWallet } from '@bsv/simple/browser'
const wallet = await createWallet()
console.log('Connected:', wallet.getIdentityKey())
console.log('Address:', wallet.getAddress())createWallet() prompts the user to approve the connection via their browser wallet extension. Once approved, you have a fully functional wallet instance with access to all modules.
const result = await wallet.pay({
to: '02abc123...', // recipient's identity key
satoshis: 1000,
memo: 'My first payment'
})
console.log('Transaction ID:', result.txid)const token = await wallet.createToken({
data: { type: 'reward', points: 100 },
basket: 'my-tokens'
})
console.log('Token created:', token.txid)const tokens = await wallet.listTokenDetails('my-tokens')
for (const t of tokens) {
console.log(t.outpoint, t.data)
// "abc123.0" { type: 'reward', points: 100 }
}const inscription = await wallet.inscribeText('Hello blockchain!')
console.log('Inscribed:', inscription.txid)| Guide | What you'll learn |
|---|---|
| Browser Wallet | Full wallet setup, wallet info, key derivation |
| Payments | Simple payments, multi-output sends, BRC-29 payments |
| Tokens | Create, list, send, redeem, and transfer tokens via MessageBox |
| Server Wallet | Run a backend wallet, accept funding from browser wallets |
| Next.js Integration | Set up a full-stack BSV app with Next.js |