Skip to content

Feature: Add "Copy App Link" for web app auto-connect #45

Description

@noobedo

Problem

Users must copy-paste the raw nostr+walletconnect://... URI into apps. This is friction-heavy for non-technical users.

Solution

Add a "Web App Link" section to the pairing dialog that generates shareable links like:
https://indiesats.com/#/?nwc=nostr%2Bwalletconnect%3A%2F%2F...

This follows the Bitcoin Connect auto-connect pattern and enables one-click onboarding.

Implementation

In static/js/index.js, add appUrl to pairingDialog.data:

pairingDialog: {
  show: false,
  data: {
    pairingUrl: '',
    appUrl: ''  // NEW
  }
},

Add copyAppLink method:

copyAppLink: async function () {
  const nwcUri = this.pairingDialog.data.pairingUrl
  let appUrl = this.pairingDialog.data.appUrl.trim()
  if (!appUrl) {
    Quasar.Notify.create({
      type: 'negative',
      message: 'Please enter an app URL first'
    })
    return
  }
  appUrl = appUrl.replace(/\/$/, '')
  const encoded = encodeURIComponent(nwcUri)
  const link = `${appUrl}/#/?nwc=${encoded}`
  await navigator.clipboard.writeText(link)
  Quasar.Notify.create({ type: 'positive', message: 'App link copied!' })
},

In templates/nwcprovider/index.html, add input field and "Copy App Link" button in the pairing dialog before the "Advanced" section.
Tested

Implemented and verified on my LNbits instance with indiesats.com auto-connect.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions