Files
palladum-lightning/tests/plugins/fakebip353.py
Rusty Russell 6799dbe656 xpay: add option to pay bip353.
Changelog-Added: JSON-RPC: `xpay` can now directly pay a BIP353 address, like `₿rusty@rustcorp.com.au`.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-08-18 14:57:46 +09:30

22 lines
370 B
Python
Executable File

#!/usr/bin/env python3
"""
This imitates fetchbip353 for testing.
"""
from pyln.client import Plugin
plugin = Plugin()
@plugin.method("fetchbip353")
def fetchbip353(plugin, address, **kwargs):
return {'instructions': [{'offer': plugin.options['bip353offer']['value']}]}
plugin.add_option(
'bip353offer',
None,
"Fake offer to return"
)
plugin.run()