Skip to main content
Welcome to the Spark API Reference documentation. This comprehensive guide covers all the methods available in the Spark SDKs for building Bitcoin-native applications, including wallet management, Bitcoin operations, Lightning Network integration, and token issuance.

Available SDKs


Getting Started

To get started with the Spark API, follow the steps below.
1

Install the SDK

Install the SDK package using your package manager of choice.For the Wallet SDK:
npm install @buildonspark/spark-sdk
For the Issuer SDK:
npm install @buildonspark/issuer-sdk
2

Initialize a Wallet

Create a wallet instance to start interacting with the Spark network.For the Wallet SDK:
import { SparkWallet } from "@buildonspark/spark-sdk";

const { wallet, mnemonic } = await SparkWallet.initialize({
  options: { network: "REGTEST" }
});

console.log("Wallet address:", wallet.getAddress());
For the Issuer SDK:
import { IssuerSparkWallet } from "@buildonspark/issuer-sdk";

const { wallet, mnemonic } = await IssuerSparkWallet.initialize({
  options: { network: "REGTEST" }
});

console.log("Issuer address:", wallet.getAddress());
3

Explore Documentation

Browse the method documentation using the sidebar navigation. Each method includes detailed parameters, return values, and code examples.