1
0

add lnurl-pay and lightning address support

* bundles all payment identifiers into handle_payment_identifier
* adds lnurl decoding
* adds lightning address decoding
This commit is contained in:
bitromortac
2021-11-23 14:42:43 +01:00
committed by SomberNight
parent 2511d8118c
commit fe2fbbd9b1
9 changed files with 221 additions and 39 deletions

View File

@@ -98,7 +98,7 @@ from electrum.wallet_db import WalletDB
from electrum.wallet import Wallet
from electrum.storage import WalletStorage
from electrum.util import print_msg, print_stderr, json_encode, json_decode, UserCancelled
from electrum.util import InvalidPassword, BITCOIN_BIP21_URI_SCHEME, LIGHTNING_URI_SCHEME
from electrum.util import InvalidPassword
from electrum.commands import get_parser, known_commands, Commands, config_variables
from electrum import daemon
from electrum import keystore
@@ -362,10 +362,7 @@ def main():
# check uri
uri = config_options.get('url')
if uri and not (
uri.lower().startswith(BITCOIN_BIP21_URI_SCHEME + ':') or
uri.lower().startswith(LIGHTNING_URI_SCHEME + ':')
):
if uri and not util.is_uri(uri):
print_stderr('unknown command:', uri)
sys.exit(1)