Bitcoin Forum
November 13, 2024, 04:00:05 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Receiving and sending lightning payments from the command line  (Read 73 times)
SlackBitcoiner (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
June 19, 2023, 09:33:03 PM
 #1

How can one send and receive lightning payments using electrum in the command line?  There is lots of documentation for using lightning via the GUI, but I could not find any for the command line.

```
electrum payto lnurl1dp68gurn8ghj7cn5vdcxz7fwvfkxge3w0puh5t6z23pj742ff38925jv9acxz7f0dyhnymmwv e6kx5zg2e4nsurft958xnzpxanhzag3qne3r 0.000093
# invalid bitcoin address: lnurl1dp68gurn8ghj7cn5vdcxz7fwvfkxge3w0puh5t6z23pj742ff38925jv9acxz7f0dyhnymmwv e6kx5zg2e4nsurft958xnzpxanhzag3qne3r
```

The closest I have found is 'lnpay' which takes no amount as an argument.
BitMaxz
Legendary
*
Offline Offline

Activity: 3430
Merit: 3172


Playbet.io - Crypto Casino and Sportsbook


View Profile WWW
July 04, 2023, 07:54:45 PM
Merited by ABCbits (1)
 #2

I tried to read the command.py on Github and yeah lnpay is the only closes command that works like payto command in on-chain.

Have you recently tried that command?
If you get some error and use the same format you provided above as sample would you mind to change the amount in sats? I just got the idea from command.py.

Code:
electrum lnpay lnurl1dp68gurn8ghj7cn5vdcxz7fwvfkxge3w0puh5t6z23pj742ff38925jv9acxz7f0dyhnymmwv e6kx5zg2e4nsurft958xnzpxanhzag3qne3r 9300

███████████████
█████████████████████
██████▄▄███████████████
██████▐████▄▄████████████
██████▐██▀▀▀██▄▄█████████
████████▌█████▀██▄▄██████
██████████████████▌█████
█████████████▀▄██▀▀██████
██████▐██▄▄█▌███████████
██████▐████▀█████████████
██████▀▀███████████████
█████████████████████
███████████████

.... ..Playbet.io..Casino & Sportsbook.....Grab up to  BTC + 800 Free Spins........
████████████████████████████████████████
██████████████████████████████████████████████
██████▄▄████████████████████████████████████████
██████▐████▄▄█████████████████████████████████████
██████▐██▀▀▀██▄▄██████████████████████████████████
████████▌█████▀██▄▄█████▄███▄███▄███▄█████████████
██████████████████▌████▀░░██▌██▄▄▄██████████████
█████████████▀▄██▀▀█████▄░░██▌██▄░░▄▄████▄███████
██████▐██▄▄█▌██████████▀███▀███▀███▀███▀█████████
██████▐████▀██████████████████████████████████████
██████▀▀████████████████████████████████████████
██████████████████████████████████████████████
████████████████████████████████████████
nc50lc
Legendary
*
Offline Offline

Activity: 2590
Merit: 6389


Self-proclaimed Genius


View Profile
July 05, 2023, 05:46:27 AM
 #3

-snip-
Unfortunately, as OP mentioned, lnpay currently doesn't take an amount arg.
As you can see in commands.py->line1138, it only takes an "invoice" arg so the recipient has to add a 'requested amount' to his invoice for it to work in lnpay.

The "amount" in line 1115 that you've linked is under the command open_channel.


@SlackBitcoiner
Is trivial to add that feature so if you really need it, I'd suggest you to open a new "feature request" issue in GitHub.
Developers may find it necessary since the implementation of no-amount invoice made the command unusable in this kind of scenario.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!