mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-07-25 22:13:12 +00:00
Waku v2: Update docs and API with current state (#110)
* Waku v2: Update docs and API with current state - Publish and subscribe implemented - Three protocol split * Update docs/api/v2/node.md Co-authored-by: Kim De Mey <kim.demey@gmail.com> * Update waku/node/v2/wakunode2.nim Co-authored-by: Kim De Mey <kim.demey@gmail.com> Co-authored-by: Kim De Mey <kim.demey@gmail.com>
This commit is contained in:
co-authored by
Kim De Mey
parent
e875dfd1d7
commit
bab0e12d68
@@ -33,30 +33,3 @@ proc runBackground(conf: WakuNodeConf) {.async.} =
|
||||
discard runBackground(conf)
|
||||
|
||||
runForever()
|
||||
|
||||
# TODO Lets start with Nim Node API first
|
||||
|
||||
# To do more operations on this node, we can do this in two ways:
|
||||
# - We can use the Nim Node API, which is currently not exposed
|
||||
# - We can use JSON RPC
|
||||
|
||||
# TODO Subscribe and publish to topic via Node API
|
||||
# Requires https://github.com/status-im/nim-waku/issues/53
|
||||
|
||||
# Here's how to do it with JSON RPC
|
||||
|
||||
# Get RPC call signatures in Nim
|
||||
#from strutils import rsplit
|
||||
#template sourceDir: string = currentSourcePath.parentDir().parentDir().rsplit(DirSep, 1)[0]
|
||||
#const sigWakuPath = sourceDir / "waku" / "node" / "v2" / "rpc" / "wakucallsigs.nim"
|
||||
|
||||
#createRpcSigs(RpcHttpClient, sigWakuPath)
|
||||
|
||||
# Create RPC Client and connect to it
|
||||
#var node = newRpcHttpClient()
|
||||
#waitfor node.connect("localhost", Port(8547))
|
||||
|
||||
# TODO Do something with res
|
||||
#var res = waitFor node.wakuSubscribe("apptopic")
|
||||
|
||||
# TODO Use publish as well
|
||||
|
||||
Reference in New Issue
Block a user