ndk_flutter library
Classes
- AlbyGoConnectConfig
- Configuration for launching the Alby Go NWC connection intent.
- AndroidPackageInstaller
- CashuMintReview
- CashuMintSuggestion
- Community-rated Cashu mint discovered from signed NIP-87 events.
- CashuSeedStore
- Loads the cashu user seed phrase from platform secure storage (Keychain / Keystore), generating and persisting a fresh BIP39 seed phrase on first run.
- FlutterSecureStorageWalletsRepo
- LnBitsConnectionInput
- NAppUpdateBanner
- NAppUpdateBuilder
- NAppUpdateController
- NAppUpdateDialog
- NAppUpdateSheet
- NAppUpdateState
- NAppUpdateTile
- NAppVersion
- Displays installed app version and marks an actionable update.
- NBanner
- NCashuSeedBackupWarning
- Standalone warning banner shown when at least one cashu wallet exists and the user has not yet confirmed they backed up the cashu recovery (seed) phrase. The seed is global (not per wallet), so place this once in the wallets screen rather than inside each wallet card.
- NdkEventVerifier
- A platform-aware event verifier that automatically selects the best implementation for the current platform.
- NdkFlutter
- Nip07EventSigner
- Nip55EventSigner
- Event signer backed by a NIP-55 external signer application.
- Nip55LoginResult
-
Result of a NIP-55 login (
get_public_key). - Nip55Permission
- A permission that can be requested when logging in with a NIP-55 external signer, so the signer can pre-authorize silent (ContentResolver) responses.
- Nip55Signer
- Dart bridge to a NIP-55 "Android Signer Application".
- NLnBitsIcon
- NLocaleSwitcher
- Widget that allows switching between available locales.
- NLocaleSwitcherDropdown
- Alternative dropdown version of the locale switcher
- NLogin
- NName
- NostrKinds
- Nostr event kinds mapping to translation keys
- NPendingRequests
- A widget that displays pending signer requests (for signer app, bunker, extension).
- NPendingTransactions
- Horizontal list of pending wallet transactions for a specific wallet when provided.
- NPicture
- NRecentTransactions
- Vertical list of recent transactions for a specific wallet when provided.
- NReleaseComment
- NReleaseDetailsSheet
- NReleaseEngagementController
- NReleaseEngagementState
- NReleaseHistoryScreen
- Displays all discovered releases as a changelog.
- NReleaseZapContributor
- NSwitchAccount
- NUserProfile
- NWalletActions
- Card with Send/Receive actions and dialogs for a selected wallet.
- NWalletCard
- Individual wallet card widget used by the wallets UI.
- NWalletCardList
-
Reorderable list of wallet cards backed by
ndk.wallets.walletsStream. - NWallets
- High-level wallets section widget that mirrors the sample app's wallets tab.
- NWalletsState
- NwcConnectionOption
- Host-provided wallet app or web service that can authorize an NWC connection.
- NwcWalletAuthCoordinator
- StringColor
- Deterministic, UI-optimized color derivation from any string.
- UpdateInstaller
- WalletConnectionState
- WalletIconConfig
- Configuration for wallet type icons
- WalletInputScannerConfiguration
- Content and actions for a host-provided wallet scanner screen.
- WalletInputScanResult
- WalletScannerConnectionOption
- WebEventSigner
- Stub implementation for non-web platforms. WebEventSigner is only available on web platforms.
- WebEventVerifier
- Stub implementation for non-web platforms. WebEventVerifier is only available on web platforms.
Enums
- AlbyGoConnectMethod
- NAppUpdateStatus
- NPendingRequestsState
- State of the pending requests widget
- UpdateInstallResult
- WalletConnectionPhase
- WalletInputKind
- Wallet input categories recognized by the unified add-wallet flow.
- WalletInputOrigin
- Result returned by a host-provided wallet scanner screen.
- WalletScannerConnectionKind
- Wallet connection choice displayed inside a host-provided scanner screen.
Constants
- accountsKey → const String
- kDefaultAlbyGoConnectConfig → const AlbyGoConnectConfig
- Default Alby Go parameters aligned with the sample app's NWC auth flow.
Functions
-
buildNwcCallbackUri(
{required AlbyGoConnectConfig config, String scheme = 'nostrnwc'}) → Uri -
Builds an NWC-07 callback URI handled by Primal, Alby Go, and other wallets
registered for
nostrnwc://connect. -
buildNwcWalletAuthUri(
{required String appPubkey, required AlbyGoConnectConfig config, required String state, String scheme = 'nostr+walletauth', bool includeReturnTo = true}) → Uri - Builds standard NWC wallet-auth URI handled by compatible wallet apps.
-
buildNwcWebWalletAuthUri(
{required Uri authorizationEndpoint, required String appName, required String pubkey, required String state, Map< String, String> additionalQueryParameters = const {}}) → Uri - Builds client-key web-wallet authorization URL.
-
classifyWalletInput(
String input) → WalletInputKind? - Classifies locally recognizable wallet input without performing network I/O.
-
defaultNwcConnectionOptions(
{AlbyGoConnectConfig config = kDefaultAlbyGoConnectConfig}) → List< NwcConnectionOption> -
Default assisted web wallet connections, using the host app's identity and
callback from
config. Pass an explicit list to override or disable them. -
generateNwcWalletAuthState(
) → String - Generates NWC-08 correlation state with 128 bits of secure randomness.
-
matchesNwcWalletAuthInfoEvent(
Nip01Event event, {required String appPubkey, required String state, String? walletServicePubkey, bool requireAppPubkeyTag = true}) → bool - Validates discovery against client key and any returned correlation state. Missing state remains accepted for wallets implementing earlier drafts.
-
showAddBolt12WalletDialog(
BuildContext context, NdkFlutter ndkFlutter, {bool returnToWalletType = false, AlbyGoConnectConfig albyGoConnectConfig = kDefaultAlbyGoConnectConfig, NwcWalletAuthCoordinator? nwcWalletAuthCoordinator, NwcUriScanner? nwcUriScanner, Bolt12InputScanner? bolt12InputScanner}) → Future< Bolt12Wallet?> - Shows a dialog to add a receive-only BOLT12 offer wallet.
-
showAddCashuWalletDialog(
BuildContext context, NdkFlutter ndkFlutter, {String defaultMintUrl = _defaultMintUrl, bool returnToWalletType = false, AlbyGoConnectConfig albyGoConnectConfig = kDefaultAlbyGoConnectConfig, NwcWalletAuthCoordinator? nwcWalletAuthCoordinator, NwcUriScanner? nwcUriScanner}) → Future< CashuWallet?> - Shows a dialog to add a Cashu wallet.
-
showAddLnurlWalletDialog(
BuildContext context, NdkFlutter ndkFlutter, {bool returnToWalletType = false, AlbyGoConnectConfig albyGoConnectConfig = kDefaultAlbyGoConnectConfig, NwcWalletAuthCoordinator? nwcWalletAuthCoordinator, NwcUriScanner? nwcUriScanner}) → Future< Wallet?> - Shows a dialog to add an LNURL wallet.
-
showAddNwcWalletDialog(
BuildContext context, NdkFlutter ndkFlutter, {int defaultBalance = 10000, NwcUriScanner? nwcUriScanner}) → Future< NwcWallet?> - Shows a dialog to add an NWC wallet.
-
showAddWalletTypeDialog(
BuildContext context, NdkFlutter ndkFlutter, {AlbyGoConnectConfig albyGoConnectConfig = kDefaultAlbyGoConnectConfig, NwcWalletAuthCoordinator? nwcWalletAuthCoordinator, WalletInputScanner? walletInputScanner, WalletQrScannerBuilder? walletQrScannerBuilder, List< NwcConnectionOption> ? nwcConnectionOptions, NwcUriScanner? nwcUriScanner, Bolt12InputScanner? bolt12InputScanner}) → Future<bool> - Shows the unified add-wallet flow.
-
showNwcConnectionOptionsDialog(
BuildContext context, NdkFlutter ndkFlutter, {AlbyGoConnectConfig albyGoConnectConfig = kDefaultAlbyGoConnectConfig, NwcWalletAuthCoordinator? nwcWalletAuthCoordinator, NwcUriScanner? nwcUriScanner}) → Future< bool> - Shows a dialog to choose NWC connection method.
-
showWalletInputDialog(
BuildContext context, WalletInputScannerConfiguration configuration, {WalletQrScannerBuilder? qrScannerBuilder}) → Future< WalletInputScanResult?> -
Opens the shared scanner, manual input, wallet and Cashu mint chooser UI.
Without
qrScannerBuilder, all non-camera input methods remain available. -
walletAuthConnectionRelay(
Nip01Event event, {required String fallbackRelay}) → String - Uses wallet-service relay recommendation when NWC-08 info provides one.
Typedefs
- AddWalletCardBuilder = Widget Function(BuildContext context, VoidCallback? onTap)
- Builds the card used to add a wallet.
-
Bolt12InputScanner
= Future<
String?> Function(BuildContext context) - Opens a host-provided scanner and returns a BOLT12, BIP321, or BIP353 input.
- NdkEventSigner = Bip340EventSigner
-
Native alias of NdkEventSigner: pure Dart
Bip340EventSigner. - NdkEventSignerFactory = Bip340EventSignerFactory
-
Native factory: delegates to
Bip340EventSignerFactory. -
NwcConnectionLauncher
= Future<
void> Function(BuildContext context, NdkFlutter ndkFlutter, NwcWalletAuthCoordinator coordinator) - Launches a wallet-assisted NWC connection flow.
-
NwcUriScanner
= Future<
String?> Function(BuildContext context) - Opens a host-provided NWC QR scanner and returns the scanned URI.
-
WalletInputScanner
= Future<
WalletInputScanResult?> Function(BuildContext context, WalletInputScannerConfiguration configuration) - Opens a host-provided scanner accepting every supported wallet input.
-
WalletQrScannerBuilder
= Widget Function(BuildContext context, ValueChanged<
String> onScan, ValueChanged<Object> onError) - Builds only the camera preview/decoder used by the wallet input dialogs.