Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nostr-tools

Package Overview
Dependencies
Maintainers
1
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nostr-tools - npm Package Compare versions

Comparing version 0.21.1 to 0.21.2

10

nip04.js

@@ -8,3 +8,3 @@ import aes from 'browserify-cipher'

const key = secp256k1.getSharedSecret(privkey, '02' + pubkey)
const normalizedKey = getOnlyXFromFullSharedSecret(key)
const normalizedKey = getNormalizedX(key)

@@ -26,3 +26,3 @@ let iv = Uint8Array.from(randomBytes(16))

let key = secp256k1.getSharedSecret(privkey, '02' + pubkey)
let normalizedKey = getOnlyXFromFullSharedSecret(key)
let normalizedKey = getNormalizedX(key)

@@ -40,4 +40,6 @@ var decipher = aes.createDecipheriv(

function getOnlyXFromFullSharedSecret(fullSharedSecretCoordinates) {
return Buffer.from(fullSharedSecretCoordinates).toString('hex').substr(2, 64)
function getNormalizedX(key) {
return typeof key === 'string'
? key.substr(2)
: Buffer.from(key.slice(1)).toString('hex')
}

2

package.json
{
"name": "nostr-tools",
"version": "0.21.1",
"version": "0.21.2",
"description": "Tools for making a Nostr client.",

@@ -5,0 +5,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc