#validation #generated #byte #protobuf #define #penumbra #traits

penumbra-sdk-proto

Bindings and extension traits for Penumbra protobufs

16 releases (2 stable)

new 1.0.1 Jan 29, 2025
1.0.0 Jan 21, 2025
0.82.0-alpha.15 Jan 15, 2025
0.82.0-alpha.0 Dec 26, 2024

#1614 in Encoding

Download history 119/week @ 2024-12-23 58/week @ 2024-12-30 1028/week @ 2025-01-06 532/week @ 2025-01-13 492/week @ 2025-01-20 208/week @ 2025-01-27

2,265 downloads per month
Used in 32 crates (27 directly)

MIT/Apache

4.5MB
97K SLoC

Protobuf definitions for Penumbra.

This crate only contains the .proto files and the Rust types generated from them. These types only handle parsing the wire format; validation should be performed by converting them into an appropriate domain type, as in the following diagram:

┌───────┐          ┌──────────────┐               ┌──────────────┐
│encoded│ protobuf │penumbra_sdk_proto│ TryFrom/Into  │ domain types │
│ bytes │<──wire ─>│    types     │<─validation ─>(other crates)│
└───────┘  format  └──────────────┘   boundary    └──────────────┘

The DomainType marker trait can be implemented on a domain type to ensure these conversions exist.

Dependencies

~29–50MB
~1M SLoC