diff --git a/waku/node/v2/rpc/wakurpc.nim b/waku/node/v2/rpc/wakurpc.nim index 9caa538bf..fd1ba46f5 100644 --- a/waku/node/v2/rpc/wakurpc.nim +++ b/waku/node/v2/rpc/wakurpc.nim @@ -5,7 +5,8 @@ import # ../../../protocol/v1/waku_protocol, ../../../protocol/v2/waku_protocol, nimcrypto/[sysrand, hmac, sha2, pbkdf2], - ../../v1/rpc/[rpc_types, hexstrings, key_storage] + ../../v1/rpc/[rpc_types, hexstrings, key_storage], + ../waku_types from stew/byteutils import hexToSeqByte, hexToByteArray diff --git a/waku/node/v2/waku_types.nim b/waku/node/v2/waku_types.nim new file mode 100644 index 000000000..a52100c24 --- /dev/null +++ b/waku/node/v2/waku_types.nim @@ -0,0 +1,11 @@ +import libp2p/multiaddress, + libp2p/crypto/crypto, + libp2p/protocols/protocol, + libp2p/peerinfo, + ../../tests/v2/standard_setup + +type WakuProto* = ref object of LPProtocol + switch*: Switch + conn*: Connection + connected*: bool + started*: bool diff --git a/waku/node/v2/wakunode.nim b/waku/node/v2/wakunode.nim index d6cfc0e17..44479e87c 100644 --- a/waku/node/v2/wakunode.nim +++ b/waku/node/v2/wakunode.nim @@ -12,10 +12,8 @@ import rpc/wakurpc, ../../protocol/v2/waku_protocol, # TODO: Pull out standard switch from tests - ../../tests/v2/standard_setup - - # TODO: Use - # protocol/waku_protocol + ../../tests/v2/standard_setup, + waku_types # key and crypto modules different type @@ -23,13 +21,6 @@ type PublicKey* = crypto.PublicKey PrivateKey* = crypto.PrivateKey - # handler defined in parent object -type WakuProto = ref object of LPProtocol - switch: Switch - conn: Connection - connected: bool - started: bool - const clientId = "Nimbus waku node" let globalListeningAddr = parseIpAddress("0.0.0.0")