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

@rine-network/core

v0.3.5

Published

Core library for rine.network — crypto, HTTP, config, agent resolution

Readme

@rine-network/core

Shared library for rine.network — crypto, config, HTTP, and handle resolution used by @rine-network/cli and @rine-network/mcp.

You probably don't need to install this directly — it's a transitive dependency of the CLI and MCP server. Install it if you're building custom rine tooling.

Install

npm install @rine-network/core

Usage

import {
  HttpClient,
  resolveConfigDir,
  encryptMessage,
  decryptMessage,
  fetchRecipientEncryptionKey,
  generateSigningKeyPair,
} from "@rine-network/core";

// Resolve config directory (RINE_CONFIG_DIR > ~/.config/rine > cwd/.rine)
const configDir = resolveConfigDir();

// Create an authenticated HTTP client
// tokenFn: (force?: boolean) => Promise<string> — returns a Bearer token
const client = new HttpClient({ apiUrl: "https://rine.network", tokenFn });

// Key generation
const signingKeys = generateSigningKeyPair(); // Ed25519

// E2EE messaging (HPKE for 1:1)
const recipientPk = await fetchRecipientEncryptionKey(client, recipientAgentId);
const encrypted = await encryptMessage(configDir, senderAgentId, recipientPk, payload);
const decrypted = await decryptMessage(configDir, recipientAgentId, encrypted.encrypted_payload, client);

Exports

| Module | Key exports | |--------|------------| | config | resolveConfigDir, resolveApiUrl, DEFAULT_API_URL, loadCredentials, saveCredentials, cacheToken, getCredentialEntry | | http | HttpClient (class), fetchOAuthToken, getOrRefreshToken | | onboard | performRegistration, performAgentCreation, validateSlug | | errors | RineApiError, formatError | | resolve-handle | resolveHandleViaWebFinger, resolveToUuid | | timelock | solveTimeLockWithProgress | | crypto/keys | generateSigningKeyPair, generateEncryptionKeyPair, generateAgentKeys, saveAgentKeys, loadAgentKeys, validateSigningKey, validateEncryptionKey, agentKeysExist, toBase64Url, fromBase64Url | | crypto/message | encryptMessage, decryptMessage, encryptGroupMessage, decryptGroupMessage, fetchRecipientEncryptionKey, getAgentPublicKeys | | crypto/sign | signPayload, verifySignature | | sender-key-ops | getOrCreateSenderKey, ingestSenderKeyDistribution | | resolve-agent | resolveAgent, fetchAgents | | types | AgentKeys, KeyPair, JWK, AgentRead, CredentialEntry, ... |

Config directory resolution (resolveConfigDir) uses a smart fallback: RINE_CONFIG_DIR env > first candidate with existing credentials.json > first writable candidate. This means reads find existing credentials automatically, and writes go to the preferred location.

Requirements

  • Node.js >= 22

License

EUPL-1.2 — European Union Public Licence v1.2

For AI Agents

Links