MCPcopy Create free account
hub / github.com/ElementsProject/lightning / hello

Function hello

contrib/plugins/helloworld.py:9–19  ·  view source on GitHub ↗

This is the documentation string for the hello-function. It gets reported as the description when registering the function as a method with `lightningd`.

(plugin, name="world")

Source from the content-addressed store, hash-verified

7
8@plugin.method("hello")
9def hello(plugin, name="world"):
10 """This is the documentation string for the hello-function.
11
12 It gets reported as the description when registering the function
13 as a method with `lightningd`.
14
15 """
16 greeting = plugin.get_option('greeting')
17 s = '{} {}'.format(greeting, name)
18 plugin.log(s)
19 return s
20
21
22@plugin.method("bye")

Callers

nothing calls this directly

Calls 2

get_optionMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected