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

@frontiercompute/zap1-zodl

v0.1.0

Published

ZAP1 helpers for the ZODL ecosystem. Typed swap, stake, faucet, Flexa, and address book attestations.

Readme

@frontiercompute/zap1-zodl

import { Zap1Client } from "@frontiercompute/zap1-attest";
import { ZodlZap1Client } from "@frontiercompute/zap1-zodl";

const zap1 = new Zap1Client({ baseUrl: process.env.ZAP1_BASE_URL, apiKey: process.env.ZAP1_API_KEY });
const zodl = new ZodlZap1Client(zap1, { app: "zashi-ios" });

const leaf = await zodl.attestSwap({ from: "ZEC", to: "USDC", amountIn: "125000000", amountInFormatted: "1.25", recipient: "0xfeedbeef", refundAddress: "u1refund", quote_id: "near-quote-123" });
const anchored = await zap1.waitForAnchor(leaf.leaf_hash, { timeoutMs: 600_000 });
console.log(leaf.leaf_hash, anchored.txid, anchored.height);

Typed ZAP1 helpers for the ZODL ecosystem. The wrapper canonicalizes ZODL payloads, derives a deterministic serial_number, hashes the payload to contract_sha256, and submits a CONTRACT_ANCHOR leaf through @frontiercompute/zap1-attest.

No ZODL app code is imported. No endpoints or secrets are baked in.

Install

npm install @frontiercompute/zap1-attest @frontiercompute/zap1-zodl

API

const zodl = new ZodlZap1Client(zap1, { app: "zashi-ios" });

Supported apps:

  • zashi-ios
  • zashi-android
  • zodl-ios
  • zodl-android
  • zodl-web

Methods:

  • attestSwap({ from, to, amountIn, amountInFormatted, recipient, refundAddress, quote_id? })
  • attestStake({ amount, finalizer_pubkey, stake_epoch })
  • attestUnstake({ stake_id, finalizer_pubkey })
  • attestFaucet({ recipient, amount, source })
  • attestFlexaSession({ session_id, account_id, vendor_guard_present })
  • attestAddressBookChange({ account_id, action, entry_count })

Each helper returns:

  • leaf_hash
  • root_hash
  • verify_url
  • serial_number
  • contract_sha256
  • normalized payload
  • policy_warnings

Event Encoding

Every helper uses:

  • event_type = "CONTRACT_ANCHOR"
  • wallet_hash = "zodl-<app>"
  • serial_number = "zodl-<type>-<hash8>"
  • contract_sha256 = sha256(canonical_payload_json)

That keeps one deterministic attestation shape across swap, stake, faucet, Flexa, and address-book events while still exposing a typed ZODL API to the caller.

Policy Defaults

evaluateZodlPolicy() extends the base evaluatePolicy() helper and adds:

  • block on client/server contract_sha256 mismatch
  • warn when vendor_guard_present === false
  • block JWT bearer tokens unless their SHA-256 fingerprint is allowlisted

Example

See examples/zashi-swap-attestation.ts for a full runnable swap flow from setup through anchor verification.

License

MIT