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

@revibase/lite

v0.2.0

Published

Passkey-based Solana wallet SDK: sign in and approve transactions in a popup, authorize with a server-side private key.

Readme

@revibase/lite

Passkey Solana wallet: sign in and approve transactions in a popup. Backend authorizes with a server-side private key.

pnpm add @revibase/lite

API — Frontend: RevibaseProvider, signIn, transferTokens, executeTransaction. Backend: processClientAuthCallback. Types: UserInfo, ChannelStatus, StartChannelRequest, AuthorizationFlowOptions, RevibaseProviderOptions. Errors: RevibaseError + subclasses (.code). AGENTS.md for automation.


Get started

Three steps: keys, backend route, provider.

1. Keys

Get keys at developers.revibase.com. Add /.well-known/revibase.json with clientJwk, title, description.

2. Backend

Expose POST at /api/clientAuthorization (default). Keep PRIVATE_KEY server-only; HTTPS in production.

Example handler:

import {
  processClientAuthCallback,
  type DeviceSignature,
  type StartChannelRequest,
  type StartMessageRequest,
  type StartTransactionRequest,
} from "@revibase/lite";

export async function POST(req: Request) {
  try {
    const { request, device, channelId } = (await req.json()) as {
      request:
        | StartMessageRequest
        | StartTransactionRequest
        | StartChannelRequest;
      device?: DeviceSignature;
      channelId?: string;
    };
    const result = await processClientAuthCallback({
      request,
      privateKey: process.env.PRIVATE_KEY!,
      signal: req.signal,
      device,
      channelId,
    });
    // Message/transaction: { user, txSig? }. Channel registration (createChannel): { ok: true }.
    return Response.json(result);
  } catch (e) {
    const msg = e instanceof Error ? e.message : String(e);
    return Response.json({ error: msg }, { status: 500 });
  }
}

3. Frontend

Create a provider. For executeTransaction, pass rpcEndpoint in options:

import {
  RevibaseProvider,
  signIn,
  transferTokens,
  executeTransaction,
} from "@revibase/lite";

const provider = new RevibaseProvider();
const { user } = await signIn(provider);
const { txSig } = await transferTokens(provider, {
  amount: BigInt(100_000_000),
  destination: "ADDRESS",
  signer: user, // optional for transfers
});

Custom instructions — Build instructions with gill (Solana instruction builder) or similar, then pass to executeTransaction.

import { RevibaseProvider, signIn, executeTransaction } from "@revibase/lite";
import { address, createNoopSigner } from "gill";
import { getTransferSolInstruction } from "gill/programs";

const provider = new RevibaseProvider({
  rpcEndpoint: "https://api.mainnet-beta.solana.com",
});
const { user } = await signIn(provider);

const { txSig } = await executeTransaction(provider, {
  instructions: [
    getTransferSolInstruction({
      source: createNoopSigner(address(user.walletAddress)),
      destination: address("RECIPIENT_WALLET_ADDRESS"),
      amount: 1_000_000n,
    }),
  ],
  signer: user,
});

Default: auth in popup. For auth on another device, use a channel (below).


Auth on another device (channel)

Channel: auth on another device; requests go there. createChannel() first POSTs to your /api/clientAuthorization with a StartChannelRequest so the server can register the channel with Revibase; then it returns { channelId, url }. Open url on that device:

const { channelId, url } = await provider.createChannel();
const { user } = await signIn(provider, { channelId });
const { txSig } = await transferTokens(
  provider,
  { amount, destination, signer: user },
  { channelId },
);
// Or: executeTransaction(provider, { instructions, signer: user }, { channelId })

Use subscribeToChannelStatus to check channel status.

import { ChannelStatus } from "@revibase/lite";

provider.subscribeToChannelStatus((id, entry) => {
  switch (entry.status) {
    case ChannelStatus.AUTHENTICATING:
      break; // show "Connecting…"
    case ChannelStatus.AWAITING_RECIPIENT:
      break; // show "Waiting for other device"
    case ChannelStatus.RECIPIENT_CONNECTED:
      break; // show "Connected" (entry.recipient)
    case ChannelStatus.RECIPIENT_DISCONNECTED:
      break; // show "Other device left"
    case ChannelStatus.AUTO_RECONNECTING:
      break; // show "Reconnecting…" (entry.reconnectAttempt)
    case ChannelStatus.CONNECTION_LOST:
      break; // show "Connection lost. [Retry]" → provider.reconnectChannel(id)
    case ChannelStatus.CHANNEL_CLOSED:
      break; // show "Channel closed"
    case ChannelStatus.ERROR:
      break; // show entry.error
  }
});

Reconnect

If the channel connection is lost, call reconnectChannel(channelId):

provider.reconnectChannel(channelId);

Cleanup

provider.closeChannel(channelId);
// or
provider.closeAllChannels();