Crates.io | tycho-common |
lib.rs | tycho-common |
version | 0.82.0 |
created_at | 2025-03-27 10:02:00.600611+00 |
updated_at | 2025-08-26 11:36:08.963485+00 |
description | Contains shared models, traits and helpers used within the Tycho system |
homepage | https://www.propellerheads.xyz/tycho |
repository | https://github.com/propeller-heads/tycho-indexer |
max_upload_size | |
id | 1607782 |
size | 303,742 |
This tycho-common crate defines all core models used across the various Tycho services. This crate encapsulates the core models only, separate from the database storage models, which are located in the tycho-storage crate.
The core models in this crate are grouped based on their use case:
The internal models are located in the models module. These structs capture the detailed, low-level data structures that underpin the internal logic of Tycho services. They are designed to be highly granular to support the complex operations within Tycho.
The message models, also known as DTOs, are found in dto.rs. These structs serve to serialise and deserialise messages between server and client. Unlike internal models, DTOs are intentionally kept simple, focusing solely on data representation without embedding business logic.
Most fields within the message models are encoded using hex bytes. Some useful tools for serialising and deserialising structs containing hex bytes are provided in serde_primitives.
Note: while encoding specifics may vary depending on the protocol, integers are generally encoded in big-endian format.