mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
remove pws.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nostr-tools",
|
||||
"version": "0.1.4",
|
||||
"version": "0.2.0",
|
||||
"description": "Tools for making a Nostr client.",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@@ -9,8 +9,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"buffer": "^6.0.3",
|
||||
"noble-secp256k1": "^1.1.1",
|
||||
"pws": "^5.0.2"
|
||||
"noble-secp256k1": "^1.1.1"
|
||||
},
|
||||
"keywords": [
|
||||
"decentralization",
|
||||
|
||||
3
relay.js
3
relay.js
@@ -1,4 +1,3 @@
|
||||
import PersistentWebSocket from 'pws'
|
||||
import {verifySignature} from './event'
|
||||
|
||||
export function normalizeRelayURL(url) {
|
||||
@@ -12,7 +11,7 @@ export function normalizeRelayURL(url) {
|
||||
export function relayConnect(url, onEvent, onNotice) {
|
||||
url = normalizeRelayURL(url)
|
||||
|
||||
const ws = new PersistentWebSocket(
|
||||
const ws = new WebSocket(
|
||||
url + (url.indexOf('?') !== -1 ? '&' : '?') + `session=${Math.random()}`,
|
||||
{
|
||||
pingTimeout: 180 * 1000
|
||||
|
||||
@@ -1165,11 +1165,6 @@ picomatch@^2.2.2:
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
|
||||
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
|
||||
|
||||
pws@^5.0.2:
|
||||
version "5.0.2"
|
||||
resolved "https://registry.yarnpkg.com/pws/-/pws-5.0.2.tgz#86b581ad5e811417d514f06868ae4d9c71bdaa48"
|
||||
integrity sha512-V4ZwsJIAiG9YoNv1IO/JSoapG9NrwRhmKKdQ0C7q0tBIxBTptGeTBhdnE53o5qrcoEHDqw5Mc3T1XF0NlvHTlQ==
|
||||
|
||||
randombytes@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
|
||||
|
||||
Reference in New Issue
Block a user