mithril_client/
type_alias.rs

1/// Mithril result type, an alias of [anyhow::Result]
2pub type MithrilResult<T> = anyhow::Result<T>;
3
4/// Mithril error type, an alias of [anyhow::Error]
5pub type MithrilError = anyhow::Error;
6
7/// A Mithril snapshot of a Cardano Node database.
8///
9pub use mithril_common::messages::SnapshotMessage as Snapshot;
10
11/// List item of Mithril snapshots
12///
13pub use mithril_common::messages::SnapshotListItemMessage as SnapshotListItem;
14
15/// A Cardano node database snapshot
16///
17pub use mithril_common::messages::CardanoDatabaseSnapshotMessage as CardanoDatabaseSnapshot;
18
19/// List items of Cardano node database snapshot
20///
21pub use mithril_common::messages::CardanoDatabaseSnapshotListItemMessage as CardanoDatabaseSnapshotListItem;
22
23/// A Mithril stake distribution.
24///
25pub use mithril_common::messages::MithrilStakeDistributionMessage as MithrilStakeDistribution;
26
27/// List item of Mithril stake distributions.
28///
29pub use mithril_common::messages::MithrilStakeDistributionListItemMessage as MithrilStakeDistributionListItem;
30
31/// A Mithril certificate.
32///
33pub use mithril_common::messages::CertificateMessage as MithrilCertificate;
34
35pub use mithril_common::messages::CertificateMetadataMessagePart as MithrilCertificateMetadata;
36
37/// List item of Mithril certificates
38///
39pub use mithril_common::messages::CertificateListItemMessage as MithrilCertificateListItem;
40
41pub use mithril_common::messages::CertificateListItemMessageMetadata as MithrilCertificateListItemMetadata;
42
43/// An individual signer of a [Mithril certificate][MithrilCertificate]
44///
45pub use mithril_common::messages::SignerWithStakeMessagePart as MithrilSigner;
46
47pub use mithril_common::messages::CardanoTransactionsProofsMessage as CardanoTransactionsProofs;
48
49pub use mithril_common::messages::CardanoTransactionsSetProofMessagePart as CardanoTransactionsSetProof;
50
51pub use mithril_common::messages::VerifiedCardanoTransactions;
52
53pub use mithril_common::messages::VerifyCardanoTransactionsProofsError;
54
55/// A snapshot that allow to know up to which [point of time][common::CardanoDbBeacon] Mithril have certified Cardano transactions.
56pub use mithril_common::messages::CardanoTransactionSnapshotMessage as CardanoTransactionSnapshot;
57
58/// List item of a Cardano transaction snapshot.
59pub use mithril_common::messages::CardanoTransactionSnapshotListItemMessage as CardanoTransactionSnapshotListItem;
60
61/// A Cardano stake distribution.
62pub use mithril_common::messages::CardanoStakeDistributionMessage as CardanoStakeDistribution;
63
64/// List item of Cardano stake distributions.
65pub use mithril_common::messages::CardanoStakeDistributionListItemMessage as CardanoStakeDistributionListItem;
66
67/// `mithril-common` re-exports
68pub mod common {
69    pub use mithril_common::AggregateSignatureType;
70    pub use mithril_common::crypto_helper::MKProof;
71    pub use mithril_common::entities::{
72        AncillaryLocation, BlockHash, BlockNumber, CardanoDbBeacon, CardanoNetwork, ChainPoint,
73        CompressionAlgorithm, DigestLocation, Epoch, EpochSpecifier, ImmutableFileNumber,
74        ImmutablesLocation, MagicId, MithrilNetwork, MultiFilesUri, ProtocolMessage,
75        ProtocolMessagePartKey, ProtocolParameters, SignedEntityType,
76        SignedEntityTypeDiscriminants, SlotNumber, StakeDistribution, SupportedEra, TemplateUri,
77        TransactionHash,
78    };
79    pub use mithril_common::messages::{
80        AncillaryMessagePart, DigestsMessagePart, ImmutablesMessagePart,
81    };
82
83    /// Test utilities.
84    ///
85    /// ⚠ Do not use in production code ⚠
86    pub mod test {
87        pub use mithril_common::test::double::Dummy;
88    }
89}
90
91/// Required capabilities for an aggregator.
92#[cfg(not(target_family = "wasm"))]
93pub use mithril_aggregator_discovery::RequiredAggregatorCapabilities;