Module @welshman/feeds

@welshman/feeds version

A custom feed compiler and loader for nostr. Read the spec on wikifreedia.

Example

// Define a feed using set operations
const feed = intersectionFeed(
unionFeed(
dvmFeed({
kind: 5300,
pubkey: '19b78ccfa7c5e31e6bacbb3f2a1703f64b62017702e584440bf29a7e16263e8c',
}),
listFeed("10003:19ba654f26afd4930fd3d51baf4e26f1413b7aeec7190cd6c0cdf4d2f14cec6b:"),
)
wotFeed({min: 0.1}),
scopeFeed("global"),
)

// Create a controller, providing required context via FeedOptions
const controller = new FeedController({
feed,
request,
requestDVM,
getPubkeysForScope,
getPubkeysForWOTRange,
onEvent: event => console.log("Event", event),
onExhausted: () => console.log("Exhausted"),
})

// Load notes using the feed
const events = await controller.load(10)

Enumerations

FeedType
Scope

Classes

FeedCompiler
FeedController

Type Aliases

AddressFeed
AuthorFeed
CreatedAtFeed
CreatedAtItem
DifferenceFeed
DVMFeed
DVMItem
DVMOpts
DVMRequest
Feed
FeedOptions
FilterFeedType
GlobalFeed
IDFeed
IntersectionFeed
KindFeed
LabelFeed
LabelItem
ListFeed
ListItem
RelayFeed
RequestItem
RequestOpts
ScopeFeed
SearchFeed
TagFeed
TagFeedMapping
UnionFeed
WOTFeed
WOTItem

Variables

defaultTagFeedMappings

Functions

feedFromFilter
feedFromTags
feedsFromFilter
feedsFromFilters
feedsFromTags
getFeedArgs
hasSubFeeds
isAddressFeed
isAuthorFeed
isCreatedAtFeed
isDifferenceFeed
isDVMFeed
isGlobalFeed
isIDFeed
isIntersectionFeed
isKindFeed
isLabelFeed
isListFeed
isRelayFeed
isScopeFeed
isSearchFeed
isTagFeed
isUnionFeed
isWOTFeed
makeAddressFeed
makeAuthorFeed
makeCreatedAtFeed
makeDifferenceFeed
makeDVMFeed
makeGlobalFeed
makeIDFeed
makeIntersectionFeed
makeKindFeed
makeLabelFeed
makeListFeed
makeRelayFeed
makeScopeFeed
makeSearchFeed
makeTagFeed
makeUnionFeed
makeWOTFeed
walkFeed