ndk library

Classes

Account
Account entity
Accounts
A usecase that handles accounts
Bip340EventSigner
Pure Dart Event Signer
Bip340EventSignerFactory
Default factory for creating Bip340EventSigner instances
Bip340EventVerifier
Pure dart event verifier using https://pub.dev/packages/bip340 can be slow on mobile devices
BlobDeleteResult
Result of a blob delete
BlobDescriptor
Descriptor of a blob - when getting a blob from a server
BlobNip94
BUD-08
is BlobNip94 because fromJson does not work with nostr events, only blobDescriptor!
BlobResponse
Response of a blob download
BlobUploadProgress
Progress information for blob uploads
BlobUploadResult
Result of a blob upload
Blossom
direct access usecase to blossom
use files usecase for a more convinent way to manage files
BlossomUserServerList
Blossom User Server List used to manage the blossom servers of a user
Broadcast
Public-facing broadcast facade.
Delegates immediate sending to BroadcastSender and coordinates pending delivery enrollment for specific-relay broadcasts.
The retry path in PendingBroadcastDelivery calls BroadcastSender directly, so it never re-enters this facade's enrollment logic.
BunkerConnection
Bunkers
Bunkers usecase that handles NIP-46 remote signing protocol operations
CacheEvictionScheduler
Background scheduler that periodically runs CacheManager.evict.
CacheManager
Storage contract used by NDK.
Cashu
CashuBlindedMessage
CashuBlindedMessageItem
CashuBlindedSignature
CashuRestoreKeysetResult
Result of a restore operation for a single keyset
CashuRestoreResult
CashuSeed
CashuSeedDeriveSecretResult
CashuStateExportImport
Full export / import of all local cashu state.
CashuStateImportResult
Summary of what CashuStateExportImport.importFromMap restored.
ConsoleOutput
Console output with color support
ContactList
nip02 contact list
DecryptedEventPayloadRecord
Sidecar cache record for decrypted event plaintext.
DecryptedEventPayloads
Read-through cache for decrypted payload sidecars.
Dms
Direct-messages usecase built on NIP-17 gift-wrapped messages.
EventCacheStateRecord
Lean derived cache metadata for one event.
EventDeliveryRecord
Persisted aggregate delivery record for one event.
EventDeliverySnapshot
Read-only joined view of one locally persisted delivery item.
EventFilter
A class that filters events
Used to clean event streams based on the event
EventSigner
EventVerifier
EvictionPolicy
Policy used by CacheManager.evict and by the background eviction scheduler.
EvictionResult
Summary returned from one eviction run.
FetchedRanges
Usecase to track and query fetched ranges per relay
FetchedRangesGap
A gap in fetched ranges (missing time range)
FileHashProgress
Files
high level usecase to manage files on nostr
Filter
Represents a filter for querying Nostr events.
FilterFetchedRangeRecord
Record stored in the database for filter fetched ranges
FilterFingerprint
Utility to generate a hash for a filter (excluding temporal fields)
Follows
Follows usecase
GetBalanceResponse
Represents the result of a 'get_balance' response.
GetBudgetResponse
Represents the result of a 'get_budget' response.
GetInfoResponse
Represents the result of a 'get_info' response.
GiftWrap
InvoiceResponse
invoice response
JitEngine
Just In Time Network Engine This engine is responsible for handling all nostr network requests
LegacyNip04Message
A decrypted legacy NIP-04 message returned by Dms.loadLegacyNip04Conversation.
Lists
Lists usecase for access to NIP-51 lists and sets.
ListTransactionsResponse
Represents the result of a 'list_transactions' response.
LocalEventSignerFactory
Factory for creating EventSigner instances.
Logger
A mixin class that provides a logger instance.
LogLevels
A class that provides log levels.
LogOutput
Abstract interface for logger outputs.
LookupInvoiceResponse
Represents the result of a 'lookup_invoice' response.
MakeInvoiceResponse
Represents the result of a 'make_invoice' response.
MemCacheManager
In memory database implementation benefits: very fast drawbacks: does not persist
Metadata
basic nostr metadata
Metadatas
nostr metadata usecase
Ndk
Main entry point for the NDK (Nostr Development Kit) library.
NdkBroadcastResponse
the response to a low level broadcast request
NdkConfig
Configuration class for the Nostr Development Kit (NDK)
NdkLogger
Core logger implementation.
NdkRequest
Ndk request
NdkResponse
Represents a response from a Nostr Development Kit (NDK) request.
Nip01Event
basic nostr nip01 event data structure
Nip01EventModel
Data model for NIP-01 Event Extends Nip01Event entity with serialization methods to/from JSON and other formats
Nip01Utils
Nip17Conversation
Group of NIP-17 messages exchanged with one peer.
Nip17EncryptedFile
AES-GCM encrypted bytes and the private metadata required by a NIP-17 kind-15 rumor.
Nip17FileCrypto
NIP-17 interoperable AES-GCM file encryption.
Nip17FileMetadata
Parsed metadata carried only inside a NIP-17 kind-15 rumor.
Nip17Message
Parsed direct-message item produced by the NIP-17 DM usecase.
Nip19
Main NIP-19 class providing encoding, decoding, and validation This is a facade that delegates to specialized encoder/decoder classes
Nip19Decoder
NIP-19 decoding functions
Nip19Encoder
NIP-19 encoding functions
Nip19TLV
TLV (Type-Length-Value) parsing for NIP-19
Nip19Utils
Utility functions for NIP-19
Nip51List
Nip51ListElement
Nip51Set
Nip77
Public API for NIP-77 Negentropy sync
Nip77Response
Response from a NIP-77 reconciliation request
Nip77Result
Result of a NIP-77 negentropy reconciliation
Nip85AddressableMetrics
Addressable event metrics result from a NIP-85 assertion (kind 30384)
Nip85EventMetrics
Event metrics result from a NIP-85 assertion (kind 30383)
Nip85ExternalIdMetrics
External identifier metrics result from a NIP-85 assertion (kind 30385)
Nip85Kind
NIP-85 Event kinds for trusted assertions
Nip85TrustedProvider
Configuration for a NIP-85 trusted assertion provider
Nip85UserMetrics
User metrics result from a NIP-85 assertion (kind 30382)
NostrConnect
NostrWalletConnectUri
Represents a parsed Nostr Wallet Connect URI with support for multiple relays
NotCoveredPubKey
Nwc
Main entry point for the NWC (Nostr Wallet Connect - NIP47 ) usecase
NwcConnection
NWC Connection
NwcMethod
NWC method
PayInvoiceResponse
Represents the result of an pay_invoice response.
PendingSignerRequest
Represents a pending request waiting for user approval on a signer.
ProofOfWork
PTagCountEventFilter
filter for too many tags useful for preventing hellthreads
Relay
Basic relay info/status
RelayAuth
Which identity a request may be attributed to on a relay (NIP-42).
RelayAuthAllow
Authenticates as account once refused, see RelayAuth.allow.
RelayAuthNever
Never authenticates, see RelayAuth.never.
RelayAuthRequire
Authenticates as account from the start, see RelayAuth.require.
RelayConnectionKey
Identifies a single relay connection.
RelayDeliveryTarget
Persisted relay-specific broadcast target.
RelayFetchedRanges
Fetched ranges information for a specific relay and filter combination
RelayRequestOutcome
Where a request stands on a single relay, and why
RelaySet
RelaySets
Requests
A class that handles low-level Nostr network requests and subscriptions.
RustEventVerifier
Stub implementation of RustEventVerifier for platforms that don't support FFI (e.g., web).
SembastCacheManager
TimeRange
A time range that has been fetched from a relay
TransactionResult
Represents a transaction result.
TrustedAssertions
Trusted Assertions usecase (NIP-85)
UserRelayLists
similar to nip65, but also accepts values from nip02
gives you inbox/outbox data in various ways
UserRelayList is a mapping of pubkey to relays with read/write markers UserRelayLists is a usecase for managing UserRelayLists
Wallets
Unified wallet system that handles multiple wallet types (NWC, Cashu, etc.) Uses WalletProvider pattern for pluggability
ZapReceipt
ZapRequest
Zap Request
ZapResponse
zap response
Zaps
Zaps

