@vylth/kricket-client
v0.1.0
Published
TypeScript client for Kricket — one-call token safety (check), a pre-sign guard, a live revocation feed (watch), plus Pulse, Mantis, Firefly, and the contract debugger.
Downloads
161
Maintainers
Readme
@vylth/kricket-client
TypeScript/JavaScript client for the Kricket Protocol — DeFi intelligence APIs for rug detection, wallet profiling, price feeds, smart contract analysis, and notifications.
Installation
npm install @vylth/kricket-clientQuick Start
import { KricketClient } from '@vylth/kricket-client';
const kricket = new KricketClient({ apiKey: 'your-api-key' });
// Scan a token for rug-pull risk
const { scan, risk_score } = await kricket.mantis.scan('TOKEN_ADDRESS');
console.log(risk_score.rating); // 'low' | 'moderate' | 'high' | 'critical'
console.log(risk_score.score); // 0–100
// Get a wallet intelligence profile
const wallet = await kricket.firefly.getWallet('WALLET_ADDRESS');
console.log(wallet.score, wallet.style, wallet.win_rate);Clients
| Client | Description | Key Methods |
|--------|-------------|-------------|
| kricket.mantis | Rug-pull detection & token risk scoring | scan(token), getScore(token), addToWatchlist(tokens), getWatchlist() |
| kricket.firefly | Wallet intelligence & smart money signals | getWallet(address), getSignals(), getLeaderboard(), track(address) |
| kricket.pulse | Unified price feeds (CEX + DEX) | getPrice(symbol), getSpread(symbol) |
| kricket.chirps | Notification channel management | listChannels(), createChannel(config), deleteChannel(id) |
| kricket.debugger | Smart contract vulnerability analysis | analyze(source, language) |
Configuration
const kricket = new KricketClient({
apiKey: 'your-api-key',
baseUrl: 'https://api-cricket.vylth.com/api/kricket', // optional override
timeout: 30000, // ms, default 30s
});Error Handling
import { KricketError } from '@vylth/kricket-client';
try {
const result = await kricket.mantis.scan(token);
} catch (err) {
if (err instanceof KricketError) {
console.error(err.code, err.message, err.status);
}
}