yellowstone-grpc-mock

JSON →
library 0.1.4 ·javascript
verified Jun 7, 2026

A Jest mock for @triton-one/yellowstone-grpc that emits real serialized on-chain data, including SPL token account layouts and Metaplex metadata. v0.1.4 enables integration tests that exercise the full deserialization pipeline, not just business logic after parsing. It serializes byte layouts using runtime libraries (@solana/spl-token, @metaplex-foundation/mpl-token-metadata) and wraps them in valid SubscribeUpdate protobufs streamed via a Duplex. The mock starts playback on the first SubscribeRequest, mirroring real Geyser stream behavior. Key differentiators: tests edge cases like self-transfers, zero-amount mints, and frozen states; ships TypeScript types; requires peer deps be installed separately.