New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

msgproto

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

msgproto

message protocols

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

ipfs-msgproto

This is a node module to make writing wire protocol stacks on top of streams easier. In particular, it's very helpful when your protocol layers manipulate those above (e.g. en/decryption). The way it works is that the user defines

  • a Message type that inherits from message-protocol's Message
  • a Protocol (duplex stream) for writing and reading message objects
  • a codec: json, protobuf message, or capnp struct (optional)
  • any special actions particular to the protocol (optional)

And this modules takes care of en/decoding, en/decapsulating, etc. BTW, it's recommended to use protobufs or capnp codecs for encoding/decoding to the wire. Though, at the very least, msgproto payloads are protobuf encoded, so you'll get smart wire scanning.

Install

npm install msgproto

Examples

Check out these shim protocols:

  • ipfs-msgproto-integrity - multihash checksums
  • ipfs-msgproto-network - to/from addressing
  • ipfs-msgproto-nonce - guard against replay attacks
  • ipfs-msgproto-crypto - encrypted shim protocol

And then see this sample protocol:

Keywords

message

FAQs

Package last updated on 29 Jun 2014

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