@skeldjs/protocol
TypeScript icon, indicating that this package has built-in type declarations

2.15.49 • Public • Published

@skeldjs/protocol

This package contains important information about the Among Us network protocol, as well as tools to deserialise and serialise packets. While you can install it on its own with npm install --save @skeldjs/protocol or yarn add @skeldjs/protocol, it is one package of a bigger project, skeldjs.

You can view auto-updating documentation for this package hosted at github pages at https://skeld.js.org/modules/protocol.html

You can also view more detailed information about the protocol at https://github.com/codyphobe/among-us-protocol

Basic Usage

It's recommended to keep a constant stream of packets going through the decoder, rather than picking out or sending one or two.

Parsing a packet in-place using the parse method is discouraged, as it does not provide sufficient intellisense for the messages.

Listen for a join game packet going through the decoder.

const decoder = new PacketDecoder;

decoder.on(JoinedGameMessage, message => {
    console.log("Joined game", Int2Code(message.code) + "!");
});

const buffer = Buffer.from("0100020d0007a7317c8801000000010000000006000aa7317c880100", "hex");
decoder.write(buffer); // Joined game PKMKNP!

Readme

Keywords

none

Package Sidebar

Install

npm i @skeldjs/protocol

Weekly Downloads

0

Version

2.15.49

License

GPL-3.0-only

Unpacked Size

390 kB

Total Files

394

Last publish

Collaborators

  • topsno