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

@tenzro/platform-ui

v1.0.0

Published

React components and hooks for Tenzro Platform - AI, Ledger, Bridge, Wallet, Anchor, and Token services

Readme

Tenzro Platform React UI Library

React components and hooks for Tenzro Platform.

Installation

npm install @tenzro/platform-ui @tenzro/platform

Quick Start

Wrap your app with TenzroProvider:

import { TenzroProvider } from '@tenzro/platform-ui';

function App() {
  return (
    <TenzroProvider
      apiKey={process.env.NEXT_PUBLIC_TENZRO_API_KEY!}
      tenantId={process.env.NEXT_PUBLIC_TENZRO_TENANT_ID!}
    >
      <YourApp />
    </TenzroProvider>
  );
}

Components

AI Components

import { InferenceRunner, ModelSelector } from '@tenzro/platform-ui';

// Full inference UI
<InferenceRunner
  modelId="llama-3.1-70b"
  onResult={(result) => console.log(result.content)}
  onError={(error) => console.error(error)}
/>

// Model selection dropdown
<ModelSelector
  value={modelId}
  onChange={(id, model) => setModelId(id)}
  modelType="text"
/>

Anchor Components

import { AnchorSubmit, ProofVerifier } from '@tenzro/platform-ui';

// Submit state roots
<AnchorSubmit
  onSuccess={(anchor) => console.log(anchor.txHash)}
  onError={(error) => console.error(error)}
/>

// Verify Merkle proofs
<ProofVerifier
  onResult={(result) => console.log(result.valid)}
  onError={(error) => console.error(error)}
/>

Bridge Components

import { BridgeQuote } from '@tenzro/platform-ui';

// Cross-chain bridge quote
<BridgeQuote
  onQuote={(quote) => console.log(quote.outputAmount)}
  onError={(error) => console.error(error)}
/>

Token Components

import { CollectionCreator } from '@tenzro/platform-ui';

// Create token collections
<CollectionCreator
  onSuccess={(collection) => console.log(collection.id)}
  onError={(error) => console.error(error)}
/>

Hooks

AI Hooks

import { useAIModels, useInfer, useEmbed } from '@tenzro/platform-ui';

function Component() {
  const { models, isLoading } = useAIModels();
  const { result, infer } = useInfer();

  const handleInfer = async () => {
    await infer({
      modelId: 'llama-3.1-70b',
      prompt: 'Hello...',
    });
  };

  return (
    <button onClick={handleInfer} disabled={isLoading}>
      Run Inference
    </button>
  );
}

Anchor Hooks

import { useAnchors, useSubmitAnchor, useVerifyProof } from '@tenzro/platform-ui';

const { anchors, refresh } = useAnchors({ namespace: 'myapp' });
const { submit } = useSubmitAnchor();
const { verify } = useVerifyProof();

Bridge Hooks

import { useBridgeRoutes, useBridgeQuote, useBridgeOperation } from '@tenzro/platform-ui';

const { routes } = useBridgeRoutes('base', 'canton');
const { quote, getQuote } = useBridgeQuote();
const { operation } = useBridgeOperation(operationId);

Token Hooks

import { useCollections, useTokens, useMint, useTransfer } from '@tenzro/platform-ui';

const { collections } = useCollections();
const { tokens } = useTokens(collectionId);
const { mint } = useMint();
const { transfer } = useTransfer();

Platform Hook

Access the SDK directly:

import { usePlatform, useTenzro } from '@tenzro/platform-ui';

function Component() {
  const platform = usePlatform();
  const { apiKey, tenantId, baseUrl } = useTenzro();

  const handleAction = async () => {
    const result = await platform.ledger.getBalance('party::myapp::alice');
  };
}

Submodule Imports

import { useAIModels, ModelSelector } from '@tenzro/platform-ui/ai';
import { useAnchors, AnchorSubmit } from '@tenzro/platform-ui/anchor';
import { useBridgeQuote, BridgeQuote } from '@tenzro/platform-ui/bridge';
import { useCollections, CollectionCreator } from '@tenzro/platform-ui/token';

Styling

Components use minimal markup with semantic class names:

<InferenceRunner className="p-4 border rounded-lg" />
<BridgeQuote className="max-w-md mx-auto" />

CSS variables for theming:

  • bg-primary, text-primary-foreground - Primary colors
  • bg-muted, text-muted-foreground - Secondary colors
  • bg-background, text-foreground - Base colors

Requirements

  • React 18+ or React 19
  • @tenzro/platform (peer dependency)

Links

License

Apache-2.0 - Tenzro, Inc.