buildNwcWalletAuthUri function
Uri
buildNwcWalletAuthUri({
- required String appPubkey,
- required AlbyGoConnectConfig config,
- required String state,
- String scheme = 'nostr+walletauth',
- bool includeReturnTo = true,
Builds standard NWC wallet-auth URI handled by compatible wallet apps.
Implementation
Uri buildNwcWalletAuthUri({
required String appPubkey,
required AlbyGoConnectConfig config,
required String state,
String scheme = 'nostr+walletauth',
bool includeReturnTo = true,
}) {
return Uri(
scheme: scheme,
host: appPubkey,
queryParameters: {
'relay': config.discoveryRelay,
'state': state,
'name': config.appName,
'request_methods': config.requestMethods
.map((method) => method.name)
.join(' '),
'icon': config.appIconUrl,
if (includeReturnTo) 'return_to': config.callback,
},
);
}