Skip to content

mumak

Cardano CBOR parser

mumak · Cardano CBOR parser

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
100804mumakmumak0.0.6UTILApache-2.0Rust

PostgreSQL · 11, 12, 13, 14, 15, 16

Usage

Sources:

mumak 0.0.6 is a pgrx extension for inspecting Cardano CBOR inside PostgreSQL. It lets an indexer keep blocks, transactions, or UTxOs as bytea and derive hashes, addresses, fees, lovelace and asset amounts, metadata, Plutus data, epochs, slots, and other fields in SQL without first normalizing every structure.

Verify installation and query CBOR

CREATE EXTENSION mumak;
SELECT hello_extension();

SELECT tx_hash(tx_cbor), tx_fee(tx_cbor), tx_outputs_json(tx_cbor)
FROM cardano_transactions;

Implemented function families include block_tx_count(bytea), block_number(bytea), tx_hash(bytea), tx_inputs(bytea), tx_outputs(bytea), tx_is_valid(bytea), utxo_lovelace(integer,bytea), and address/Bech32 conversion helpers. Use the Rust implementation as the API authority: the top-level README contains planned names that do not exactly match all functions shipped in 0.0.6.

Input and deployment cautions

Many decode failures return sentinel results such as an empty value, false, zero, or -1 instead of raising an error. Validate CBOR and its era/network context before treating those results as blockchain facts. The control file requires superuser installation. The reviewed Cargo features cover PostgreSQL 11 through 16, and the project publishes only source and limited Linux artifact guidance; build and regression-test the exact server/architecture combination.

Table reader