Socket
Socket
Sign inDemoInstall

nostr-tools

Package Overview
Dependencies
Maintainers
1
Versions
142
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.1.2 to 0.1.3

2

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

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -35,8 +35,22 @@ import PersistentWebSocket from 'pws'

ws.onmessage = async e => {
let data = JSON.parse(e.data)
var data
try {
data = JSON.parse(e.data)
} catch (err) {
data = e.data
}
if (data.length > 1) {
if (data === 'PING') {
ws.send('PONG')
return
}
if (data[0] === 'notice') {
console.log('message from relay ' + url + ': ' + data[1])
onNotice(data[1])
} else if (typeof data[0] === 'object') {
return
}
if (typeof data[0] === 'object') {
let event = data[0]

@@ -54,2 +68,3 @@ let context = data[1]

}
return
}

@@ -56,0 +71,0 @@ }

@@ -1,2 +0,2 @@

import secp256k1 from 'noble-secp256k1'
import * as secp256k1 from 'noble-secp256k1'

@@ -3,0 +3,0 @@ export const makeRandom32 = () => secp256k1.utils.randomPrivateKey()

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