
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@buildonspark/issuer-sdk
Advanced tools
Spark is the fastest, cheapest, and most UX-friendly way to build financial apps and launch assets natively on Bitcoin. It’s a Bitcoin L2 that lets developers move Bitcoin and Bitcoin-native assets (including stablecoins) instantly, at near-zero cost, while staying fully connected to Bitcoin’s infrastructure.
For complete documentation, visit https://docs.spark.money
npm install @buildonspark/issuer-sdk @buildonspark/spark-sdk
# or
yarn add @buildonspark/issuer-sdk @buildonspark/spark-sdk
# or
pnpm add @buildonspark/issuer-sdk @buildonspark/spark-sdk
import { IssuerSparkWallet } from "@buildonspark/issuer-sdk";
// Create a new issuer wallet (generates a new mnemonic)
const { wallet, mnemonic } = await IssuerSparkWallet.create({
options: {
network: "MAINNET", // or "REGTEST" for testing
},
});
// Or initialize with an existing mnemonic
const wallet = await IssuerSparkWallet.initialize({
mnemonicOrSeed: "your twelve word mnemonic phrase here ...",
options: {
network: "MAINNET",
},
});
const token = await wallet.createToken({
tokenName: "My Token",
tokenTicker: "MTK",
decimals: 8,
maxSupply: 1000000n,
isFreezable: true,
});
console.log(`Token created: ${token.tokenIdentifier}`);
// Mint tokens to your own wallet
const mintResult = await wallet.mintTokens({
tokenIdentifier: "spark1...",
tokenAmount: 10000n,
});
// To distribute tokens to others, mint first then transfer
await wallet.mintTokens({
tokenIdentifier: "spark1...",
tokenAmount: 5000n,
});
await wallet.transferTokens({
tokenIdentifier: "spark1...",
receiverSparkAddress: "sp1q...",
tokenAmount: 5000n,
});
// Get balance for all tokens you've issued
const balances = await wallet.getIssuerTokenBalances();
for (const [tokenId, info] of balances) {
console.log(`${info.tokenMetadata.tokenName}: ${info.balance}`);
}
// Freeze tokens at a Spark address (requires isFreezable: true during creation)
await wallet.freezeTokens({
tokenIdentifier: "spark1...",
sparkAddress: "sp1q...",
});
// Unfreeze tokens at a Spark address
await wallet.unfreezeTokens({
tokenIdentifier: "spark1...",
sparkAddress: "sp1q...",
});
const burnResult = await wallet.burnTokens({
tokenIdentifier: "spark1...",
tokenAmount: 1000n,
});
const transactions = await wallet.getTokenTransactions({
tokenIdentifier: "spark1...",
limit: 50,
});
for (const tx of transactions) {
console.log(`TX: ${tx.id}, Amount: ${tx.amount}`);
}
The SDK supports multiple JavaScript runtimes:
FAQs
Spark Issuer SDK for token issuance
The npm package @buildonspark/issuer-sdk receives a total of 2,241 weekly downloads. As such, @buildonspark/issuer-sdk popularity was classified as popular.
We found that @buildonspark/issuer-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.