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

@uvrn/test

v1.0.0

Published

Centralized mocks, fixtures, and factory functions for building on UVRN

Readme

@uvrn/test

@uvrn/test is the shared development-time toolkit for UVRN packages. It provides factories, fixtures, and in-memory mocks so packages can test receipt flows, drift snapshots, canon storage, and farm connectors without provisioning external services.

Install (dev only)

npm install --save-dev @uvrn/test @uvrn/core

@uvrn/drift and @uvrn/canon are optional peer dependencies. Install them when the package under test uses those surfaces.

@uvrn/test is a development-only package. Do not add it as a runtime dependency.

Usage

import {
  MockFarmConnector,
  MockSigner,
  MockStore,
  fixtures,
  mockCanonReceipt,
  mockReceipt,
} from '@uvrn/test';

const receipt = mockReceipt({ v_score: 88, status: 'STABLE' });
const canonReceipt = mockCanonReceipt({ claim_id: 'clm_001' });

const farm = new MockFarmConnector({ latencyMs: 25 });
const result = await farm.fetch('clm_001');

const store = new MockStore();
await store.save(canonReceipt);

const signer = new MockSigner({ address: '0xABC123' });
const signed = await signer.sign(receipt);

console.log(result.claimId, signed.signature, fixtures.stableReceipt.v_score);

Factory functions

  • mockReceipt(overrides?)
  • mockDriftSnapshot(overrides?)
  • mockAgentDriftReceipt(overrides?)
  • mockCanonReceipt(overrides?)
  • mockFarmResult(overrides?)

Each factory accepts Partial<T> overrides so tests only specify the fields they care about.

Mock classes

MockFarmConnector

Reference implementation of the current @uvrn/agent FarmConnector shape. It supports the actual ClaimRegistration input and a plain string shorthand for tests.

MockStore

In-memory canon receipt store. It exposes ergonomic test helpers (save, get, list) and also satisfies the current CanonStore interface (write, read, exists).

MockSigner

Small signer utility for tests. It returns signed envelopes for general receipt tests and supports canon-style sign, verify, and verifyWithPublicKey methods.

Fixtures

  • fixtures.claimId
  • fixtures.stableReceipt
  • fixtures.driftingReceipt
  • fixtures.criticalReceipt

These provide ready-made baseline states for unit tests and examples.

Public API

  • mockReceipt
  • mockDriftSnapshot
  • mockAgentDriftReceipt
  • mockCanonReceipt
  • mockFarmResult
  • MockFarmConnector
  • MockStore
  • MockSigner
  • fixtures
  • UVRNReceipt
  • UVRNReceiptSource
  • MockFarmConnectorOptions
  • MockSignerOptions
  • MockSignedEnvelope

Dependencies

  • Peer dependencies: @uvrn/core, @uvrn/drift (optional), @uvrn/canon (optional)
  • Runtime dependencies: none