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

@totemsdk/pear

v0.1.2

Published

Bare/Pear runtime integration harness for @totemsdk — storage, networking, lifecycle, and Hyperdrive adapters for Pear apps

Readme

@totemsdk/pear

Run Totem SDK apps inside Holepunch's Pear/Bare runtime.

Pear (formerly Hypercore Protocol) is a peer-to-peer application runtime. This package adapts the Totem SDK to it so you can build fully decentralised Minima dApps that run without any servers — not even a web server.

Install

npm install @totemsdk/pear

What's inside

Six sub-modules, each importing cleanly from its own path:

| Sub-module | Import path | What it provides | |-----------|-------------|-----------------| | storage | @totemsdk/pear/storage | Pear-native key-value and structured storage adapters for StorageAdapter | | network | @totemsdk/pear/network | Hyperswarm and Hyperdrive networking adapters | | lifecycle | @totemsdk/pear/lifecycle | Pear app lifecycle hooks (startup, shutdown, reload) | | hyperdrive | @totemsdk/pear/hyperdrive | Hyperdrive filesystem integration (append-only distributed file system) | | config | @totemsdk/pear/config | Pear-aware configuration management | | logger | @totemsdk/pear/logger | Pear-compatible structured logging (LoggerAdapter) |

Usage

Start a Pear app with Totem SDK

import { PearLifecycle } from '@totemsdk/pear/lifecycle';
import { PearStorageAdapter } from '@totemsdk/pear/storage';
import { PearLoggerAdapter } from '@totemsdk/pear/logger';
import { createLookupNode } from '@totemsdk/lookup-node';

const lifecycle = new PearLifecycle();

lifecycle.onStartup(async () => {
  const storage = new PearStorageAdapter({ prefix: 'totem' });
  const logger  = new PearLoggerAdapter({ level: 'info' });

  // All SDK modules accept these standard adapter interfaces
  const node = await createLookupNode({
    dbPath: './data/lookup.db',
    storage,
    logger,
  });

  await node.start();
  console.log('Lookup node running in Pear:', node.publicKey);
});

lifecycle.onShutdown(async () => {
  await node.stop();
});

lifecycle.start();

Pear storage adapter

import { PearStorageAdapter } from '@totemsdk/pear/storage';

const storage = new PearStorageAdapter({ prefix: 'my-app' });

await storage.setItem('wallet-seed', encryptedSeed);
const seed = await storage.getItem('wallet-seed');

Hyperdrive integration

import { HyperdriveAdapter } from '@totemsdk/pear/hyperdrive';

const drive = new HyperdriveAdapter({ key: drivePublicKey });
await drive.ready();

// Read / write files to a distributed, append-only filesystem
const data = await drive.get('/tokens/metadata.json');

Config management

import { PearConfig } from '@totemsdk/pear/config';

const config = new PearConfig({ namespace: 'totem-wallet' });
const nodeUrl = config.get('minimaNodeUrl', 'http://localhost:9005');

Structured logging

import { PearLoggerAdapter } from '@totemsdk/pear/logger';

const logger = new PearLoggerAdapter({ level: 'debug' });
logger.info('Node started', { publicKey: node.publicKey });

See also