1

I am trying out sending/receiving payments between BlueWallet, Muun wallets and my locally running lnd node. I managed to successfully pay an invoice generated by BlueWallet or Muun from lnd node on mainnet

Now want to be able to sporadically send payments to any of these wallets when some event happens. For that I don't want to generate a new invoice, but just to send a keysend/amp payment.

However, I don't see a direct or even indirect connection between invoice data and public key of the wallet.

I don't see a way to see the public key I can amp/keysend to.

Here is an example of lncli decodepayreq <invoice_string>:

{
    "destination": "028c584de287761236460baf946b34c1e288c33b8d8e3efcec6b691e442cedd40b",
    "payment_hash": "e49f38a4062efbd1ca48f3880f1ede6d3777bf40ec95ae2b3610554092998e25",
    "num_satoshis": "0",
    "timestamp": "1652777522",
    "expiry": "86400",
    "description": "",
    "description_hash": "",
    "fallback_addr": "",
    "cltv_expiry": "72",
    "route_hints": [
        {
            "hop_hints": [
                {
                    "node_id": "038f8f113c580048d847d6949371726653e02b928196bad310e3eda39ff61723f6",
                    "chan_id": "15123508029316582222",
                    "fee_base_msat": 100,
                    "fee_proportional_millionths": 1500,
                    "cltv_expiry_delta": 9
                }
            ]
        }
    ],
    "payment_addr": "cbef694eea85824a73b84a6323b6c9e489c7c2ce38e23c869fd7907697a3a130",
    "num_msat": "0",
    "features": {
        "9": {
            "name": "tlv-onion",
            "is_required": false,
            "is_known": true
        },
        "15": {
            "name": "payment-addr",
            "is_required": false,
            "is_known": true
        }
    }
}

So, is it possible at all to deduct public key having an invoice?

Murch
  • 71,155
  • 33
  • 180
  • 600
Sergei Basharov
  • 215
  • 1
  • 7

1 Answers1

1

The destination public key is part of the invoice. In your JSON result it's surely the value of the destination field.

You can use the destination public key from the invoice to make a keysend payment to this node. However, keep in mind that you then won't have the proof of payment (in your specific case it's probably not an issue).

Antoine Poinsot
  • 5,881
  • 2
  • 11
  • 28