SDK v0.1.0 — Live on Base Mainnet

Analytics built for Web3.
Not patched onto it.

Track wallet connects, swaps, funnels, and transactions — in real-time, via P2P, with on-chain proof. No Google, no servers, no data ownership concerns.

Start integrating — 3 lines of code → View live dashboard
3min Time to first event
~$0 Gas cost per event
100% Data ownership
1tx Per batch of N events
Why Kairos

Your users' data belongs on-chain — not in someone's server

Traditional analytics tools were built for Web2. Kairos was designed from the ground up for decentralized applications.

🔗

On-Chain Proof

Every batch of events is anchored on Base mainnet. Immutable, verifiable, censorship-resistant. Your analytics can't be deleted or manipulated.

Real-Time P2P

Events flow through the Waku P2P network — no central server, no single point of failure. Your dashboard updates live as events propagate.

🔒

Privacy by Design

No PII required. Track wallet addresses, sessions, and interactions without storing emails, names, or any personal data. GDPR by architecture.

🌐

Chain-Agnostic

Your dApp runs on BSC, Arbitrum, Polygon — Kairos captures it all. Events are tagged with chain metadata and stored on Base for unified analytics.

💰

Gasless for Users

Users never pay gas. Your relayer batches hundreds of events into a single on-chain transaction — reducing costs by up to 95% vs individual tracking.

📦

3 Lines to Install

npm install, init, track. No complex setup, no SDK configuration, no backend required. Integrate in minutes, not days.

Feature Kairos Analytics Google Analytics Dune / Nansen Mixpanel
On-chain proof
Real-time P2P events
Wallet-native tracking Partial
No PII / GDPR by design
SDK integration (<5min)
Custom event tracking Partial
Data ownership ✓ You own it ✗ Google owns it Partial ✗ Mixpanel owns it

Quick Start

From zero to tracking in 3 minutes

Install the SDK, initialize it with your appId, and start tracking. That's it.

01

Install the SDK

Add Kairos Analytics to your project via npm or yarn.

TERMINAL
# npm
npm install @valisthea/analytics

# yarn
yarn add @valisthea/analytics

# pnpm
pnpm add @valisthea/analytics
02

Initialize the SDK

Add the initialization code in your app's entry point. For Next.js, use a layout or provider component.

TYPESCRIPT
import { init } from '@valisthea/analytics'

// Initialize once at app startup
await init({
  appId: 'your-app-id',     // Unique ID for your dApp
  mode: 'offchain',        // 'offchain' | 'onchain'
  debug: false,            // Enable console logs
})
03

Track your first event

Use track(), page(), and ui() anywhere in your app.

TYPESCRIPT
import { track, page, ui } from '@valisthea/analytics'

// Track page views
page('/swap')

// Track wallet connection
track('wallet_connected', 'wallet', {
  address: userAddress,
  chain: 'bsc',
})

// Track a swap
track('swap_submitted', 'transaction', {
  pair: 'ETH/USDC',
  amount: '1.5',
  dex: 'AsterDEX',
})

// Track UI interactions
ui('swap_button_clicked', { source: 'header' })
04

React / Next.js integration

For React apps, wrap your initialization in a provider to avoid double-initialization in Strict Mode.

TSX — NEXT.JS APP ROUTER
// app/providers.tsx
'use client'

import { useEffect, useRef } from 'react'
import { init } from '@valisthea/analytics'

export function KairosProvider({ children }: { children: React.ReactNode }) {
  const initialized = useRef(false)

  useEffect(() => {
    if (initialized.current) return
    initialized.current = true
    init({ appId: 'your-app-id', mode: 'offchain' })
  }, [])

  return <>{children}</>
}

// app/layout.tsx
import { KairosProvider } from './providers'

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <KairosProvider>{children}</KairosProvider>
      </body>
    </html>
  )
}

Use Cases

What you can track with Kairos

Kairos supports any Web3 application — DEXes, lending protocols, NFT platforms, gaming, and more.

🔄 DEX / Swap Protocol

page_view — /swap, /pools, /farm
wallet_connected — address, chain
swap_submitted — pair, amount, slippage
swap_success — txHash, gasUsed
swap_failed — reason, pair
liquidity_added — pool, amount

🏦 Lending Protocol

page_view — /lend, /borrow, /dashboard
deposit_submitted — asset, amount
borrow_submitted — asset, amount, ltv
repay_success — asset, amount
liquidation_risk — healthFactor
collateral_changed — asset, action

🎮 GameFi / NFT

game_session_start — level, character
nft_mint — collection, tokenId
marketplace_listed — tokenId, price
marketplace_sold — tokenId, price
achievement_unlocked — type, xp
item_equipped — itemId, slot

🗳️ DAO / Governance

proposal_viewed — proposalId, title
vote_cast — proposalId, choice
delegation_changed — delegatee
forum_post_created — category
tokens_staked — amount, duration
proposal_created — type, quorum

API Reference

SDK Methods

Complete reference for all SDK methods and configuration options.

Method Parameters Description
init(config) KairosConfig Initialize the SDK. Must be called once before any tracking. Returns a Promise.
track(type, category, props) string, EventCategory, object Track a custom event. Category: 'page' | 'ui' | 'wallet' | 'transaction' | 'custom'
page(path?) string? Track a page view. If no path provided, uses window.location.pathname automatically.
ui(element, props) string, object Track a UI interaction (click, hover, focus). Automatically categorized as 'ui'.
Config Option Type Default Description
appId string required Unique identifier for your dApp. Used to group events on-chain.
mode 'offchain' | 'onchain' 'offchain' offchain: events sent via HTTP relayer (faster). onchain: events sent directly on-chain.
debug boolean false Enable verbose console logging for development.
relayerUrl string? Kairos relayer Custom relayer URL. Leave empty to use the Kairos production relayer.

Ready to integrate Kairos in your dApp?

Start with the free plan — no credit card, no setup fees. Or contact us for a custom integration.