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

secp256-message

v0.0.2

Published

A secp256k1 message verification and signing library.

Downloads

10

Readme

secp256k1-message

A secp256k1 message verification and signing library.

The secp256k1-message library allows for verification against transformed secp256k1 public keys.

Supported Public Key Formats

  • Bitcoin Address
  • Ethereum Address
  • Raw secp256k1 public key
  • Compressed secp256k1 public key

Install

Install with npm:

  1. Install bitcoin-lib
    npm install bitcoin-lib
  2. Install secp256k1-message:
npm install secp256-message

Include the library:

import { Secp256k1Message } from "secp256-message";

Examples

Sign a Message

let privateKey = "a9cead836cea1d6e96b8df6a90edc07c18318d5dce77d9d859a6ff6d602c87ef"; // Generated with eth-crypto
let message = "Hello world!";

let signature = Secp256k1Message.signMessage(message, privateKey);

Verify a Signed Message

Against a Bitcoin address:

let signature = "U41hVV0U8xQ2ykT2XU0hDvl+ADUfoKrzqB6pSoToiLI4IwR0RC+MEynwy68mm4texU8adD6oxAKTGeiKmeELJRw=";
let message = "Hello world!";
let signerAddress = "18t3jwW4b9oGw7bz7sNPj6wA2zu2FZQQGa";

let verificationResult = Secp256k1Message.verifySignature(signature, message, {
      publicKey: signerAddress,
      type: "btc",
      options: { network: "mainnet" }
    });

console.log("Signature is valid:", verificationResult);

Against an Ethereum address:

let signature = "U41hVV0U8xQ2ykT2XU0hDvl+ADUfoKrzqB6pSoToiLI4IwR0RC+MEynwy68mm4texU8adD6oxAKTGeiKmeELJRw=";
let message = "Hello world!";
let signerAddress = "0x219A94AB1F9cF7749f9073ACD5Be74Af74cF0e5d";

let verificationResult = Secp256k1Message.verifySignature(signature, message, {
      publicKey: signerAddress,
      type: "eth"
    });

console.log("Signature is valid:", verificationResult);

Against a public key:

let signature = "U41hVV0U8xQ2ykT2XU0hDvl+ADUfoKrzqB6pSoToiLI4IwR0RC+MEynwy68mm4texU8adD6oxAKTGeiKmeELJRw=";
let message = "Hello world!";
let publicKey = "95112a233be2ffe5d80172b84767646e7af0987002819379b4478902552cdacaa312e69a42a036d7bc9fdff48eda92e0c89c9de4dc89b52806ce2d451b7c9ea9";

let verificationResult = Secp256k1Message.verifySignature(signature, message, {
      publicKey: publicKey,
      type: "raw"
    });

console.log("Signature is valid:", verificationResult);

Against a compressed public key:

let signature = "U41hVV0U8xQ2ykT2XU0hDvl+ADUfoKrzqB6pSoToiLI4IwR0RC+MEynwy68mm4texU8adD6oxAKTGeiKmeELJRw=";
let message = "Hello world!";
let publicKey = "0395112a233be2ffe5d80172b84767646e7af0987002819379b4478902552cdaca";

let verificationResult = Secp256k1Message.verifySignature(signature, message, {
      publicKey: publicKey,
      type: "raw",
      options: { compressed: true }
    });

console.log("Signature is valid:", verificationResult);