There's a clear pattern in all the functions in nwaku.go which call libwaku functions.
We should encapsulate the shared logic in a function so we avoid duplicated code.
Attached are a couple examples of how the refactored version could look like
example_1.txt
example_2.txt