npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tipchatteam/core

v0.1.4

Published

Core client library for TipChat -- chat infrastructure for web3 applications

Readme

@tipchatteam/core

npm version License: MIT Bundle Size

Chat infrastructure for web3 applications. Send messages, react with emoji, tip with crypto -- all authenticated by wallet signature.

Installation

npm install @tipchatteam/core

Quick Start

import { TipChatClient, createEip1193TipExecutor } from '@tipchatteam/core';

// Initialize the client
const client = new TipChatClient({
  baseUrl: 'https://tipchat-api.onrender.com',
  tenantId: 'your-tenant-id',
  walletProvider: {
    getAddress: () => wallet.address,
    signMessage: (msg) => wallet.signMessage(msg),
  },
  tipExecutor: createEip1193TipExecutor({
    provider: window.ethereum,
    chainId: 8453, // Base
  }),
});

// Authenticate (wallet signature)
await client.authenticate();

// List conversations
const { conversations } = await client.listConversations();

// Send a message
const { message } = await client.sendMessage(conversationId, {
  content: 'Hello from web3!',
});

// Send a message with optimistic update
const { optimistic, confirmed } = client.sendMessageOptimistic(conversationId, {
  content: 'This appears instantly',
});
// `optimistic` is available immediately for UI rendering
// `confirmed` resolves when the server acknowledges the message

// Send a tip
const result = await client.sendTipMessage({
  conversationId,
  recipientWalletAddress: '0x...',
  amount: 1.0,
  currency: 'USDC',
});

// Watch for new messages (SSE with polling fallback)
const unsubscribe = client.watchMessages(conversationId, (message) => {
  console.log('New message:', message.content);
}, {
  onTyping: (event) => {
    console.log(`${event.walletAddress} is ${event.type === 'started' ? 'typing' : 'idle'}`);
  },
});

// Clean up
unsubscribe();

Features

  • Wallet Authentication -- Sign-in with Ethereum (SIWE) style nonce-based auth
  • Conversations -- Direct messages, group chats, and market-linked discussions
  • Real-time Messaging -- Server-Sent Events with automatic polling fallback
  • Optimistic Updates -- Instant UI feedback with server confirmation
  • On-chain Tipping -- Send USDC, ETH, or SOL tips directly in chat
  • Gasless Tipping -- Paymaster-sponsored transactions via smart wallets
  • Typing Indicators -- Real-time typing status for all participants
  • Reactions -- Emoji reactions on messages
  • Message Moderation -- Built-in content filtering with web3 trust scoring
  • Caching -- CacheManager with stale-while-revalidate for offline-friendly UX
  • Multi-chain -- Adapters for EIP-1193, Privy, WalletConnect, and Solana wallets

Wallet Adapters

| Adapter | Import | Use Case | |---------|--------|----------| | createEip1193TipExecutor | @tipchatteam/core | MetaMask, Rabby, any EIP-1193 provider | | createPrivyWalletAdapter / createPrivyTipExecutor | @tipchatteam/core | Privy embedded wallets | | createWalletConnectWalletAdapter / createWalletConnectTipExecutor | @tipchatteam/core | WalletConnect v2 | | createSolanaWalletAdapter / createSolanaTipExecutor | @tipchatteam/core | Phantom, Solflare, etc. | | createGaslessTipExecutor | @tipchatteam/core | Paymaster-sponsored (zero gas) |

API Reference

TipChatClient

| Method | Description | |--------|-------------| | authenticate() | Perform wallet signature auth and obtain a session token | | listConversations(limit?, offset?) | List conversations for the authenticated wallet | | createDirectConversation(input) | Start a 1:1 conversation | | createGroupConversation(input) | Start a group conversation | | listMessages(conversationId, options?) | Fetch paginated messages | | sendMessage(conversationId, request) | Send a message | | sendMessageOptimistic(conversationId, request) | Send with instant optimistic result | | sendTipMessage(input) | Execute an on-chain tip and post the tip message | | addReaction(messageId, request) | Add an emoji reaction | | removeReaction(messageId, emoji) | Remove an emoji reaction | | markConversationRead(conversationId) | Mark a conversation as read | | sendTypingIndicator(conversationId) | Broadcast typing status | | watchMessages(conversationId, onMessage, options?) | Subscribe to real-time messages (returns unsubscribe fn) |

Chain Utilities

| Export | Description | |--------|-------------| | CHAINS | Registry of supported chains (Base, Ethereum, Optimism, etc.) | | getChain(name) | Look up chain config by name | | getSupportedChains() | List all supported chains | | explorerTxUrl(chainName, txHash) | Build a block explorer link |

Moderation

| Export | Description | |--------|-------------| | ModerationService / createModerationService(config) | Content moderation with configurable rules | | DEFAULT_MODERATION_CONFIG | Sensible defaults for content filtering |

Billing

Pass one of:

  • apiKey -- sends X-TipChat-Api-Key header
  • billingToken -- sends Authorization: Bearer ... header (can be a string or async function)

Documentation

Full documentation and guides are available at tipchat.dev.

License

MIT