Crate penumbra_proto

source ·
Expand description

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_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.

Re-exports§

Modules§

  • box_grpc_svcbox-grpc
  • Helper trait for using Protobuf messages as ABCI events.
  • Helper methods used for shaping the JSON (and other Serde) formats derived from the protos. TODO: Extract the Bech32 prefixes into a module at the root of the crate, and then remove this module entirely. We don’t want to be custom-shaping serde formats, we want to have those match protobuf JSON exactly.
  • statecnidarium

Constants§

Traits§

  • A marker type that captures the relationships between a domain type (Self) and a protobuf type (Self::Proto).
  • A Protocol Buffers message.
  • Associate a type name with a Message type.

Derive Macros§