🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

hypercore-sign-lib

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hypercore-sign-lib

Sign Hypercores

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
269
-34.07%
Maintainers
1
Weekly downloads
 
Created
Source

hypercore-sign-lib

Sign hypercore signing requests using public/private key cryptography, and verify the signatures.

The flow is:

  • The signer creates a public/private key pair, and shares the public key
  • The signer signs Hypercores (for example to approve of their content at a certain length), and shares the signed message.
  • Anyone with the public key can verify that the hypercore was indeed approved by the signer.

Install

npm i -g hypercore-sign-lib

API

const encryptedKey = await generate(password)

Generate a keyPair and encrypt it using password. Returns a buffer.

const response = await sign(request, encryptedKey, password, [publicKey])

Sign a request using the key and password combination. If password is not correct, signing will fail.

publicKey is only needed for legacy key support.

const valid = verify(response, signingRequest, publicKey)

Veriy response is a valid signature over signingRequest by publicKey.

License

Apache-2.0

FAQs

Package last updated on 15 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts