Skip to main content
Available Now The TypeScript SDK is available as @d4mr/t2z-wasm on npm. It works in browsers and Node.js via WebAssembly.

Installation

Quick Start

Browser Setup

For multithreaded WASM support (faster proving), your server must send these headers:

Vite Configuration

Next.js Configuration

Cloudflare Pages

Create public/_headers:

Type Definitions

The package includes TypeScript definitions. Key types:

Complete Example

Utilities

Hex Conversion

Reverse Txid (Explorer → Internal)

Format Zatoshis

Resources

NPM Package

View on npm registry

Live Demo

Interactive transaction builder

GitHub

Source code and issues

API Reference

Complete function docs