Enums

AccountType
BudgetRenewalPeriod
DecryptedPayloadScheme
DecryptedPayloadStatus
Result of attempting to obtain plaintext for an encrypted payload sidecar.
EventDeliveryStatus
Aggregate delivery state for one event across all of its relay targets.
EventSigningState
Persisted signing state for one event before relay delivery can proceed.
LogLevel
Log levels for the NDK logger.
NdkEngine
Enum representing different engine modes for Nostr network operations.
Nip85Metric
Available metrics for NIP-85 trusted assertions
NwcExtension
Optional Nostr Wallet Connect extension specifications.
RelayDeliveryReason
Why a relay became a delivery target for an event.
RelayDeliveryState
Per-relay delivery state for one (eventId, relayUrl) pair.
RelayDirection
RelayRequestStatus
What a relay did with a request.
SignerMethod
Methods that can be called on a signer
UploadPhase
UploadStrategy

Mixins

ConcurrencyLimiterMixin
Limits how many operations can be in flight at once.

Constants

DEFAULT_NIP85_PROVIDERS → const List<Nip85TrustedProvider>
Default trusted providers for NIP-85 assertions
DEFAULT_NIP85_RELAY → const String
Default relay for NIP-85 trusted assertions
packageVersion → const String

Exceptions / Errors

InvalidPadding
Nip77AuthRequiredException
Exception thrown when a relay refuses the negotiation without an identity and the auth policy leaves nobody to authenticate as.
Nip77AuthUnavailableException
Exception thrown when no connection can carry the reconciliation, because the identity it requires cannot sign. Falling back to the anonymous connection is exactly what RelayAuth.require ruled out.
Nip77NotSupportedException
Exception thrown when a relay doesn't support NIP-77
Nip77TimeoutException
Exception thrown when NIP-77 reconciliation times out
SignerRequestCancelledException
Exception thrown when a signer request is cancelled by the user.
SignerRequestRejectedException
Exception thrown when a signer request is rejected by the remote signer.