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
// RGB Core Library: a reference implementation of RGB smart contract standards.
// Written in 2019-2022 by
//     Dr. Maxim Orlovsky <orlovsky@lnp-bp.org>
//
// To the extent possible under law, the author(s) have dedicated all copyright
// and related and neighboring rights to this software to the public domain
// worldwide. This software is distributed without any warranty.
//
// You should have received a copy of the MIT License along with this software.
// If not, see <https://opensource.org/licenses/MIT>.

mod nodes;
#[allow(clippy::module_inception)]
mod schema;
pub mod script;
mod state;
mod occurrences;

pub use nodes::{
    ExtensionSchema, GenesisSchema, MetadataStructure, NodeSchema, NodeSubtype, NodeType,
    OwnedRightType, OwnedRightsStructure, PublicRightType, PublicRightsStructure, TransitionSchema,
};
pub use occurrences::{Occurrences, OccurrencesError};
pub use schema::{ExtensionType, FieldType, Schema, SchemaId, TransitionType};
pub use script::{ValidationScript, VmType};
pub use state::{DiscreteFiniteFieldFormat, StateSchema, StateType};

/// Trait used for internal schema validation against some root schema
pub trait SchemaVerify {
    fn schema_verify(&self, root: &Self) -> crate::validation::Status;
}