Hi Gophers,

I'm excited to announce the v1.1.0 release of go-monblob – a pure Go, 
zero-dependency library for parsing and serializing Monero transaction binary 
blobs (tx_blob).

Repository: https://github.com/cexpepe/go-monblob
Documentation: https://pkg.go.dev/github.com/cexpepe/go-monblob
The Problem It Solves

If you've ever worked with Monero in Go, you've likely encountered the same 
frustration: there is no standalone, well-maintained library that handles 
transaction blob parsing. Existing Go libraries like go-monero and go-xmr-lib 
are great for RPC communication, but blob parsing is typically a side 
feature—often incomplete, tied to specific RPC versions, or not maintained as 
an independent component.

The result? Developers end up reading Monero's C++ source code 
(cryptonote_basic.h) and re-implementing the binary format from scratch. This 
leads to fragmentation, subtle bugs, and duplicated effort across projects.

go-monblob aims to fill this gap by providing a clean, well-tested, and 
performant translation layer between []byte and structured transaction data.
What It Does

go-monblob follows CNS003 and Monero v0.18+ specifications, adopting a "precise 
prefix parsing + raw signature retention" strategy to support all transaction 
versions (V1/V2) and all RingCT types (0–5).

Core API:

tx, err := monblob.Parse(blob) // []byte → Transaction
blob, err := monblob.Serialize(tx) // Transaction → []byte
txid := tx.Hash() // Keccak-256(prefix)
prefix, _ := monblob.ParsePrefix(blob) // prefix only (no signatures)

Key Features:

Zero external dependencies – only uses the Go standard library (plus 
golang.org/x/crypto/sha3 for Keccak-256)

Full parsing & serialization – supports Transaction and TransactionPrefix with 
complete round‑trip support

Lossless round‑trips – signature blocks (including RingCT) are kept as raw bytes

High performance – parses 100,000+ typical transactions (~2KB) per second on a 
single core

Production‑ready security – built‑in recursion depth, slice size, and memory 
limits to prevent DoS attacks

Fuzz testing – native Go fuzz tests continuously verify robustness

Streaming support – ParseFromReader and SerializeToWriter for handling large 
data

Project Status

Version: v1.1.0 (stable, tagged)

Test Coverage: ~79% (Codecov)

License: MIT

Go Version: 1.24+

The library is already being used in production environments and has been 
tested against real mainnet transactions.
How You Can Help

I'm looking for:

Code reviews – feedback on API design and implementation

Adoption – if you're building anything in Go that touches Monero transactions, 
please consider using this library

Issues – open an issue if you find edge cases or missing features

The goal is to establish a common, reliable foundation for Monero transaction 
handling in Go—so we can all stop rewriting parsers.

Check it out: https://github.com/cexpepe/go-monblob

Thanks for reading, and I'd love to hear your thoughts!

Best,
cexpepe

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/bTh5TgD4mcRSDNi36zL5qpbRhiuiAHPnqx5vQQNJFCTgGxzkZVchEgaYPx8Jd6UEj2vN4y5BAdH0rT-3DzgpJOvmxoAyF4fSDBI7nl93Cqc%3D%40proton.me.

Reply via email to