explaingit

kzn-labs/wiretap

Analysis updated 2026-05-18

2RustAudience · developerComplexity · 3/5Setup · moderate

TLDR

A Rust CLI and library that streams events from the Sui blockchain over gRPC, saves filtered results to SQLite or Postgres, and resumes automatically from where it left off.

Mindmap

mindmap
  root((repo))
    What it does
      Sui event streaming
      Filter and index
      Gap backfill on reconnect
    Filters
      Event type
      Package address
      Sender or recipient
    Sinks
      SQLite default
      Postgres
      Webhook batched
      Stdout NDJSON
    Tech Stack
      Rust
      gRPC streaming
      BCS decoding
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Replace deprecated suix_queryEvents JSON-RPC polling with a persistent gRPC stream that saves Sui events to a local SQLite file

USE CASE 2

Watch specific Sui smart contract events filtered by sender or event type and forward them to a webhook

USE CASE 3

Embed wiretap-core into a Rust application to process decoded Sui events with a custom handler

USE CASE 4

Backfill missed Sui events for a specific checkpoint range after a downtime

What is it built with?

RustgRPCSQLitePostgres

How does it compare?

kzn-labs/wiretapcallmealphabet/fastcpcodingstark-dev/decant
Stars222
LanguageRustRustRust
Setup difficultymoderateeasyeasy
Complexity3/51/53/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a Sui fullnode endpoint with gRPC access, prebuilt binaries are available for Linux, macOS, and Windows.

The README does not state a license for this project.

In plain English

Wiretap is a small Rust command-line tool that listens to the Sui blockchain and saves specific events to a local database. Sui deprecated its older polling-based query APIs in July 2026, so Wiretap exists as a replacement that uses Sui's new streaming approach instead. The tool connects to a Sui node over a persistent connection, receives blockchain events in order as they happen, and writes only the events matching your filters to storage. You specify which events to capture using filters in a configuration file: you can match by event type, by the package that emitted the event, by sender address, or by affected address. Wiretap compiles these filters at startup and runs each incoming event through them. For large address watchlists, it uses a bloom filter as a quick pre-check before more detailed matching. The tool saves its position in the chain so that if it disconnects or restarts, it picks up exactly where it left off and fills in any events it missed during the gap. Four storage options are available: a SQLite file that requires no setup, a Postgres database, a webhook that batches events to a URL with automatic retries, and standard output for piping into other tools. Wiretap also works as a Rust library. You can embed the wiretap-core crate into your own application and write a custom handler that receives decoded events in about twenty lines of code. Event data arrives already decoded from the binary format Sui uses, with struct types and nested objects resolved locally by fetching the type layout from the node. The README does not state a license for this project.

Copy-paste prompts

Prompt 1
I used suix_queryTransactionBlocks to track swap events from my Sui DEX contract. Walk me through writing a wiretap.toml config that captures the same events using the new gRPC stream.
Prompt 2
How do I embed wiretap-core into my own Rust project to receive decoded Sui events in my application without using the CLI?
Prompt 3
I want wiretap to send batched events to a webhook endpoint with retries. How do I configure the webhook sink in wiretap.toml?
Prompt 4
How does wiretap handle a reconnect after a network outage and what guarantee does it make about not missing events?

Frequently asked questions

What is wiretap?

A Rust CLI and library that streams events from the Sui blockchain over gRPC, saves filtered results to SQLite or Postgres, and resumes automatically from where it left off.

What language is wiretap written in?

Mainly Rust. The stack also includes Rust, gRPC, SQLite.

What license does wiretap use?

The README does not state a license for this project.

How hard is wiretap to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is wiretap for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub kzn-labs on gitmyhub

Verify against the repo before relying on details.