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

indelible

v0.3.3

Published

Client library for the Indelible Standard — attest, verify, delegate, and prove quotes from on-chain content attestations.

Readme

indelible

JavaScript client library for the Indelible Standard: on-chain content attestations, delegation, ENS bindings, and Merkle-based quote proofs.

This package extracts the core logic from the indelible-static front-end into a framework-agnostic library you can use from any browser app, Node script, or back-end service.

Installation

npm install indelible viem

viem is a peer dependency — bring your own version (^2.0.0).

Quick start

Verify a CID

import { createPublicClient, http } from 'viem';
import { sepolia } from 'viem/chains';
import { verifyCid } from 'indelible';

const publicClient = createPublicClient({
    chain: sepolia,
    transport: http(),
});

const result = await verifyCid(publicClient, 'bafkrei...');
console.log(result.headline, result.details);

Verify a quote proof JSON

import { verifyQuoteProof } from 'indelible';

const proofData = JSON.parse(await file.text());
const { verification, quoteText, allProofsValid } = await verifyQuoteProof(
    publicClient,
    proofData,
);

Commit + reveal an attestation

import { createWalletClient, createPublicClient, custom } from 'viem';
import { sepolia } from 'viem/chains';
import { commitAttestation, revealAttestation } from 'indelible';

const walletClient = createWalletClient({
    account,
    chain: sepolia,
    transport: custom(window.ethereum),
});
const publicClient = createPublicClient({ chain: sepolia, transport: custom(window.ethereum) });

const { pendingCommit } = await commitAttestation({
    walletClient,
    publicClient,
    content: 'Hello, world.',
    account,
});

// Wait for the chain's commit/reveal delay (≈60s) before calling reveal:
const { attestationIndex } = await revealAttestation({
    walletClient,
    publicClient,
    pendingCommit,
    account,
});

Generate a quote proof

import { proveQuote, downloadJson } from 'indelible';

const { proofJson, onChain } = await proveQuote({
    articleText,
    quote,
    authority,
    publicClient,        // optional — embeds chainId + attestationIndex when found
});
downloadJson(proofJson, 'quote-proof.json'); // browser only

API surface

Constants — indelible/constants

  • TAANQ_ADDRESS, ENS_INDELIBLE_ADDRESS, ENS_REGISTRY_ADDRESS
  • MERKLE_SPLIT — chunk size used for Merkle quote proofs (46 chars)
  • RESULT_CODE{ NOT_FOUND, VERIFIED, UNVERIFIED, REVOKED, WARNING }

Utilities — indelible/utils

  • hashContent(data) / hexHashContent(data) — SHA-256 of bytes/string
  • createRawCIDv1(data) — base32 CIDv1 of content
  • getCIDFromHash(hash) / getCIDFromRawDigest(bytes) — CID from raw digest
  • decodeCidToIpfsHash(cidStr) — extract bytes32 hex from a CID
  • buildTree(text) — Merkle tree of fixed-size text chunks
  • dnsEncodeName(name) — DNS wire-format encoding for ENS contracts
  • prettifyTimestamp(ts) — formatted local time string
  • downloadJson(data, filename) — browser file download

Verification — indelible/verify

  • verifyCid(publicClient, cid, authority?)VerificationResult
  • verifyQuoteProof(publicClient, proofData){ verification, quoteText, allProofsValid }
  • getAttestationByIndex(publicClient, index)
  • cidToAttestationIndices, cidAndAddressToAttestationIndices
  • Classes: Attestation, VerificationResult

Writes & publishing — indelible/publish

  • commitAttestation({ walletClient, publicClient, content, account, authority?, parentIpfsHash? })
  • revealAttestation({ walletClient, publicClient, pendingCommit, account })
  • revokeAttestation({ walletClient, publicClient, attestationId, account })
  • delegate({ walletClient, publicClient, delegateAddress, account })
  • revokeDelegation({ walletClient, publicClient, account })
  • proveQuote({ articleText, quote, authority, publicClient?, chainId? })
  • registerEnsBinding({ walletClient, publicClient, ensName, account })
  • getExistingAttestationIndex({ publicClient, ipfsHash, authority })
  • getDelegation({ publicClient, authority })
  • generateSalt(), buildSaltedHash(ipfsHash, address, salt)

ABIs

  • indelible/abi/taanq — taanq attestation contract ABI (JSON)
  • indelible/abi/ens — Indelible ENS contract ABI (JSON)

Notes

  • All write functions take a viem walletClient + publicClient. The library does not bundle wallet discovery (EIP-6963) or chain switching — those concerns live in the host app.
  • The commit phase emits a pendingCommit tuple — persist it (e.g. localStorage) until the contract's reveal delay elapses, then pass it to revealAttestation.
  • downloadJson is a browser-only convenience; call sites in Node should serialize JSON themselves.

License

MIT