Skip to main content

miden_protocol/
lib.rs

1#![no_std]
2
3#[macro_use]
4extern crate alloc;
5
6#[cfg(feature = "std")]
7extern crate std;
8
9pub mod account;
10pub mod address;
11pub mod asset;
12pub mod batch;
13pub mod block;
14pub mod errors;
15pub mod note;
16mod protocol;
17pub mod transaction;
18
19#[cfg(any(feature = "testing", test))]
20pub mod testing;
21
22mod constants;
23
24// RE-EXPORTS
25// ================================================================================================
26
27pub use constants::*;
28pub use miden_core::mast::{MastForest, MastNodeId};
29pub use miden_core::prettier::PrettyPrint;
30pub use miden_core::{EMPTY_WORD, Felt, FieldElement, ONE, StarkField, WORD_SIZE, ZERO};
31pub use miden_core_lib::CoreLibrary;
32pub use miden_crypto::hash::rpo::Rpo256 as Hasher;
33pub use miden_crypto::word;
34pub use miden_crypto::word::{LexicographicWord, Word, WordError};
35pub use protocol::ProtocolLib;
36
37pub mod assembly {
38    pub use miden_assembly::ast::{Module, ModuleKind, ProcedureName, QualifiedProcedureName};
39    pub use miden_assembly::debuginfo::SourceManagerSync;
40    pub use miden_assembly::library::LibraryExport;
41    pub use miden_assembly::{
42        Assembler,
43        DefaultSourceManager,
44        KernelLibrary,
45        Library,
46        Parse,
47        ParseOptions,
48        Path,
49        SourceFile,
50        SourceId,
51        SourceManager,
52        SourceSpan,
53        debuginfo,
54        diagnostics,
55        mast,
56    };
57}
58
59pub mod crypto {
60    pub use miden_crypto::{SequentialCommit, dsa, hash, ies, merkle, rand, utils};
61}
62
63pub mod utils {
64    pub use miden_core::utils::*;
65    pub use miden_crypto::utils::{HexParseError, bytes_to_hex_string, hex_to_bytes};
66    pub use miden_utils_sync as sync;
67
68    pub mod serde {
69        pub use miden_core::utils::{
70            ByteReader,
71            ByteWriter,
72            Deserializable,
73            DeserializationError,
74            Serializable,
75        };
76    }
77}
78
79pub mod vm {
80    pub use miden_assembly_syntax::ast::{AttributeSet, QualifiedProcedureName};
81    pub use miden_core::sys_events::SystemEvent;
82    pub use miden_core::{AdviceMap, EventId, Program, ProgramInfo};
83    pub use miden_mast_package::{
84        MastArtifact,
85        Package,
86        PackageExport,
87        PackageManifest,
88        Section,
89        SectionId,
90    };
91    pub use miden_processor::{AdviceInputs, FutureMaybeSend, RowIndex, StackInputs, StackOutputs};
92    pub use miden_verifier::ExecutionProof;
93}