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

@trufnetwork/evm-contracts

v0.1.0-beta.0

Published

Truf Network EVM attestation helpers (Solidity + TypeScript)

Readme

@trufnetwork/evm-contracts

Solidity helpers and supporting TypeScript utilities for verifying TrufNetwork attestations. The package is published on npm as @trufnetwork/evm-contracts.

Installation

pnpm add @trufnetwork/evm-contracts

or with npm:

npm install @trufnetwork/evm-contracts

Solidity Usage

import {TrufAttestation} from "@trufnetwork/evm-contracts/contracts/attestation/TrufAttestation.sol";

contract Consumer {
    using TrufAttestation for bytes;

    function verify(bytes calldata payload, address validator) external view returns (bool) {
        TrufAttestation.Attestation memory att = payload.parse();
        return att.verify(validator);
    }
}

For a more complete example (including leader management), see the reference contract linked in the Attestation Library guide.

TypeScript Helpers

The package also exports helpers for building canonical payloads in tests or off-chain tooling:

import { buildCanonicalAttestation, buildSignedAttestation } from "@trufnetwork/evm-contracts";

const canonical = buildCanonicalAttestation(fields);
const payload = buildSignedAttestation(fields, signatureBytes);

Refer to docs/AttestationLibrary.md for details on the field layout and helper APIs.


Chainlink Functions Toolkit

The repository still contains development tooling for Chainlink Functions and legacy oracle flows. The sections below cover the existing setup.

Requirements

  • Node.js
  • Deno

See chainlink-functions-toolkit prerequisites for minimum versions.

Setup

Install dependencies

pnpm install

Usage

Run the Deno script directly

To test the Deno script directly, run

pnpm run run:direct

[!NOTE] You may encounter a timeout error. If so, you can uncomment the timeout option inside the simpleExample.ts file. Note that it's not possible to do this on a live environment.

Hardhat

Tasks

To see available hardhat tasks and their arguments, run

pnpm hardhat

This will include a list of tasks to interact with our contracts. For a comprehensive overview of available tasks and their functionalities, refer to the Tasks Overview section in the Developer Guide.

Deployment

We use Hardhat Ignition to deploy our contracts to the network.

For detailed deployment instructions, refer to:

Demonstration

We have an example of a TNClientExample contract that requests data from a hardcoded stream. See contracts/example/README.md for more information.

TNOracle

The TNOracle contract is deployed by the team and is used to request data using the request function. You may call it from your own contract, or directly from your EOA.

For detailed information about TNOracle, including:

  • Lifecycle (deployment, configuration, upgradability)
  • Roles and permissions
  • Data handling
  • External contract usage
  • Remote code integration

See TNOracle Documentation.

For developers integrating with TNOracle:

  • Developing a TNConsumer
  • Best practices (testing, security, gas optimization, error handling)
  • Support

Refer to the Developer Guide.

Attestation Library

Smart contracts that ingest signed attestations can import contracts/attestation/TrufAttestation.sol to parse payloads, recover signer addresses, and decode datapoints. Start with the Attestation Library guide for payload format, usage snippets, and TypeScript helpers that mirror the canonical encoder maintained in github.com/trufnetwork/node (extensions/tn_attestation/canonical.go).