1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
// Copyright 2020-2021 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
//! Core data types for blocks in the tangle.
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(doc_cfg, feature(doc_cfg))]
#![deny(missing_docs, warnings)]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std;
#[macro_use]
mod r#macro;
mod block;
mod block_id;
mod error;
/// A module that provides DTOs.
#[cfg(feature = "dto")]
pub mod dto;
/// A module that provides types and syntactic validations of addresses.
pub mod address;
/// A module that contains constants related to blocks.
pub mod constant;
/// A module that provides types and syntactic validations of inputs.
pub mod input;
/// A module that provides types and syntactic validations of outputs.
pub mod output;
/// A module that provides types and syntactic validations of parents.
pub mod parent;
/// A module that provides types and syntactic validations of payloads.
pub mod payload;
/// A module that provides types and syntactic validations of protocol parameters.
pub mod protocol;
/// A module that provides utilities for random generation of types.
#[cfg(feature = "rand")]
pub mod rand;
/// A module that provides types and rules for semantic validation.
pub mod semantic;
/// A module that provides types and syntactic validations of signatures.
pub mod signature;
/// A module that provides types and syntactic validations of unlocks.
pub mod unlock;
#[cfg(feature = "inx")]
pub use self::error::inx::InxError;
#[cfg(feature = "dto")]
pub use self::{block::dto::BlockDto, error::dto::DtoError};
pub use self::{
block::{Block, BlockBuilder},
block_id::BlockId,
error::Error,
};