Skip to main content

miden_objects/
lib.rs

1#![no_std]
2
3extern crate alloc;
4
5pub mod conversion;
6pub mod error;
7
8pub use error::{ConversionError, ConversionResultExt};
9pub use prost;
10
11/// Generated canonical Protobuf messages.
12pub mod proto {
13    pub mod account {
14        include!(concat!(env!("OUT_DIR"), "/account.rs"));
15    }
16
17    pub mod asset {
18        include!(concat!(env!("OUT_DIR"), "/asset.rs"));
19    }
20
21    pub mod blockchain {
22        include!(concat!(env!("OUT_DIR"), "/blockchain.rs"));
23    }
24
25    pub mod note {
26        include!(concat!(env!("OUT_DIR"), "/note.rs"));
27    }
28
29    pub mod primitives {
30        include!(concat!(env!("OUT_DIR"), "/primitives.rs"));
31    }
32
33    pub mod protocol_config {
34        include!(concat!(env!("OUT_DIR"), "/protocol_config.rs"));
35    }
36
37    pub mod transaction {
38        include!(concat!(env!("OUT_DIR"), "/transaction.rs"));
39    }
40}
41
42/// Self-contained descriptor set for the canonical object schemas.
43pub const FILE_DESCRIPTOR_SET: &[u8] =
44    include_bytes!(concat!(env!("OUT_DIR"), "/miden_objects_descriptor.bin"));
45
46/// Protobuf paths and their canonical generated Rust paths.
47///
48/// Service-binding build scripts should configure these as Prost external paths so that messages
49/// imported from this descriptor are represented by this crate's generated Rust types.
50pub const EXTERN_PATHS: &[(&str, &str)] = &[
51    (".account", "::miden_objects::proto::account"),
52    (".asset", "::miden_objects::proto::asset"),
53    (".blockchain", "::miden_objects::proto::blockchain"),
54    (".note", "::miden_objects::proto::note"),
55    (".primitives", "::miden_objects::proto::primitives"),
56    (".protocol_config", "::miden_objects::proto::protocol_config"),
57    (".transaction", "::miden_objects::proto::transaction"),
58];