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

nanomemotools

v0.1.8

Published

Cryptographically secure memos for every Nano block

Readme

nanomemotools.js

npm version test workflow

Cryptographically secure memos for every Nano block

This library allows you to sign, verify signature, encrypt, and decrypt messages with the same keys used to sign a Nano block. It includes multiple modules to assist you in doing offline actions as well as communicating with the NanoMemo.cc API endpoints. This documentation covers the capabilities of this library. For more details on the RESTful API on NanoMemo.cc you can view the documentation here: https://nanomemo.cc/docs/api.

Created by SomeNano Twitter: @SomeNanoTweets

Installation

Via NPM:

$ npm install nanomemotools

also available as a standalone js file in the github repository/dist, nanomemotools.js

<script src="nanomemotools.js"></script>

<script>
  NanoMemoTools.memo...
</script>

Usage

Full documentation is located in the /docs directory or viewable online: (https://somenano.github.io/NanoMemoTools)

const NanoMemoTools = require('nanomemotools');

Tests can be run with the command:

npm test

Example

The /test directory on github has plenty of good examples.

NanoMemoTools.memo

Create a plaintext memo

const NanoMemoTools = require('nanomemotools');
const hash = '4ABC34D...';
const message = 'test message';
const signing_address = 'nano_1abc...';
const memo = new NanoMemoTools.memo.Memo(
    hash,
    message,
    signing_address
);

// memo is unsigned at this point 
memo.valid_signature == false;

// Sign it with the private key of the Nano Account that owns the block with the provided hash
const signing_private_key = '234ABC...';
const signature = memo.sign(signing_private_key);
memo.valid_signature == true;

Create an encrypted memo

const NanoMemoTools = require('nanomemotools');
const hash = '4ABC34D...';
const encrypted_message = 'test message';
const signing_address = 'nano_1abc...';
const decrypting_address = 'nano_3fed...';
const memo = new NanoMemoTools.memo.EncryptedMemo(
    hash,
    encrypted_message,
    signing_address,
    decrypting_address
);

// memo is unsigned at this point 
memo.valid_signature == false;

// Sign it with the private key of the Nano Account that owns the block with the provided hash
const signing_private_key = '234ABC...';
const signature = memo.sign(signing_private_key);
memo.valid_signature == true;

Convert plaintext memo to encrypted memo

// Assume plaintext memo is already created...
const encrypted_memo = NanoMemoTools.memo.encrypt(memo, signing_private_key, decrypting_address);

// Signature is no longer valid since message was encrypted
encrypted_memo.valid_signature == false;

// Sign it with the private key of the Nano Account that owns the block with the provided hash
const signing_private_key = '234ABC...';
const signature = encrypted_memo.sign(signing_private_key);
encrypted_memo.valid_signature == true;

Convert encrypted memo to plaintext memo

// Assume encrypted memo is already created...
const memo = NanoMemoTools.memo.decrypt(encrypted_memo, decrypting_private_key);

// Signature is no longer valid since message was encrypted
memo.valid_signature == false;

// Sign it with the private key of the Nano Account that owns the block with the provided hash
const signing_private_key = '234ABC...';
const signature = memo.sign(signing_private_key);
memo.valid_signature == true;

NanoMemoTools.server

Get memo from server

const NanoMemoTools = require('nanomemotools');
const hash = '4ABC34D...';
const memo = await NanoMemoTools.server.getMemo(hash);

Save memo to server

Requires api key

const NanoMemoTools = require('nanomemotools');
const memo = new NanoMemoTools.memo.Memo( ... );
const api_key = '123...';
const api_secret = '321...';
const memo_response = await NanoMemoTools.server.saveMemo(memo, api_key, api_secret);

Get user data

Requires api key

const NanoMemoTools = require('nanomemotools');
const api_key = '123...';
const api_secret = '321...';
const user_data = await NanoMemoTools.server.getUserData(api_key, api_secret);

WebSocket

This websocket will send a message for every new memo that is created

const NanoMemoTools = require('nanomemotools');
const websocket = NanoMemoTools.server.websocketSubscribe(function(msg) {
    // onmessage
    console.log(msg);
});

// Can also unsubscribe
NanoMemoTools.server.websocketUnsubscribe();

Considerations

If someone has access to your Nano seed or private key they can access and transfer funds from your Nano Account. This library never stores your seed or private key. This library never sends your seed or private key to any server. All digital signing and encryption or decryption actions that require a private key are self-contained in this library and its dependencies.

It is your responsibility to use this library in a responsible manner and manage your own seed or private key.

Additionally, this library is covered by an MIT License which means it is provided "as is", without warranty of any kind. We make every attempt to be transparent. Below you will find the dependencies this library uses with links to their code and documentation repositories for your review as you see fit.

Requirements