From rusty at rustcorp.com.au Mon Nov 26 03:27:59 2018 From: rusty at rustcorp.com.au (Rusty Russell) Date: Mon, 26 Nov 2018 13:57:59 +1030 Subject: [Lightning-dev] lookupinvoice In-Reply-To: References: Message-ID: <87y39g7c1s.fsf@rustcorp.com.au> Sarat G writes: > Hi, > > I'm been working on the LN repo for a while now. I would like to know if > there is any way that a payee can lookup the invoice it gets paid, i.e > similar to the 'lookupinvoice' command as provided by the lnd(Golang). Hi Sarat, I'm confused; "the LN repo" is ambigious, as there are several, each with their own places to ask questions: https://github.com/ACINQ/eclair-wallet/ https://github.com/ElementsProject/lightning https://github.com/LightningNetwork/lnd/ https://github.com/nayutaco/ptarmigan https://github.com/rust-bitcoin/rust-lightning Then of course there's the spec repo as well, which guides us all: https://github.com/lightningnetwork/lightning-rfc But AFAICT (though your question is off-topic for this list): lnd has lookupinvoice which looks up by hash[1] eclair has checkpayment which looks up by hash or bolt11[2] c-lightning has listinvoices which can lookup by label[3], or wait(any)invoice[4] which is used for polling. Would love someone to write a rosetta stone for the different APIs! Cheers, Rusty. [1] https://api.lightning.community/#lookupinvoice [2] https://github.com/ACINQ/eclair/wiki/API [3] https://github.com/ElementsProject/lightning/blob/master/doc/lightning-listinvoices.7.txt [4] https://github.com/ElementsProject/lightning/blob/master/doc/lightning-waitanyinvoice.7.txt