diff --git a/examples/bot_echo.nim b/examples/bot_echo.nim index fa59987..0e78481 100644 --- a/examples/bot_echo.nim +++ b/examples/bot_echo.nim @@ -7,10 +7,9 @@ import chat import content_types proc main() {.async.} = - - let dsConfig = DefaultConfig() + let waku = initWakuClient(DefaultConfig()) let ident = createIdentity("EchoBot") - var chatClient = newClient(dsConfig, ident) + var chatClient = newClient(waku, ident) chatClient.onNewMessage(proc(convo: Conversation, msg: ReceivedMessage) {.async.} = info "New Message: ", convoId = convo.id(), msg= msg diff --git a/examples/pingpong.nim b/examples/pingpong.nim index 83a457a..8f07f19 100644 --- a/examples/pingpong.nim +++ b/examples/pingpong.nim @@ -25,17 +25,15 @@ proc fromBytes(bytes: seq[byte]): ContentFrame = proc main() {.async.} = # Create Configurations - var cfg_saro = DefaultConfig() - var cfg_raya = DefaultConfig() + var waku_saro = initWakuClient(DefaultConfig()) + var waku_raya = initWakuClient(DefaultConfig()) let sKey = loadPrivateKeyFromBytes(@[45u8, 216, 160, 24, 19, 207, 193, 214, 98, 92, 153, 145, 222, 247, 101, 99, 96, 131, 149, 185, 33, 187, 229, 251, 100, 158, 20, 131, 111, 97, 181, 210]).get() let rKey = loadPrivateKeyFromBytes(@[43u8, 12, 160, 51, 212, 90, 199, 160, 154, 164, 129, 229, 147, 69, 151, 17, 239, 51, 190, 33, 86, 164, 50, 105, 39, 250, 182, 116, 138, 132, 114, 234]).get() - let sIdent = Identity(name: "saro", privateKey: sKey) - # Create Clients - var saro = newClient(cfg_saro, sIdent) - var raya = newClient(cfg_raya, Identity(name: "raya", privateKey: rKey)) + var saro = newClient(waku_saro, Identity(name: "saro", privateKey: sKey)) + var raya = newClient(waku_raya, Identity(name: "raya", privateKey: rKey)) var ri = 0 # Wire Callbacks