This directory hosts a formal specification of the Nano network protocol.
The specification is written in Kaitai, from which parsers and diagrams can be generated.
The following example generate parsers for C++ and Javascript:
kaitai-struct-compiler protocol.ksy --outdir output/cpp -t cpp_stl
kaitai-struct-compiler protocol.ksy --outdir output/js -t javascript
See kaitai-struct-compiler --help for the full list of supported programming languages.
Run the following commands to generate a PNG diagram:
kaitai-struct-compiler protocol.ksy --outdir diagram -t graphviz
dot diagram/nano.dot -v -Tpng -o diagram/nano.png
