@tipchatteam/shared

v0.1.4

Published

Shared types and events for the TipChat SDK

Readme

@tipchatteam/shared

Shared TypeScript types and event definitions used across all TipChat SDK packages.

Overview

This package contains the core type definitions and event interfaces that are shared between @tipchat/core, @tipchat/react, and @tipchat/react-ui. You typically do not need to install this package directly -- it is included as a dependency of the higher-level packages.

Installation

npm install @tipchatteam/shared

What's Included

Types

  • Message, OptimisticMessage -- Chat message structures with optimistic update support
  • Conversation, ConversationSummary -- Conversation metadata and listing types
  • TipData, TipTransferRequest, TipTransferResult -- On-chain tipping types
  • ChatIdentity -- Wallet-based user identity
  • MessageReaction -- Emoji reaction data
  • TypingUser -- Typing indicator state
  • SendMessageRequest, SendMessageResponse -- API request/response types
  • Pagination, ListMessagesResponse, ListConversationsResponse -- Paginated response types

Events

  • TipChatEventMap -- Strongly typed event map for real-time events
  • TipChatEventName -- Union of all event names (message.created, message.updated, message.deleted, reaction.added, reaction.removed, conversation.read, tip.settled)
  • TipChatEventHandler -- Typed event handler function signature

Enums

  • ConversationType -- 'direct' | 'group' | 'market'
  • MessageType -- 'text' | 'image' | 'gif' | 'market_share' | 'tip' | 'system'
  • TipCurrency -- 'USDC' | 'ETH' | 'SOL' | 'OTHER'

License

MIT