Getting Started
To get started, follow the steps below.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
That’s it—you can now start using the Spark Issuer TypeScript SDK.
app.ts
TypeScript Configuration
tsconfig.json
Create atsconfig.json file in your project root:
tsconfig.json
Package.json Scripts
Add TypeScript build scripts to yourpackage.json:
package.json
Core Issuer Operations
Initialize an Issuer
An issuer requires either a mnemonic or raw seed for initialization. Theinitialize() 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 issuer’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.TypeScript Features
Type Safety
The Spark Issuer TypeScript SDK provides full type safety for all issuer operations:Interface Definitions
All issuer methods return properly typed interfaces:Error Handling
The SDK provides typed error classes for better error handling:Advanced TypeScript Features
Generic Types
Use generic types for flexible token operations:Type Guards
Implement type guards for runtime type checking:Custom Types
Define custom types for your application:Best Practices
- Use TypeScript strict mode for better type safety
- Leverage IDE autocomplete for API methods and properties
- Define custom interfaces for your application data
- Use type guards for runtime type checking
- Implement proper error handling with typed error classes
- Use generic types for reusable components
Next Steps
- Developer Guide - Learn how to build with Spark issuers
- API Reference - Complete API documentation
- Code Samples - Working examples and patterns