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/react-presign

v0.2.0

Published

React component DApps drop in to show a Trust Card before delegating capital to a Telaro agent. Works with any wallet adapter — does not require Phantom-specific integration.

Readme

@telaro/react-presign

Drop-in React modal that DApps render before sending a tx that delegates capital to a Telaro agent. Shows the agent's Trust Card (score, bond, action history, disputes) and gates the action with a minBond / minScore policy.

pnpm add @telaro/react-presign @telaro/sdk react

Why a wrapper modal, not Phantom-specific

Phantom, Solflare, and Backpack do not expose a public API for "show custom UI before sign". Rather than integrate per-wallet, this package wraps the DApp's own approve button. The DApp renders our modal first, then proceeds to its existing wallet-adapter flow. Same pattern WalletConnect, RainbowKit, and BlowFish use.

Requirements

  • React 18 or 19 (peer dep; uses host React)
  • Node 18+ with ESM
  • Works in Next.js 15+, Vite, Webpack 5+, esbuild, and Rollup with no extra config

Quickstart

import { usePresignGate } from "@telaro/react-presign";
import { useWallet } from "@solana/wallet-adapter-react";

function DelegateButton({ agentPubkey, amount }) {
  const wallet = useWallet();

  const { open, ConfirmModal } = usePresignGate({
    agentPubkey,
    minBond: 1_000_000_000n, // 1_000 USDC
    minScore: 700,
    delegationAmount: amount,
    onConfirm: async () => {
      const sig = await wallet.sendTransaction(buildDelegateTx());
      console.log("delegated:", sig);
    },
  });

  return (
    <>
      <button onClick={open}>Delegate ${(Number(amount) / 1e6).toLocaleString()}</button>
      <ConfirmModal />
    </>
  );
}

Full runnable example: examples/01-basic-delegate-button.tsx.

Strict policy for large positions

For DApps that handle larger ticket sizes, bump the floors.

const { open, ConfirmModal } = usePresignGate({
  agentPubkey,
  minBond: 10_000_000_000n, // 10_000 USDC
  minScore: 850,
  delegationAmount: amount,
  apiBaseUrl: process.env.NEXT_PUBLIC_TELARO_API ?? "https://telaro.xyz",
  apiKey: process.env.NEXT_PUBLIC_TELARO_API_KEY,
  onConfirm: async () => {
    // proceed
  },
});

Full runnable example: examples/02-strict-policy.tsx.

What the modal shows

  • Loading state while live agent data is fetched
  • Trust Card with four stats (score, bond, actions, disputed)
  • Policy badge (green if the agent passes, red if not)
  • Confirm button enabled only when policy passes
  • Cancel button
  • Inline styles. No Tailwind or CSS framework required on the host.

Configuration

| Field | Type | Default | Notes | |---|---|---|---| | agentPubkey | string | required | Agent PDA, base58 | | minBond | bigint | 0n | Minimum acceptable bond in atomic units | | minScore | number | 0 | Minimum acceptable score (0..1000) | | delegationLabel | string | none | Human label rendered in the modal | | delegationAmount | bigint | none | Atomic amount rendered for context | | apiBaseUrl | string | https://telaro.xyz | Override for staging | | apiKey | string | none | Optional starter API key (1k req / min) | | onConfirm | () => void \| Promise<void> | required | Called when user confirms | | onCancel | () => void | none | Called when user cancels |

License

MIT.