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

@telaro/gate

v0.1.1

Published

Trust gate for AI agents on Solana. Verifies an agent's USDC bond and Telaro score against your policy, throws if it fails.

Downloads

269

Readme

@telaro/gate

One-line trust gate for AI agents on Solana.

Verifies that an agent meets your bond + score policy before you delegate capital to it. Throws if the agent isn't bonded, score too low, bond too small, or frozen.

npm install @telaro/gate

The whole API

import { gate } from "@telaro/gate";

await gate("AgentPubkey...", {
  minBond: 1_000_000_000n,  // 1000 USDC (atomic, 6dp)
  minScore: 700,
});
// → throws TelaroGateError on failure
// → returns trust profile on success

That's the integration. Wrap your delegate(capital) / accept_deposit() / place_order() call in gate(...) and you're done. Default fails closed — if Telaro REST is unreachable, the call throws so you never delegate to an unverified agent.

Common patterns

Drop-in before a delegation

import { gate, TelaroGateError } from "@telaro/gate";

async function delegateCapital(agentPubkey: string, amountUsdc: bigint) {
  try {
    await gate(agentPubkey, { minBond: 5_000_000_000n, minScore: 750 });
  } catch (err) {
    if (err instanceof TelaroGateError) {
      console.warn(`refused delegation: ${err.code}`);
      return;
    }
    throw err;
  }
  // safe to delegate — agent is bonded, scored, and not frozen
  await yourVault.deposit(agentPubkey, amountUsdc);
}

Non-throwing variant

import { tryGate } from "@telaro/gate";

const result = await tryGate(agentPubkey, {
  minBond: 5_000_000_000n,
  minScore: 750,
});
if (!result.ok) {
  return { error: result.code, message: result.reason };
}
console.log(`score=${result.trust.agent.score}`);

Telemetry hook

await gate(agentPubkey, policy, {
  onDecision(event) {
    metrics.record("telaro.gate", {
      decision: event.decision,
      code: event.code,
      durationMs: event.durationMs,
    });
  },
});

Custom endpoint / API key

await gate(agentPubkey, policy, {
  apiBase: "https://telaro.xyz",   // default
  apiKey: process.env.TELARO_API_KEY,
  cacheTtlMs: 60_000,              // 30s default
});

Degraded-mode fallback (advanced)

Only set allowOnLookupFailure: true if your downstream call is reversible or idempotent. Otherwise you risk delegating capital with no trust info.

const trust = await gate(agentPubkey, policy, {
  allowOnLookupFailure: true,
});
if (trust.is_mock) {
  console.warn("telaro lookup failed — proceeding in degraded mode");
}

Choosing between @telaro/* packages

| Package | When to use | |---|---| | @telaro/gate | You want one explicit check before delegating. Start here. | | @telaro/middleware | You want to wrap an entire third-party SDK so every method is auto-gated. | | @telaro/sdk | You want full read+write access (register, record actions, file claims). | | telaro-gate (Rust) | You want on-chain CPI gating from your own Anchor program. |

Failure codes

| Code | Meaning | |---|---| | NOT_BONDED | No on-chain agent record found. | | BOND_BELOW_MIN | Agent's current bond is below minBond. | | SCORE_BELOW_MIN | Agent's score is below minScore. | | FROZEN | Agent is frozen (open dispute, slashed below floor, etc.). | | LOOKUP_FAILED | Telaro REST was unreachable. Fails closed by default. |

License

MIT — see LICENSE.