The comprehensive TypeScript SDK for developing scalable applications on the BSV Blockchain.
The foundation of ts-stack. Contains core cryptographic primitives, Bitcoin Script execution, transaction building and signing, network broadcasting, and lightweight SPV verification. This is the base layer that all other ts-stack packages build on top of.
The SDK is intentionally standalone with zero runtime dependencies — it works in both Node.js and modern browsers using native crypto APIs. It provides both low-level primitives (for fine-grained control) and high-level helpers (for common workflows).
Earn XP for sharing
Sign in to get a personal referral link and earn XP every time someone visits through your link.
No reviews yet — be the first.
Sign in to get a referral link and earn XP for every visitor
npm i @bsv/sdknpm i @bsv/sdk```ts
import { WalletClient, Script } from '@bsv/sdk'
export async function createToken(runner) {
// Connect to user's wallet
const wallet = new WalletClient()
// Create a token which represents an event ticket
const response = await wallet.createAction({
description: 'create an event ticket',
outputs: [{
satoshis: 1,
lockingScript: Script.fromASM('OP_NOP').toHex(),
basket: 'event tickets',
outputDescription: 'event ticket'
}]
})
return runner.log(response)
}
```