@nostr-fetch/adapter-nostr-tools
v0.15.1
Published
The adapter for nostr-tools' SimplePool that make it interoperable with nostr-fetch
Downloads
224
Readme
@nostr-fetch/adapter-nostr-tools
This package includes the adapter for nostr-tools' SimplePool
which allows it to work with nostr-fetch, a utility library for fetching past events from Nostr relays.
If you want to use nostr-fetch, here is a good start point!
Example
import { SimplePool } from 'nostr-tools';
import { NostrFetcher } from 'nostr-fetch';
import { simplePoolAdapter } from '@nostr-fetch/adapter-nostr-tools'
const pool = new SimplePool();
const fetcher = NostrFetcher.withCustomPool(simplePoolAdapter(pool));
Minimum Supported Version of nostr-tools
| adapter version | nostr-tools version | |-----------------|---------------------| | * | 1.3.0 |