Skip to content

Add Quick Connect to Your Wallet

Buho Jump supports one-click wallet connections via deep links. If you run a wallet service, you can add a "Connect to Buho Jump" button that sets up a wallet connection without any copy-paste.

This is how NUTbits connects — and you can do the same.

How it works

  1. Your wallet serves a /connect endpoint that accepts app connection requests
  2. Buho Jump opens that endpoint in a browser tab with identifying parameters
  3. Your wallet creates an NWC connection and redirects back with the connection string
  4. Buho Jump intercepts the redirect, validates the string, and stores the wallet

The user sees your wallet UI briefly, then gets redirected to a confirmation screen in the extension. The whole flow takes a few seconds.

Buho Jump opens your wallet at:

https://your-wallet.com/connect?appname=Buho+Jump&appicon={icon_url}&callback={callback_url}

Parameters

ParameterDescription
appnameThe name of the requesting app. Display it to your user for trust.
appiconURL to the app's icon (PNG, 256x256). Show it alongside the app name.
callbackURL to redirect to after the connection is created. Append ?value={nwc_string} to it.

Callback format

After your wallet creates the NWC connection, redirect the browser to:

{callback}?value={url_encoded_nwc_string}

The NWC string must be a valid nostr+walletconnect:// URI containing:

  • The wallet's public key (64-char hex, as the hostname)
  • At least one relay parameter (must start with wss://)
  • A secret parameter

Example:

nostr+walletconnect://pubkey_hex?relay=wss%3A%2F%2Fnos.lol&secret=hex_secret

What Buho Jump validates

Before storing the wallet, Buho Jump checks:

  1. The NWC string starts with nostr+walletconnect://
  2. The pubkey (hostname) is at least 64 characters
  3. A secret parameter is present
  4. At least one relay parameter starts with wss://
  5. The connection actually works (test via NWC.connect())

If the connection test fails, the wallet is rolled back (not stored). The user sees an error page with guidance.

Implementation example

Here's a minimal /connect endpoint in Node.js:

javascript
app.get('/connect', async (req, res) => {
  const { appname, appicon, callback } = req.query

  // Show the user who's requesting (optional — you can auto-approve)
  // Create the NWC connection
  const nwcString = await createNWCConnection({
    label: appname || 'Browser Extension',
    permissions: ['pay_invoice', 'get_balance', 'make_invoice'],
  })

  // Redirect back to the app with the connection string
  if (callback) {
    const sep = callback.includes('?') ? '&' : '?'
    res.redirect(`${callback}${sep}value=${encodeURIComponent(nwcString)}`)
  } else {
    // No callback — show the string for manual copy
    res.json({ nwc_string: nwcString })
  }
})

Dedicated connections

Consider creating dedicated connections for each app — with their own balance and spending limits. This way, a misbehaving app can only spend what the user explicitly funded.

NUTbits implements this pattern: each deep link connection starts with 0 sats and must be funded separately through the wallet interface.

Security considerations

  • The callback URL is an HTTP URL (not chrome-extension://) because browsers block cross-protocol redirects. Buho Jump intercepts the redirect via browser tab monitoring before the page loads.
  • Each connection attempt uses a unique callback token to prevent replay attacks.
  • The NWC string is validated structurally AND tested with a live connection before being stored.
  • Auto-approval is fine for local wallets. For hosted services, show the user who's requesting and let them confirm.

Questions?

If you're building a wallet integration and need help, reach out to DrShift on Telegram or open an issue on GitHub.