mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
14 lines
299 B
Python
14 lines
299 B
Python
|
#!/usr/bin/env python3
|
||
|
from pyln.client import Plugin
|
||
|
|
||
|
plugin = Plugin(custom_msgs=[43690])
|
||
|
|
||
|
|
||
|
@plugin.hook('custommsg')
|
||
|
def on_custommsg(peer_id, payload, plugin, message=None, **kwargs):
|
||
|
plugin.log("Got message {}".format(int(payload[:4], 16)))
|
||
|
return {'result': 'continue'}
|
||
|
|
||
|
|
||
|
plugin.run()
|