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

tereno-client

v0.3.0

Published

x402 client for Tereno execution intelligence, reusable web evidence and agent demand signals

Readme

tereno-client

Pre-sign Base transaction and contract-change intelligence with no API key or account. The wallet signing the x402 payment is the consumer identity.

Direct client

import { privateKeyToAccount } from "viem/accounts";
import { createTerenoClient } from "tereno-client";

const client = createTerenoClient({
  baseUrl: "https://tereno.xyz",
  account: privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`),
  network: "eip155:8453",
  maxPriceUsd: 0.02,
  builderCode: "my_agent_service", // optional client/service (`s`) attribution
  evidenceInstallationId: process.env.TERENO_INSTALLATION_ID, // stable random id, never a wallet
});

const guarded = await client.invokeCapability({
  capabilityId: "transaction.intent.guard",
  from: client.address,
  to: unsignedTx.to,
  data: unsignedTx.data,
  value: unsignedTx.value.toString(),
});

if (guarded.data.verdict === "block") throw new Error("Tereno blocked signing");

const changed = await client.invokeCapability({
  capabilityId: "contract.change",
  address: unsignedTx.to,
});

const page = await client.compileWebPage("https://example.com/article");

// Another agent can hand you `changed.data.evidenceReference.artifactId`.
// This read is free and independent from Bazaar/x402 payment.
const reference = await client.evidenceReference(changed.data.evidenceReference.artifactId);

// Older wallet-intelligence APIs remain available during migration.
const quote = await client.lookup("wallet_reputation", subject);
const quoted = await client.get("wallet_reputation", subject);
const direct = await client.getDirect("wallet_reputation", subject);
await client.feedback(quoted.data.discoveryId, true);

invokeCapability() obtains a wallet-bound quote, follows its GET or POST contract, completes x402 and returns data plus the settlement receipt. The canonical transaction guard costs $0.005 and contract.change costs $0.001 by default. tx.preflight remains an accepted deprecated alias.

lookup() signs an EIP-712 agent action and returns the legacy discovery quote without paying. That signature is what unlocks wallet-specific standing and reserved credit; the later x402 payer must match. buy(buyUrl) pays a single-use quoted URL. get() performs both steps and returns data plus the settlement transaction.

getDirect() buys at public list price from the Bazaar-enabled route without a prior lookup. feedback() is signed and is accepted once, only from a settled purchaser. Pass builderCode to attribute client-driven Base settlements as an ERC-8021 service code.

AgentKit users can import terenoActionProvider from tereno-client/agentkit. It exposes a free quote action and a budget-limited direct x402 purchase action for Base and Base Sepolia wallets.

import { terenoActionProvider } from "tereno-client/agentkit";

const provider = terenoActionProvider({
  baseUrl: "https://tereno.xyz",
  maxPriceUsd: 0.02,
  builderCode: "my_agent_service",
});

// Include `provider` in the AgentKit actionProviders array.

The provider exports these primary semantic actions:

  • tereno_buy_transaction_intent_guard: pre-sign intent, simulation, gas, supported balance/allowance deltas and target-state risks.
  • tereno_buy_aerodrome_swap_guard: private pre-sign simulation and encoded limit check for prepared Aerodrome Classic or Slipstream swaps on Base.
  • tereno_check_contract_change: bytecode, implementation, admin and pause changes.
  • tereno_quote_contract_guard and tereno_buy_contract_guard: bounded reusable contract check.
  • tereno_list_capabilities: machine-readable prices and contracts.
  • tereno_compile_web_page: bounded public URL → Markdown, citations and a reusable content-addressed artifact ($0.005 fresh / $0.001 reused).

The legacy wallet-intelligence actions remain available during migration:

  • tereno_lookup_wallet_intelligence: free economics/availability lookup.
  • tereno_buy_wallet_intelligence: direct Bazaar-compatible x402 purchase.