Skip to main content
Home

Tools for developing Nostr clients.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
70%
Published
2 days ago (2.15.1)
class AbstractSimplePool

Constructors

new
AbstractSimplePool(opts: AbstractPoolConstructorOptions)

Properties

Methods

close(relays: string[]): void
destroy(): void
ensureRelay(
url: string,
params?: { connectionTimeout?: number; },
): Promise<AbstractRelay>
get(
relays: string[],
filter: Filter,
params?: Pick<SubscribeManyParams,
"label"
| "id"
| "maxWait"
>
,
): Promise<Event | null>
publish(
relays: string[],
event: Event,
options?: { onauth?: (evt: EventTemplate) => Promise<VerifiedEvent>; },
): Promise<string>[]
querySync(
relays: string[],
filter: Filter,
params?: Pick<SubscribeManyParams,
"label"
| "id"
| "maxWait"
>
,
): Promise<Event[]>
subscribeEose(
relays: string[],
filter: Filter,
params: Pick<SubscribeManyParams,
"label"
| "id"
| "onevent"
| "onclose"
| "maxWait"
| "onauth"
| "doauth"
>
,
): SubCloser
subscribeManyEose(
relays: string[],
filters: Filter[],
params: Pick<SubscribeManyParams,
"label"
| "id"
| "onevent"
| "onclose"
| "maxWait"
| "onauth"
| "doauth"
>
,
): SubCloser
subscribeMap(
requests: { url: string; filter: Filter; }[],
): SubCloser

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@nostr/tools

Import symbol

import { AbstractSimplePool } from "@nostr/tools/abstract-pool";
or

Import directly with a jsr specifier

import { AbstractSimplePool } from "jsr:@nostr/tools/abstract-pool";

Add Package

pnpm i jsr:@nostr/tools
or (using pnpm 10.8 or older)
pnpm dlx jsr add @nostr/tools

Import symbol

import { AbstractSimplePool } from "@nostr/tools/abstract-pool";

Add Package

yarn add jsr:@nostr/tools
or (using Yarn 4.8 or older)
yarn dlx jsr add @nostr/tools

Import symbol

import { AbstractSimplePool } from "@nostr/tools/abstract-pool";

Add Package

vlt install jsr:@nostr/tools

Import symbol

import { AbstractSimplePool } from "@nostr/tools/abstract-pool";

Add Package

npx jsr add @nostr/tools

Import symbol

import { AbstractSimplePool } from "@nostr/tools/abstract-pool";

Add Package

bunx jsr add @nostr/tools

Import symbol

import { AbstractSimplePool } from "@nostr/tools/abstract-pool";