Bitcoin Forum
May 03, 2024, 10:24:14 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Get funding transaction pointer from C-Lightning Node  (Read 84 times)
simpleSliv3r (OP)
Jr. Member
*
Offline Offline

Activity: 46
Merit: 28


View Profile
April 09, 2023, 04:45:16 PM
 #1

Hi all,

I'm trying to get the funding transaction id from a lightning network channel using a C-Lightning Node.
While in LND it's easy to do it as "listchannels" command returns you all the information needed, I cannot see any way to do it in a C-Lighting Node.


LND:

Code:
lnd@alice:/$ lncli listchannels
{
    "channels": [
        {
            "active": true,
            "remote_pubkey": "022a2dba6a75a2b79ac5af55781d3e90709b3369da652a35c527ac32b16f424422",
            "channel_point": "d4792176757a8cba7b403584e8b247c076318a6543a725c4faa63dcdb75fe998:0",
            "chan_id": "118747255865344",
            "capacity": "250000",
            "local_balance": "0",
            "remote_balance": "249817",
     .......


C-Lighting:

Code:
clightning@bob:/$ lightning-cli listchannels
{
   "channels": [
      {
         "source": "022a2dba6a75a2b79ac5af55781d3e90709b3369da652a35c527ac32b16f424422",
         "destination": "0369e70480f6437cb2d36fadd0acabad272d161fd38b20e5663a54efdb4fe164d4",
         "short_channel_id": "108x1x0",
         "public": true,
         "satoshis": 250000,
         "amount_msat": "250000000msat",
         "message_flags": 1,
         "channel_flags": 0,
         "active": true,
         "last_update": 1681057970,
         "base_fee_millisatoshi": 1,
         "fee_per_millionth": 10,
         "delay": 6,
         "htlc_minimum_msat": "1msat",
         "htlc_maximum_msat": "247500000msat",
         "features": ""
      },
      {
         "source": "0369e70480f6437cb2d36fadd0acabad272d161fd38b20e5663a54efdb4fe164d4",
         "destination": "022a2dba6a75a2b79ac5af55781d3e90709b3369da652a35c527ac32b16f424422",
         "short_channel_id": "108x1x0",
         "public": true,
         "satoshis": 250000,
         "amount_msat": "250000000msat",
         "message_flags": 1,
         "channel_flags": 1,
         "active": true,
         "last_update": 1681057974,
         "base_fee_millisatoshi": 1000,
         "fee_per_millionth": 1,
         "delay": 40,
         "htlc_minimum_msat": "1000msat",
         "htlc_maximum_msat": "250000000msat",
         "features": ""
      }
   ]
}

In summary I'm looking how to get the "channel_point" value from the LND output but from C-Lightning Node.


Thanks all in advance!


Best Regards,
SS
1714775054
Hero Member
*
Offline Offline

Posts: 1714775054

View Profile Personal Message (Offline)

Ignore
1714775054
Reply with quote  #2

1714775054
Report to moderator
1714775054
Hero Member
*
Offline Offline

Posts: 1714775054

View Profile Personal Message (Offline)

Ignore
1714775054
Reply with quote  #2

1714775054
Report to moderator
1714775054
Hero Member
*
Offline Offline

Posts: 1714775054

View Profile Personal Message (Offline)

Ignore
1714775054
Reply with quote  #2

1714775054
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714775054
Hero Member
*
Offline Offline

Posts: 1714775054

View Profile Personal Message (Offline)

Ignore
1714775054
Reply with quote  #2

1714775054
Report to moderator
1714775054
Hero Member
*
Offline Offline

Posts: 1714775054

View Profile Personal Message (Offline)

Ignore
1714775054
Reply with quote  #2

1714775054
Report to moderator
HeRetiK
Legendary
*
Offline Offline

Activity: 2926
Merit: 2091


Cashback 15%


View Profile
April 10, 2023, 08:39:29 AM
 #2

I think you might be looking for listtransactions:
https://lightning.readthedocs.io/lightning-listtransactions.7.html

While this will list all on-chain transactions, this will also return the associated channel ids, where applicable (in the case of funding transactions, as part of the outputs).


It looks like you'll have to enable experimental features first though:
https://lightning.readthedocs.io/lightningd-config.5.html

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
simpleSliv3r (OP)
Jr. Member
*
Offline Offline

Activity: 46
Merit: 28


View Profile
April 10, 2023, 11:05:09 AM
 #3

I think you might be looking for listtransactions:
https://lightning.readthedocs.io/lightning-listtransactions.7.html

While this will list all on-chain transactions, this will also return the associated channel ids, where applicable (in the case of funding transactions, as part of the outputs).


It looks like you'll have to enable experimental features first though:
https://lightning.readthedocs.io/lightningd-config.5.html

Hi HeRetik,

Thanks for your answer, I think that would work.

Anyway, I found another option; "listpeers" returns a json with all peers information including the channels with each peer and the funding transaction id.
https://lightning.readthedocs.io/lightning-listpeers.7.html#lightning-listpeers-command-returning-data-on-connected-lightning-nodes
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!