Catbuffer library defines the protocol to serialize and deserialize Catapult entities. SDKs and applications use the generated code to interact with REST transaction endpoint.
- C++
- Python >= 3.4
- pip install -r requirements.txt
python main.py [OPTIONS]
Option | Description | Default |
---|---|---|
-s, --schema TEXT | input CATS file | |
-o, --output TEXT | output directory | _generated |
-i, --include TEXT | schema root directory | ./schemas |
-g, --generator TEXT | generator to use to produce output files | |
-c, --copyright TEXT | file containing copyright data to use with output files | ../HEADER.inc |
The schemas define the entities data structure. The library generates the leanest code necessary to serialize and deserialize defined entities.
For example, run the following command to generate C++ transaction builders for a transfer transaction:
python main.py --schema schemas/transfer/transfer.cats --generator cpp_builder
The generator creates a new file under _generated/cpp_builder
folder.
pylint --load-plugins pylint_quotes main.py catparser generators test
pycodestyle --config=.pycodestyle .
python -m unittest discover -v
Copyright (c) 2018 Jaguar0625, gimre, BloodyRookie, Tech Bureau, Corp Licensed under the MIT License