Ziya/types/redis-events.ts
rizary 67fb3a203e
feat: implement CEX analysis cards and real-time token monitoring
- Add TokenCard and CexAnalysisCard components for displaying token data
- Implement real-time Redis event streaming for token updates
- Add environment-based configuration system for dev/prod Redis servers
- Create comprehensive hunting ground dashboard with card management
- Add individual and bulk card removal functionality
- Implement browser integration for token details viewing
- Add timestamp utilities and proper type handling for Redis events
- Create production-ready configuration with 154.38.185.112 Redis server
- Add comprehensive documentation in README.md and CONTRIBUTORS.md
- Restructure project architecture with proper Electron-Vue integration

BREAKING CHANGE: Redis configuration now uses environment-based settings
2025-06-23 09:03:39 +07:00

75 lines
No EOL
2.1 KiB
TypeScript

// Type for new token created event (from NewTokenCache in muhafidh/src/storage/redis/model.rs)
export interface NewTokenCreatedData {
mint: number[]; // 32-byte array from Rust Pubkey
bonding_curve?: number[]; // 32-byte array from Rust Pubkey
name: string;
symbol: string;
uri: string;
creator: number[]; // 32-byte array from Rust Pubkey
created_at: number; // Unix timestamp in seconds
}
// Type for token CEX updated event (from creator.rs line 133-144)
export interface TokenCexUpdatedData {
mint: string; // Mint address as string
name: string;
uri: string;
dev_name: string;
cex_name: string;
cex_address: string;
creator: string; // Creator address as string
created_at: number; // Unix timestamp in seconds
updated_at: number; // Unix timestamp in seconds
node_count: number;
edge_count: number;
graph: unknown; // Connection graph data
}
// Type for max depth reached event (from creator.rs line 133-144)
export interface MaxDepthReachedData {
mint: string; // Mint address as string
name: string;
uri: string;
dev_name: string;
cex_name: string;
cex_address: string;
creator: string; // Creator address as string
bonding_curve: string; // Bonding curve address as string
created_at: number; // Unix timestamp in seconds (now consistent with backend fix)
updated_at: number; // Unix timestamp in seconds (now consistent with backend fix)
node_count: number;
edge_count: number;
graph: unknown; // Connection graph data
}
// Redis message wrapper
export interface RedisMessage<T = unknown> {
channel: string;
data: T;
timestamp: number;
}
// IPFS metadata structure for token URIs
export interface TokenMetadata {
name?: string;
symbol?: string;
description?: string;
image?: string;
external_url?: string;
attributes?: Array<{
trait_type: string;
value: string | number;
}>;
properties?: {
files?: Array<{
uri: string;
type: string;
}>;
category?: string;
};
// Social links that might be in the metadata
twitter?: string;
telegram?: string;
website?: string;
discord?: string;
}