Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dskvr/nostrwatch-js
Library for inspecting nostr relays
https://github.com/dskvr/nostrwatch-js
nostr
Last synced: 24 days ago
JSON representation
Library for inspecting nostr relays
- Host: GitHub
- URL: https://github.com/dskvr/nostrwatch-js
- Owner: dskvr
- Created: 2022-11-23T15:18:31.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-22T02:56:06.000Z (5 months ago)
- Last Synced: 2024-08-04T11:01:19.113Z (4 months ago)
- Topics: nostr
- Language: JavaScript
- Homepage:
- Size: 151 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-nostr - nostr-relay-inspector - relay-inspector.svg?style=social) - A library that returns useful information about relays based on nostr-js (Libraries / Client reviews and/or comparisons)
README
# nostrwatch-js
Library for inspecting nostr relays.## Install
### npm
`npm install nostrwatch-js`### yarn
`yarn add nostrwatch-js`## Usage
```
import { RelayChecker } from 'nostrwatch-js`let $checker;
//pass websocket URL
$checker = new RelayChecker('wss://relay.nostr.band');$checker
.on('change', (result) => {
console.log('something updated', result);
})
.on('complete', (self) => {
console.log('processed result', self.result);
})
```