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

@rkmonarch/slogan

v0.1.2

Published

Dual-Key Stealth Address Protocol (DKSAP) for Solana — Ed25519 / X25519

Readme

@rkmonarch/slogan

Privacy primitives for Solana built around dual-key stealth addresses and a same-denomination CoinJoin-style mixer.

This SDK provides:

  • stealth meta-address generation
  • one-time stealth address derivation for senders
  • memo-based stealth payment discovery for recipients
  • claim key derivation and SOL/token sweep helpers
  • a same-denomination mixer model for coordinated output shuffling

Install

npm install @rkmonarch/slogan

What Problem It Solves

On Solana, a normal wallet address is a permanent surveillance anchor. Once a user shares it, every inbound payment is easy to cluster, monitor, and analyze. SLOGAN replaces that with a dual-key stealth model:

  • the recipient publishes one metaAddress
  • every sender derives a different one-time Solana destination
  • the sender announces an ephemeral public key in the memo
  • the recipient scans memo announcements to detect matching payments
  • the recipient later derives the claim signer and sweeps funds out

This separates:

  • discovery authority: viewingPrivateKey
  • spending authority: spendingPrivateKey

Core Concepts

Stealth Meta-Address

The recipient generates two keypairs:

  • viewing keypair
  • spending keypair

The public halves are encoded into a shareable st1:... meta-address.

Sender Flow

Given a recipient meta-address:

  1. derive a fresh one-time stealth address
  2. send SOL/tokens to that address
  3. attach the ephemeral public key to the same transaction memo

Receiver Scan Flow

Given:

  • ephemeral public key from memo
  • viewing private key
  • spending public key

the receiver can recompute the expected stealth address and check whether a payment belongs to them.

Receiver Claim Flow

Given:

  • ephemeral public key
  • viewing private key
  • spending private key

the receiver can derive the full stealth signer and sweep funds out of the stealth address.

Main Exports

Stealth address APIs

  • generateStealthMetaAddress
  • encodeMetaAddress
  • decodeMetaAddress
  • deriveStealthAddress
  • checkStealthAddress
  • claimStealthAddress
  • buildEphemeralAnnounceMemo
  • parseEphemeralFromMemo
  • createStealthTransferTransaction
  • scanForPayments
  • transferSOLFromStealth
  • transferTokenFromStealth

Mixer APIs

  • MixPool
  • coordinateMix
  • verifyMixTransaction
  • generateFreshOutputKeypair
  • DENOMINATIONS_LAMPORTS
  • MIN_PARTICIPANTS

Basic Usage

1. Generate a recipient meta-address

import { generateStealthMetaAddress } from '@rkmonarch/slogan';

const keys = generateStealthMetaAddress();

console.log(keys.metaAddress);
console.log(Buffer.from(keys.viewingPrivateKey).toString('hex'));
console.log(Buffer.from(keys.spendingPrivateKey).toString('hex'));

2. Derive a one-time destination as a sender

import { deriveStealthAddress } from '@rkmonarch/slogan';

const { stealthAddress, ephemeralPublicKey } = deriveStealthAddress(recipientMetaAddress);

Send funds to:

  • stealthAddress

Attach in memo:

  • ephemeralPublicKey

3. Scan for a payment as a receiver

import { checkStealthAddress } from '@rkmonarch/slogan';

const result = checkStealthAddress(
  ephemeralPublicKey,
  viewingPrivateKey,
  spendingPublicKey,
);

console.log(result.stealthAddress);

Important:

  • scan uses the spending public key
  • scan does not use the spending private key

4. Claim and sweep a funded stealth address

import {
  claimStealthAddress,
  transferSOLFromStealth,
} from '@rkmonarch/slogan';

const claimKeys = claimStealthAddress(
  ephemeralPublicKey,
  viewingPrivateKey,
  spendingPrivateKey,
);

const txSig = await transferSOLFromStealth({
  connection,
  claimKeys,
  destination: destinationWallet,
  lamports: 'max',
});

Important:

  • claim uses the spending private key
  • claim is the spend-capable path

Examples

The SDK ships with examples in examples/:

  • derive-address.ts Sender-side example that derives a one-time stealth address and optional memo announcement.
  • send.ts Builds and sends a stealth payment transaction.
  • receive.ts Generates keys, derives a receive address, scans memo announcements, and claims payments.
  • claim.ts Derives the stealth signer from the memo key and sweeps SOL out.
  • mix.ts Demonstrates a full stealth-address + CoinJoin-style privacy pipeline.

Run examples with:

npx ts-node examples/derive-address.ts
npx ts-node examples/send.ts
npx ts-node examples/receive.ts
npx ts-node examples/claim.ts
npx ts-node examples/mix.ts

Environment

Examples expect:

SOLANA_RPC_URL=https://your-solana-rpc

Some examples also optionally use:

FUNDER_PRIVATE_KEY=...
STEALTH_VIEWING_KEY=...
STEALTH_SPENDING_KEY=...

Notes On Privacy

This SDK improves privacy, but it does not create absolute anonymity.

Stealth addresses help protect:

  • recipient reuse
  • balance visibility tied to one public address
  • straightforward inbound payment clustering

The mixer model helps reduce:

  • amount-based heuristics
  • naive input-output tracing
  • output-order matching

But privacy still depends on user behavior, timing, counterparty patterns, and the strength of the surrounding operational setup.

Security Notes

  • never share spendingPrivateKey
  • never log private keys in production
  • treat viewingPrivateKey as sensitive even though it is view-only
  • use a trusted Solana RPC provider
  • do not market the mixer example as production-grade anonymity infrastructure

License

MIT