Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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);
})
```