diff --git a/src/messages/index.ts b/src/messages/index.ts index 425d71c..2419d1c 100644 --- a/src/messages/index.ts +++ b/src/messages/index.ts @@ -1,9 +1,24 @@ import { P2PMessageHandler } from "#types.js"; import handshakeOpen from "#messages/handshakeOpen.js"; +import { + protocolMethodHandshakeOpen, + protocolMethodRegistryQuery, + protocolMethodSignedMessage, + recordTypeRegistryEntry, + recordTypeStorageLocation, +} from "#constants.js"; +import registryQuery from "#messages/registryQuery.js"; +import registryEntry from "#messages/registryEntry.js"; +import storageLocation from "#messages/storageLocation.js"; +import signedMessage from "#messages/signedMessage.js"; const messages = new Map( Object.entries({ - protocolMethodHandshakeOpen: handshakeOpen, + [protocolMethodHandshakeOpen]: handshakeOpen, + [protocolMethodRegistryQuery]: registryQuery, + [recordTypeRegistryEntry]: registryEntry, + [recordTypeStorageLocation]: storageLocation, + [protocolMethodSignedMessage]: signedMessage, }).map(([key, value]) => [Number(key), value]), ); diff --git a/src/messages/signedMessages/index.ts b/src/messages/signedMessages/index.ts index e3a60fc..660da7b 100644 --- a/src/messages/signedMessages/index.ts +++ b/src/messages/signedMessages/index.ts @@ -1,9 +1,15 @@ import { P2PSignedMessageHandler } from "#types.js"; import handshakeDone from "#messages/signedMessages/handshakeDone.js"; +import { + protocolMethodAnnouncePeers, + protocolMethodHandshakeDone, +} from "#constants.js"; +import announcePeers from "#messages/signedMessages/announcePeers.js"; const messages = new Map( Object.entries({ - protocolMethodHandshakeOpen: handshakeDone, + [protocolMethodHandshakeDone]: handshakeDone, + [protocolMethodAnnouncePeers]: announcePeers, }).map(([key, value]) => [Number(key), value]), );