buildNwcCallbackUri function

Uri buildNwcCallbackUri({
  1. required AlbyGoConnectConfig config,
  2. String scheme = 'nostrnwc',
})

Builds an NWC-07 callback URI handled by Primal, Alby Go, and other wallets registered for nostrnwc://connect.

Implementation

Uri buildNwcCallbackUri({
  required AlbyGoConnectConfig config,
  String scheme = 'nostrnwc',
}) {
  return Uri(
    scheme: scheme,
    host: config.nostrNwcHost,
    queryParameters: {
      'appname': config.appName,
      'appicon': config.appIconUrl,
      'callback': config.callback,
    },
  );
}