npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@prajwalghate/sourcetruth

v0.1.2

Published

See what Daml and Solidity contract code does — who can act, what each action changes — from source, and what could not be traced.

Readme

sourcetruth

npm test license: MIT

Documentation · Live demo · Guide

See what smart-contract code does — who can act, and what each action changes — straight from the source. And see, just as plainly, what it could not trace.

Works on Daml (Canton) and Solidity. One command, one self-contained HTML file, no server.

sourcetruth --demo -o demo.html
sourcetruth ./contracts --html -o map.html

The first maps a bundled example; the second, your own code.

What you get

A map of the protocol you can click through:

  • Who can act — every party the code lets take an action, split into those outside the protocol and those running it. Worked out from the code, not from what things are called.
  • What an action does — pick one and press Play: what it archives, what it creates, what it calls, in the order the code does them, and whose authority it carries beyond the caller's own.
  • Each contract's life — what makes it, what replaces it, what ends it.
  • Blind spots — every call whose target can't be named from source is shown in amber. The tool never guesses one and never drops one.

Comments are stripped before anything is read. If a comment says a function is admin-only and the code says otherwise, the map shows the code.

Install

Node 22 or newer. No dependencies.

npm install -g @prajwalghate/sourcetruth
sourcetruth --version

Use it

| Command | Shows | |---|---| | sourcetruth ./contracts | A summary and the blind spots, in the terminal | | sourcetruth ./contracts --html -o map.html | The interactive map | | sourcetruth ./contracts --surface | Actions one party can take alone | | sourcetruth ./contracts --json | The full model, for your own tooling | | sourcetruth ./contracts --min-resolution 90 | For CI: fails if too little can be traced |

Replace ./contracts with the folder that holds your Daml or Solidity source.

GUIDE.md walks through a first audit, reading the map, every option, CI, and what the tool cannot tell you.

In CI

- uses: prajwalghate/sourcetruth@v0
  with:
    path: ./contracts
    min-resolution: 90

The map is uploaded as a workflow artifact and a summary is written to the run.

Contributing

Bug reports with a small piece of code that shows the problem are the most useful thing you can send — unfamiliar code is how most of this tool's bugs have been found. See CONTRIBUTING.md.

What it is not

Not a bug finder. It has no vulnerability patterns and makes no judgement about whether code is wrong. It draws what the code does so a person can decide — and it stores no findings.

License

MIT