---
# System prepended metadata

title: Fedimint with cln integration

---

# Fedimint with cln integration

- Fedimint need to be able to pay a lightning invoice from a node that it is paying itlsef.
    - (vincenzopalazzo): So core lightning is not able to pay itself, I should look into it


## From the core lightnign dev call 29-05-2023

- Include the self payment inside the pay invoice is a little bit difficult;
- we start simple by implementing the a new RPC method that resolve the payment;
    - then we try to integrate it inside the `pay` command
- From lnd that implement it with a separate method https://lightning.engineering/api-docs/api/lnd/invoices/settle-invoice


## Implementation 

- https://github.com/vincenzopalazzo/lightning/tree/macros/pay-self-invoice
- fedimint PR https://github.com/fedimint/fedimint/pull/2960


## Change required

- update cln to the last tagged version
- update cln dependencies in fedimint gateway
- update fedimint cln API usage
- CI is still failing and I am debugging the issue on my computer!
    - Any idea? cln looks like ok, maybe it is a little bit slower but this should not be a big deal, right?