Skip to main content
TypeScript SDK for issuing and managing tokens on Spark. Requires Node.js v18+.

Getting Started

To get started, follow the steps below.
Want to skip the manual setup? Scaffold a new project instantly:
Supports React (Vite), Next.js, React Native, Expo, Express, and more.
1

Install SDK

Install the Spark Issuer SDK packages using your package manager of choice.
2

Setup Issuer

Create an issuer instance that will be used to interact with the Spark network.
issuer.ts
3

Start Building

You’re ready to start building.
app.ts

TypeScript Configuration

tsconfig.json

Create a tsconfig.json file in your project root:
tsconfig.json

Package.json Scripts

Add TypeScript build scripts to your package.json:
package.json

Core Issuer Operations

Initialize an Issuer Wallet

An issuer wallet requires either a mnemonic or raw seed for initialization. The initialize() function accepts both. If no input is given, it will auto-generate a mnemonic and return it.

Mnemonic Phrases

A mnemonic is a human-readable encoding of your wallet’s seed. It’s a 12- or 24-word phrase from the BIP-39 wordlist, used to derive the cryptographic keys that control your issuer wallet.

TypeScript Features

Type Safety

The Spark Issuer TypeScript SDK provides full type safety for all issuer operations:

Interface Definitions

Key interfaces used by the Issuer SDK:

Error Handling

The SDK provides typed error classes for better error handling: