Socket
Book a DemoInstallSign in
Socket

hashrpc

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hashrpc

Hashrpc is a very simple stream protocol for hash based messages.

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

hashrpc

Hashrpc is a very simple stream protocol for hash based messages.

There are only three message types.

  • get block
  • send block
  • control

All messages, including control messages, are hash addressed.

All hash addresses are CIDs.

Protocol

Single byte Uint8 for each message type:

  • get block 1
  • send block 2
  • control 3

This specification does not define what a control message is or how it is used, that's up to the application. Nor does this specification define any size limitation on blocks, a "block" could be an entire CAR file reqested by its CID (once we have a spec for CAR CIDs).

All message types are bi-directional, any node can send any message type at any time.

get block

[ 1, length, CID ]

send block

[ 2, CIDLength, blockLength, CID, block ]

control

[ 3, CIDLength, blockLength, CID, block ]

FAQs

Package last updated on 11 Mar 2022

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