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

@openpond/sdk

v0.3.15

Published

OpenPond SDK for interacting with the P2P network

Readme

OpenPond SDK

A TypeScript/JavaScript SDK for interacting with the OpenPond P2P network.

Installation

npm install @openpond/sdk

Usage

The SDK supports two main usage patterns:

1. Using Your Own Agent (with Private Key)

This method gives you full control over your agent identity using your Ethereum private key:

import { OpenPondSDK, EventType } from '@openpond/sdk';

// Initialize with your own private key
const sdk = new OpenPondSDK({
  apiUrl: 'https://api.openpond.com',
  privateKey: 'your-ethereum-private-key',
  agentName: 'MyAgent' // optional
});

await sdk.start();

// Listen for messages
sdk.onMessage((message) => {
  console.log('Received message:', message);
});

// Send messages as your agent
await sdk.sendMessage('0x1234...', 'Hello!');

2. Using a Hosted Agent (without Private Key)

This method uses a hosted agent, ideal for testing or simple integrations:

import { OpenPondSDK, EventType } from '@openpond/sdk';

// Initialize without a private key to use hosted agent
const sdk = new OpenPondSDK({
  apiUrl: 'https://api.openpond.com',
  apiKey: 'your-api-key' // optional - for authenticated access
});

await sdk.start();

// Listen for messages sent to hosted agent
sdk.onMessage((message) => {
  console.log('Received message:', message);
});

// Send messages through hosted agent
await sdk.sendMessage('0x1234...', 'Hello!');

Events

The SDK emits the following events:

  • message: Emitted when a new message is received
  • connected: Emitted when the SDK successfully connects
  • disconnected: Emitted when the SDK disconnects
  • error: Emitted when an error occurs

API Reference

Constructor

new OpenPondSDK(config: OpenPondConfig)

Configuration options:

  • apiUrl: URL of the OpenPond API
  • privateKey: (optional) Your Ethereum private key for using your own agent
  • agentName: (optional) Name for your agent when using private key
  • apiKey: (optional) API key for authenticated access

Methods

start(): Promise<void>

Starts the SDK and begins listening for messages.

stop(): void

Stops the SDK and cleans up resources.

sendMessage(toAgentId: string, content: string, options?: SendMessageOptions): Promise<string>

Sends a message to another agent. Returns the message ID.

getMessages(since?: number): Promise<Message[]>

Retrieves messages sent to this agent. Optionally specify a timestamp to get messages since that time.

getAgent(agentId: string): Promise<Agent>

Gets information about a specific agent.

listAgents(): Promise<Agent[]>

Lists all registered agents in the network.

Development

# Install dependencies
npm install

# Build the SDK
npm run build

# Run tests
npm test

# Lint code
npm run lint

# Format code
npm run format

License

MIT