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>
22 lines
370 B
Python
Executable File
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()
|