@motosan-whale/core
v0.1.4
Published
Shared types, interfaces, and utilities for the motosan-whale SDK
Readme
@motosan-whale/core
Layer 0: Zero-dependency types and interfaces for the motosan-whale SDK.
Part of the motosan-whale SDK — agent-first whale tracking tools.
Install
pnpm add @motosan-whale/coreUsage
import type {
Chain, RawTransaction, ToolResult,
ChainSource, NansenSource, StreamingSource,
TargetedSnapshot, TargetedDiff,
} from '@motosan-whale/core'
import { diffTargetedSnapshots } from '@motosan-whale/core'API
Types
Chain— supported chain identifiersRawTransaction— normalized transaction typeTokenInfo,TokenTransfer— token-related typesWalletEnrichment,SmartMoneyAlert,TokenFlow— Nansen data typesTokenAccountDetail— detailed info for a single SPL token accountWalletMintTarget— wallet+mint pair used as a batch query targetWalletMintAccounts— aggregated token accounts for a wallet+mint pairBatchMintBalanceResult— result of a batch wallet+mint balance queryTargetedSnapshot— point-in-time snapshot of specific wallet+mint targetsTargetedDiff,TargetedDiffEntry— structured diff between two targeted snapshotsQueryOptions,LargeTxQuery,AlertQuery,TopWalletsQuery,TrendingTokensQuery— query option typesToolResult<T>— standard tool return typeTxCallback,Unsubscribe— streaming callback types
Interfaces
ChainSource— on-chain data (transactions, balances, token accounts)NansenSource— Nansen analytics (smart money, alerts, token flows). Replaces the deprecatedDiscoverySource/EnrichmentSourceinterfaces, which are still exported as aliases.StreamingSource— real-time subscriptions (WebSocket / event streams). Methods:watchAddress(address, chain, callback)— subscribe to new txs for an addresswatchLargeTxs(opts, callback)— subscribe to large txs matching filter criteriadispose()— tear down all subscriptions
Utilities
diffTargetedSnapshots(before, after)— compare twoTargetedSnapshots and return aTargetedDiffwithincreased,decreased,unchanged,newTargets, andmissingTargetsbuckets.withMetadata(data, meta)— attach metadata to a tool resultdiffSnapshots(before, after)— diff two full snapshots
License
MIT
