Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Nano Protocol Specification

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.

Generate code

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.

Generate diagrams

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

Protocol diagram

Alt text