New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@among-js/packets

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@among-js/packets

Among JS packet parsing and serialization

  • 0.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Packets | Among JS

Rich Among Us packet parsing and serialization with a programmer-friendly API. This is part of Among JS, a simple and flexible library for interacting with the Among Us protocol.

This library was designed with extreme simplicity in mind. For most use cases, the only functions you'll need are parsePayloads and generatePayloads, both of which can be imported directly. As you may be able to guess, the former parses a buffer into a rich manipulatable structure, and the latter does the opposite.

This is meant to be used with a library like @among-js/hazel to strip packet headers, and bytebuffer for manipulating buffers.

Basic Concepts

The base of the Among Us protocol is a list of "payloads." Each payload has a type, like game data or join game, and some payloads have inner payloads.

For example, say you have a payload of type game data. This has an array of parts, each one being an inner payload. One part might be of type RPC, which has further instructions inside. Etcetera.

For more technical information on the protocol you may be interested in reading the protocol wiki.

Game Codes

You may notice that game codes are stored as numbers. This is how Among Us internally stores them and allows for much better normalization.

Specifically, version 2 (6 character) codes are represented as large negative numbers which is generated through a complex algorithm that is out of the scope of this specific package. To convert a v2 code into something this package can understand use the v2CodeToNumber function which is exported from @among-us/util.

For more in-depth information, read this wiki page.

FAQs

Package last updated on 03 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc