Skip to main content
Glama
dd-explain

dd-explain

by dgb-tools

dd-explain-mcp

DigiDollar transaction explainer — a read-only MCP server (stdio) and CLI that tells an AI agent what a DigiDollar transaction recorded in DigiByte actually did: mint, transfer, or redemption; amounts in cents; lock tier and maturity; what was burned; whether collateral was released. Built on dgb-digidollar-codec, the same decoder that reconciled DigiDollar's first mainnet week to the node to the cent. Zero other dependencies. Node 18+.

Human version of the same thing: dgbinsights.com/lookup.

Install

npm install
npm test                       # 19 offline tests against bundled fixtures

Related MCP server: dgb-digiid-mcp

Use

node bin/dd-explain.js <txid>                      # offline: bundled fixtures only
ALLOW_NETWORK=1 node bin/dd-explain.js <txid>      # live: digiexplorer.info
node bin/dd-explain.js --decode 6a0244440103021027 # decode an OP_RETURN script
node bin/dd-explain.js <txid> --json

MCP (stdio) — add to your client's server list:

{ "dd-explain": { "command": "node", "args": ["/path/to/dd-explain-mcp/bin/dd-explain-mcp.js"], "env": { "ALLOW_NETWORK": "1" } } }

Tools: explain_digidollar_tx(txid) and decode_dd_opreturn(scriptPubKeyHex). Network access is off by default; the source field of every answer says whether it came from a bundled fixture or the live explorer.

What it computes that an explorer does not

The DigiDollar record in a redemption declares the change the redemption re-creates, not the burn. This tool values the consumed DD inputs one hop back — from the records of the transactions that created them — and reports burn = consumed − change, with the creating transactions listed. Fixtures for the creating transactions of the bundled redemption are included, so the example below computes fully offline; where a creating transaction is unreachable, the burn is reported as Unverified rather than guessed. Example:

34c67c35…  consumed $201.00 · change $100.00 · burn $101.00   (explorer shows "Burn $100.00")
58f910ce…  consumed $520.00 · change $100.00 · burn $420.00   (explorer shows "Burn $100.00")

That discrepancy is raised with DigiByte Core in Discussion #446.

Vocabulary

Output uses only factual phrasing — "recorded in DigiByte transaction", "included in block N", "timestamped commitment", "consensus type byte" — and marks every inference Unverified. The words proof, verified, notarized, immutable, authentic are refused by a check on the emitted text. Facts and hashes only; no address, entity, or reputation labels.

Layout

See ARCHITECTURE.md. The codec owns every decoding rule; src/explain.js owns the explanation, the burn math, and the fence.

Provenance

Scaffolded by Michael Emery's Grok-based build agent from a written spec, then reviewed, patched (one-hop burn valuation), and tested in the DGB Tools lane. Describes DigiByte Core v9.26.5 behaviour as of September 2026. Part of dgb-tools — independent community tooling, not affiliated with the DigiByte Foundation. MIT.

Available Tools

2 tools
decode_dd_opreturnA

Offline decode of a DigiDollar OP_RETURN scriptPubKey hex via parseDDOpReturn. Returns consensus type byte kind (mint/transfer/redeem), amounts in cents, and fields. No network. Read-only. Does not label entities.

Inputs: scriptPubKeyHex (required).

explain_digidollar_txA

Explain a DigiDollar transaction recorded in DigiByte from its txid. Resolution is fixture-first: offline fixtures/TXID.json is preferred; live digiexplorer.info only when ALLOW_NETWORK=1. The response source field labels fixture vs digiexplorer — agents must not treat a fixture as live chain state. Classifies via consensus type byte; returns kind, amounts (cents/USD), ddOutputs, burns if redeem (burn = consumed − change via one-hop valuation of creating txs when reachable), collateralSpends count, shapeOk, block height/time if present, and disclaimer fields. Read-only. Facts and hashes only; inferences marked Unverified. Product name: DigiDollar transaction explainer (dd-explain-mcp). Lookup UI: https://dgbinsights.com/lookup

Inputs: txid (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools take entirely different inputs (a txid vs. OP_RETURN hex) and serve distinct purposes: high-level transaction explanation versus low-level script decoding. Their descriptions clearly delineate when each should be used, leaving no ambiguity.

    Naming Consistency5/5

    Both tools follow the same verb_noun snake_case pattern: explain_digidollar_tx and decode_dd_opreturn. The verbs accurately describe the action and the nouns specify the target, making the naming predictable and consistent.

    Tool Count3/5

    With only two tools, the server feels thin even though its purpose is narrowly focused on explaining DigiDollar transactions. The count is borderline but acceptable for such a specialized utility; it is not excessive but also not richly scoped.

    Completeness4/5

    The tool surface covers the essential workflows for its domain: full transaction explanation and offline OP_RETURN decoding. Minor gaps exist, such as no support for raw full-transaction hex decoding, but the core explainer and decoder are sufficient for most use cases.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Gives AI agents a verifiable identity using Digi-ID passwordless authentication on DigiByte, enabling them to prove who they are by signing challenges without revealing private keys.
      10 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables on-chain attestation of any content onto the DigiByte blockchain, providing permanent, timestamped, tamper-evident proofs. Allows AI agents to notarize their outputs or verify attestations using only the blockchain.
      7 npm
      MIT