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 🙏

© 2024 – Pkg Stats / Ryan Hefner

nft-sign

v1.0.7

Published

A simple CLI tool to stamp and verify PNG images using visual signature patches

Downloads

11

Readme

NFT-Sign

A simple CLI tool to stamp and verify PNG images using visual signature patches

This tool allows you to:

  • Write a signature patch onto a PNG image (using an Ethereum mnemonic)
  • Verify a signature patch on a PNG (previously created by this tool)

Here is an (all black) image with a valid and verifiable signature patch:

Example Signature Patch

Usage


Add a signature patch to an image

npx nft-sign <img.png>

Use this command to create a signature patch for a PNG image, tied to an Ethereum address.

This command first prompts you for a mnemonic (i.e. private key) of an Ethereum address.
The image data is then hashed and signed by the given private key, and this signature with the wallet address are combined to paint a signature patch on top of the image.

The signed image is then saved under the same name with a '.signed' sub-extension (e.g. img.signed.png) Note: Only basic RGBA PNG images are supported at this time.

Here is a sample image with a signature patch applied to the bottom-right corner:

Signed Image


Verify an image with a signature patch

npx nft-sign verify <img.signed.png>

This command will verify if a signature patch is valid.

Specifically, it will extract a signature patch from the image.
This patch is expected to contain a signature of the surrounding image data and an Ethereum address.

The patch and image are then used to confirm the following:

  • the image data was signed by the Ethereum address present in the signature patch
  • the signature in the signature patch is valid
  • the surrounding image data is unmodified

Here is an example of the output of a successful verification:

$ npx nft-sign verify ./img.signed.png

Verifying: ./img.signed.png

Image hash:             9e1b20e3f20b4bd767c77c90ee0d873c9c5c431aefe6763d135f61b58e9614c2
Signature:              0x569497f7f0e9938df37da44a3f7c7e83242fc0386bb280327c2e1d8de3df446947dc7a2ca1596437e38523218f2bc9b4a86b326b6353c1545153bb734799e9ee1c
Address:                0xf56990605ebebd3dfd17e15952ad856ac544292d

Verification SUCCESS

Image was signed by:    https://etherscan.io/address/0xF56990605ebebD3DFD17E15952ad856aC544292D