Ndk class

Main entry point for the NDK (Nostr Development Kit) library.

This file contains the primary class Ndk which provides access to various Nostr-related functionalities/usecases and manages the state of this NDK instance.

Constructors

Ndk(NdkConfig config)
Creates a new instance of Ndk with the given config
Ndk.defaultConfig()
Creates a new instance of Ndk with default configuration
Ndk.emptyBootstrapRelaysConfig()
Creates a new instance of Ndk with default configuration and empty bootstrap relays

Properties

accounts → Accounts
Accounts
no setter
blossom → Blossom
Blossom usecase
upload, download, delete, list files
low level usecase, recommended for advanced users
no setter
blossomUserServerList → BlossomUserServerList
Blossom User Server list
used to manage the list of blossom servers for a user
low level usecase, recommended for advanced users
no setter
broadcast → Broadcast
Provides access to low-level Nostr broadcast/publish.
no setter
bunkers → Bunkers
Bunker - NIP-46 remote signing protocol
no setter
cacheEvictionScheduler → CacheEvictionScheduler?
Background cache eviction scheduler, when enabled in config.
no setter
cashu → Cashu
Cashu Wallet
no setter
config → NdkConfig
Configuration for the NDK instance
final
connectivity → Connectivy
Use case for managing relay connectivity
get notified about relay connectivity changes
and update NDK about your application connectivity
for faster reconnects
no setter
decryptedEventPayloads → DecryptedEventPayloads
Read-through cache for decrypted event payloads.
no setter
dms → Dms
Direct messages usecase.
no setter
fetchedRanges → FetchedRanges
Fetched ranges tracking Track which time ranges have been fetched from which relays for each filter
no setter
files → Files
manage files on nostr
upload, download, delete files
high level usecase, recommended for most users
no setter
follows → Follows
Handles operations related to user follows
no setter
giftWrap → GiftWrap
Gift wrap - NIP-59
crate gift wraps
unwrap gift wraps \
no setter
hashCode → int
The hash code for this object.
no setterinherited
lists → Lists
Manages various types of lists in the Nostr network
no setter
metadata → Metadatas
user metadata operations
no setter
nip05 → Nip05Usecase
NIP-05 operations (verify and fetch)
no setter
nip77 → Nip77
NIP-77 Negentropy sync Efficient set reconciliation for syncing events between client and relay
no setter
nwc → Nwc
Nostr Wallet connect
no setter
proofOfWork → ProofOfWork
no setter
relays → RelayManager
Relay Manager
no setter
relaySets → RelaySets
calculate relay set
no setter
requests → Requests
Provides access to low-level Nostr requests.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
Search
no setter
software → Software
NIP-82 software application, release, and asset discovery.
no setter
ta → TrustedAssertions
Trusted Assertions (NIP-85)
no setter
trustedAssertions → TrustedAssertions
Trusted Assertions (NIP-85)
no setter
userRelayLists → UserRelayLists
user relay lists usecase
similar to nip65 but more generic, contact list relays can also be considered
no setter
wallets → Wallets
Wallet combining all wallet accounts \
no setter
zaps → Zaps
Zaps
no setter

Methods

destroy() → Future<void>
Close all transports on relay manager
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited