Enhance wrap of wakuDefaultPubsubTopic function

This commit is contained in:
Ivan Folgueira Bande 2024-01-13 20:11:09 +01:00
parent c6116d74b8
commit 76519c2651
No known key found for this signature in database
GPG Key ID: 3C117481F89E24A7
2 changed files with 3 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "nodejs-waku",
"version": "0.1.11",
"version": "0.1.12",
"description": "NodeJs wrapper of a Waku node",
"main": "waku.js",
"scripts": {

View File

@ -9,11 +9,8 @@ exports.wakuVersion = function() {
wakuMod.wakuVersion(function(msg){ console.log("Waku Version: " + msg) })
}
exports.wakuDefaultPubsubTopic = function() {
// Example on how to retrieve a value from the waku library
var defaultPubsubTopic = ""
wakuMod.wakuDefaultPubsubTopic(function(msg){ defaultPubsubTopic = msg })
console.log("Default pubsub topic: " + defaultPubsubTopic)
exports.wakuDefaultPubsubTopic = function(defaultPubsubTopicHandler) {
wakuMod.wakuDefaultPubsubTopic(defaultPubsubTopicHandler)
}
exports.wakuSetEventCallback = function(eventHandler) {