widgets/wallets/n_add_wallet_dialogs library

Classes

AlbyGoConnectConfig
Configuration for launching the Alby Go NWC connection intent.
CashuMintReview
CashuMintSuggestion
Community-rated Cashu mint discovered from signed NIP-87 events.
LnBitsConnectionInput
NwcConnectionOption
Host-provided wallet app or web service that can authorize an NWC connection.
NwcWalletAuthCoordinator
WalletConnectionState
WalletInputScannerConfiguration
Content and actions for a host-provided wallet scanner screen.
WalletInputScanResult
WalletScannerConnectionOption

Enums

AlbyGoConnectMethod
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

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.
walletAuthConnectionRelay(Nip01Event event, {required String fallbackRelay}) String
Uses wallet-service relay recommendation when NWC-08 info provides one.

Typedefs

Bolt12InputScanner = Future<String?> Function(BuildContext context)
Opens a host-provided scanner and returns a BOLT12, BIP321, or BIP353 input.
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.