blob: 06a9b3b80ae341a549a1a0f9cf9012f890f9a73e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
module ToxData where
import Crypto
-- data DHTPacketKind = Ping | Pong | GetNodes | SendNodes
data DHTPacket a = DHTPacket
{ dhtSender :: PublicKey
, dhtEncrypted :: WithNonce24 (Encrypted (WithNonce8 a))
}
data WithNonce8 a = WithNonce8 a Nonce8
data WithNonce24 a = WithNonce24 a Nonce24
data AliasedRequest a = AliasedRequest
{ alias :: PublicKey
, aliasPayload :: WithNonce24 (Encrypted (WithNonce8 a))
}
data ForwardedRequest a = ForwardedRequest
{ forwardTo :: PublicKey
, forwarded :: AliasedRequest a
}
|