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

@iota/audit-trails

v0.1.1

Published

WASM bindings for IOTA Audit Trail. To be used in JavaScript/TypeScript.

Readme

audit_trail_wasm

audit_trail_wasm exposes the audit_trails Rust crate to JavaScript and TypeScript consumers through wasm-bindgen.

It is designed for browser and other wasm32 environments that need:

  • read-only and signing audit-trail clients
  • typed wrappers for trail handles, records, locking, access control, and tags
  • serializable value and event types that map cleanly into JS/TS
  • transaction wrappers that integrate with the shared product_common wasm transaction helpers

Main entry points

  • AuditTrailClientReadOnly for reads and inspected transactions
  • AuditTrailClient for signed write flows
  • AuditTrailBuilder for creating new trails
  • AuditTrailHandle for trail-scoped APIs
  • TrailRecords, TrailLocking, TrailAccess, and TrailTags for subsystem-specific operations

Choosing an entry point

  • Use AuditTrailClientReadOnly when you need reads, package resolution, or inspected transactions.
  • Use AuditTrailClient when you also need typed write transaction builders.
  • Use AuditTrailHandle after you already know the trail object ID and want to stay scoped to that trail.
  • Use AuditTrailBuilder when you are preparing a create-trail transaction.

Data model wrappers

The bindings expose JS-friendly wrappers for the most important Rust value types:

  • Data
  • Permission and PermissionSet
  • RoleTags, RoleMap, and CapabilityIssueOptions
  • TimeLock, LockingWindow, and LockingConfig
  • Record, PaginatedRecord, and OnChainAuditTrail
  • event payloads such as RecordAdded, RoleCreated, and CapabilityIssued

Typical read flow

  1. Create an AuditTrailClientReadOnly or AuditTrailClient.
  2. Resolve a trail handle with .trail(trailId).
  3. Read state with .get(), .records().get(...), .records().listPage(...), or .locking().isRecordLocked(...).

Typical write flow

  1. Create an AuditTrailClient with a transaction signer.
  2. Build a transaction from client.createTrail(), client.trail(trailId), or one of the trail subsystem handles.
  3. Convert that transaction wrapper into programmable transaction bytes.
  4. Submit it through your surrounding JS transaction flow and feed the effects and events back into the typed applyWithEvents(...) helper.

The package intentionally separates transaction construction from submission so browser apps, wallet integrations, and server-side signing flows can keep transport and execution policy outside the package.

Minimal TypeScript shape

import { AuditTrailClientReadOnly } from "@iota/audit-trails";

const client = await AuditTrailClientReadOnly.create(iotaClient);
const trail = client.trail(trailId);
const state = await trail.get();

console.log(state.sequenceNumber);

Build

npm install
npm run build

Examples

See examples/README.md for runnable node and web example flows.