mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-01 03:24:41 +01:00
5f437de771
We should be able to pass UTF-8 strings to and from plugins without python turning them into JSON-\u escapes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
15 lines
191 B
Python
Executable File
15 lines
191 B
Python
Executable File
#!/usr/bin/env python3
|
|
from lightning import Plugin
|
|
|
|
|
|
plugin = Plugin()
|
|
|
|
|
|
@plugin.method("utf8")
|
|
def echo(plugin, utf8):
|
|
assert '\\u' not in utf8
|
|
return {'utf8': utf8}
|
|
|
|
|
|
plugin.run()
|