Prerequisites

  • Node.js installed (16 or later)

Installation

yarn add @buildonspark/issuer-sdk

or npm

npm i @buildonspark/issuer-sdk

Initialize the Wallet

A 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. Persist it somewhere safe — losing it means losing access.

// import the IssuerWallet and Network from the issuer-sdk
import { IssuerSparkWallet } from "@buildonspark/issuer-sdk";

// Initialize a new wallet instance
const { wallet, mnemonic } = await IssuerSparkWallet.initialize({
  mnemonicOrSeed: "optional-mnemonic-or-seed",
  options: {
    network: "REGTEST",
  },
});
console.log("Wallet initialized successfully:", mnemonic);

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 wallet.

Raw Seed

A raw seed is the byte-level representation of your wallet’s entropy. It directly maps to the private keys that control your wallet.

Next Steps

Now that you’ve created your first wallet, you can:

  1. Announce Your Token on L1
  2. Mint Tokens
  3. Transfer Tokens on Spark
  4. Burn Tokens on Spark
  5. Freeze Tokens

Need Help?