solixdb is a lightweight, configurable, and high-performance indexing package for Solana. Use it to listen for on-chain events and stream them directly into your database of choice.
npm install --save solixdbimport { SolanaIndexer, JSONStorage } from 'solixdb';
// Initialize storage
const storage = new JSONStorage('./blockchain-data.json');
// Configure indexer
const indexer = new SolanaIndexer(
{
env: 'mainnet',
type: 'transaction',
accounts: ['TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'],
pollInterval: 5000,
},
storage
);
// Start indexing
await indexer.start();
// Query indexed data
const transactions = await indexer.query({});
console.log(`Indexed ${transactions.length} transactions`);
// Stop indexer
await indexer.stop();Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
