npl-broker
is a core library that can be easily integrated into your HotPocket (d)app. It serves as an intermediary module to manage the messages sent and received in the NPL stream. This ensures that HotPocket (d)apps and its dependencies, which utilize NPL, can effectively transport data within a standardized format.
npl-broker
provides additional features for sub-consensus messaging via the NPL stream that HotPocket doesn't provide out-of-the-box, such as:
- Tagged NPL messages
- Live NPL stream (The default approach to sub-consensus messaging is opt-able)
- Chunk transfer for large content transfers
- Content integrity verification
npm install npl-broker
The /test
directory includes general HP dApps that showcases NPLBroker
. Running this will result in a unit test:
sudo npm test