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

@memetic-block/ao-encrypted-messages

v1.0.4

Published

Send encrypted messages on AO. Like an encrypted voicemail.

Readme

AO Encrypted Messages

Send encrypted messages on AO. Like an encrypted voicemail.

Useful for collecting private DAPP logs from users at their discretion!

Process Lua source code at ar://p5zkcW3sysfkGrkN9oc_DfVNQ9PkI3hsb-8CyPeZZdg

Install

npm i @memetic-block/ao-encrypted-messages

Features

  • Deploy, update, & view an encrypted inbox on AO!
  • Programmatic interface
  • Supports Curve25519
  • Uses tweetnacl under the hood for encryption
  • Forwards encrypted messages to Process.Owner

Programmatic Usage

1) Spawn a new Encrypted Inbox

const wallet = JSON.parse(readFileSync('path-to-jwk').toString())

const encryptedMessages = await EncryptedMessages.spawn(wallet)

console.log(`Spawned new EncryptedMessages process at ${encryptedMessages.processId}`)

2) Set the Encryption Public Key (required!)

A newly spawned Encrypted Inbox doesn't have a public key to receive messages so one needs to be set before it can receive messages.

You can update the Encryption Public Key as often as you want! Old messages will still be retained with the public key they were originally sent with.

const publicKey = 'your Curve25519 PUBLIC key'
const result = await encryptedMessages.setEncryptionPublicKey(publicKey)

console.log(
  `Set encryption key ${result.publicKey} on EncryptedMessage process ${encryptedMessages.processId}`,
  result
)

3) Send an Encrypted Message

Send an encrypted message with a generated throw-away keypair

const message = "Hold the line, love isn't always on time"
const { messageId } = await encryptedMessages.sendEncryptedMessage(message)

Send an encrypted message with a given keypair and nonce - both optional.

const secretKey = 'your Curve25519 PRIVATE key'
const nonce = 'Quis custodiet ipsos custodes?'
const { messageId } = await encryptedMessages.sendEncryptedMessage(
  message,
  { secretKey, nonce }
)

4) List Encrypted Messages

List all messages contained in the process. They are still encrypted.

const { messages } = await encryptedMessages.listEncryptedMessages()

console.log(`Got ${Object.keys(messages).length} encrypted messages`)
console.log(messages)

5) Read an Encrypted Message

Fetch an individual encrypted message by its AO message ID. It's still encrypted.

const {
  message,
  nonce,
  publicKey,
  recipientPublicKey
} = await encryptedMessages.getEncryptedMessage(messageId)

Optionally, you can supply the secret key to automatically decrypt a fetched message.

const secretKey = 'your Curve25519 PRIVATE key'
const {
  message,
  nonce,
  publicKey,
  recipientPublicKey
} = await encryptedMessages.getEncryptedMessage(messageId, secretKey)

AO Process Interface

Set-Encryption-Public-Key

Request

[
  {
    "name": "Action",
    "value": "Set-Encryption-Public-Key"
  },
  {
    "name": "EncryptionPublicKey",
    "value": "your Curve25519 PUBLIC key"
  }
]

Success Result

{
  "Data": "your Curve25519 PUBLIC key"
}

Get-Encryption-Public-Key

Request

[
  {
    "name": "Action",
    "value": "Get-Encryption-Public-Key"
  }
]

Success Result

{
  "Data": "your Curve25519 PUBLIC key"
}

Send-Encrypted-Message

Request

Tags

[
  {
    "name": "Action",
    "value": "Send-Encrypted-Message"
  }
]

Data

{
  "message": "the encrypted message",
  "publicKey": "the public key of the keypair used to encrypt the message",
  "recipientPublicKey": "the current public key of the message recipient",
  "nonce": "nonce used for unique message id"
}

Success Result

Reply to Sender

{
  "Data": "nonce for this message"
}

Forward to Process.Owner

{
  "Data": {
    "nonce": "nonce for this message",
    "messageId": "ao messageId of the message",
    "from": "sender address"
  }
}

List-Encrypted-Messages

Request

[
  {
    "name": "Action",
    "value": "List-Encrypted-Messages"
  }
]

Success Result

{
  "Data": { "<nonce>": "<messageId>", ... }
}

Contributing

PRs welcome!