Skip to Content
TypeScript SDKOverview

TypeScript SDK

The official TypeScript SDK for the Burn & Claim API. It handles authentication, request serialization, and provides typed responses for every endpoint.

Installation

npm install @burnandclaim/sdk
pnpm add @burnandclaim/sdk
yarn add @burnandclaim/sdk

Requirements

  • Node.js 18+ or any modern browser
  • TypeScript 5.0+ (recommended, not required)

Quick setup

Server-side (API key)

import { BurnerClient } from '@burnandclaim/sdk' const client = new BurnerClient({ apiKey: process.env.BURNER_API_KEY, })

Client-side (session token)

import { BurnerClient } from '@burnandclaim/sdk' const client = new BurnerClient({ sessionToken: tokenFromBackend, })

Configuration options

The BurnerClientOptions interface accepts:

OptionTypeDefaultDescription
apiKeystringLong-lived API key. Server-side only. Sent as X-Api-Key header.
sessionTokenstringShort-lived session token. Sent as Authorization: Bearer header.
baseUrlstringhttps://api.aerosol.comOverride the API base URL (useful for testing).
kyKyOptionsPass-through options to the underlying ky  HTTP client (timeout, hooks, retry, etc).

If both apiKey and sessionToken are provided, the SDK uses the session token and ignores the API key.

Exports

The SDK exports all public API types you need:

import { BurnerClient, SessionScope, BurnerAction, SESSION_SCOPES_DEFAULT, } from '@burnandclaim/sdk' import type { BurnerClientOptions, LeaderboardFilter, WalletAssets, WalletItem, WalletItemType, BuildTransactionsRequest, BuildTransactionsResponse, BuiltTransaction, ItemSelection, SignedTransaction, SubmitTransactionsRequest, SubmitTransactionsResponse, SubmissionResult, CreateSessionRequest, CreateSessionResponse, ProjectBurnerStats, BurnerLeaderboardEntry, WalletAssetsChunk, StreamWalletAssetsRequest, } from '@burnandclaim/sdk'

SDK pages

  • BurnerClient Reference — Every method with signatures, parameters, and examples
  • Sessions — Creating and managing session tokens
  • Errors — Error response shapes and handling
  • Streaming — Real-time wallet asset streaming via WebSocket
Last updated on