TypeScript SDK for Segmento. Track real onchain activity.
| Package | Description |
|---|---|
@segmento/core |
API client, token validation, referral code extraction |
@segmento/lead |
Solana wallet signing |
@segmento/waitlist-ui |
Drop-in modal web component |
Initialize SDK and track wallet events.
npm install @segmento/coreimport { SegmentoClient } from "@segmento/core";
// Initialize SDK once at the top level
SegmentoClient.init("<your project token>");
// after SDK has been initialized you can do this anywhere
import { trackWalletConnect, trackWalletTransaction } from "@segmento/core";
trackWalletConnect({
walletAddress: "<connected user wallet address>",
chain: "starknet",
});
trackWalletTransaction({
walletAddress: "<connected user wallet address>",
chain: "starknet",
tx: "<transaction hash>",
});