mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-09 01:13:08 +00:00
Move out WakuProto to waku_types
This commit is contained in:
parent
2acacaa058
commit
a769bcdd2c
@ -5,7 +5,8 @@ import
|
|||||||
# ../../../protocol/v1/waku_protocol,
|
# ../../../protocol/v1/waku_protocol,
|
||||||
../../../protocol/v2/waku_protocol,
|
../../../protocol/v2/waku_protocol,
|
||||||
nimcrypto/[sysrand, hmac, sha2, pbkdf2],
|
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
|
from stew/byteutils import hexToSeqByte, hexToByteArray
|
||||||
|
|
||||||
|
|||||||
11
waku/node/v2/waku_types.nim
Normal file
11
waku/node/v2/waku_types.nim
Normal file
@ -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
|
||||||
@ -12,10 +12,8 @@ import
|
|||||||
rpc/wakurpc,
|
rpc/wakurpc,
|
||||||
../../protocol/v2/waku_protocol,
|
../../protocol/v2/waku_protocol,
|
||||||
# TODO: Pull out standard switch from tests
|
# TODO: Pull out standard switch from tests
|
||||||
../../tests/v2/standard_setup
|
../../tests/v2/standard_setup,
|
||||||
|
waku_types
|
||||||
# TODO: Use
|
|
||||||
# protocol/waku_protocol
|
|
||||||
|
|
||||||
# key and crypto modules different
|
# key and crypto modules different
|
||||||
type
|
type
|
||||||
@ -23,13 +21,6 @@ type
|
|||||||
PublicKey* = crypto.PublicKey
|
PublicKey* = crypto.PublicKey
|
||||||
PrivateKey* = crypto.PrivateKey
|
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"
|
const clientId = "Nimbus waku node"
|
||||||
|
|
||||||
let globalListeningAddr = parseIpAddress("0.0.0.0")
|
let globalListeningAddr = parseIpAddress("0.0.0.0")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user