ismp/lib.rs
1// Copyright (C) Polytope Labs Ltd.
2// SPDX-License-Identifier: Apache-2.0
3
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! # The Interoperable State Machine Protocol
17//!
18//! Rust implementation of the Interoperable State Machine Protocol. This library is intended to aid
19//! state machines communicate over ISMP with other ISMP supported state machines.
20//!
21//! ## Overview
22//!
23//! This repo provides an implementation of the neccessary components laid out in the [ISMP protocol specification](https://docs.hyperbridge.network/protocol/ismp).
24//!
25//! - [`Message` Definitions](messaging)
26//! - [`Message` Handlers](handlers)
27//! - [`ConsensusClient` and `StateMachineClient` definitions](consensus)
28//! - [`IsmpHost` definitions](host)
29//! - [`IsmpRouter` definitions](router)
30//! - [`IsmpDispatcher` definitions](dispatcher)
31//!
32//! **NOTE**: All timestamps are denominated in seconds
33
34#![cfg_attr(not(feature = "std"), no_std)]
35#![deny(missing_docs)]
36
37extern crate alloc;
38extern crate core;
39
40pub mod abi;
41pub mod consensus;
42pub mod dispatcher;
43pub mod error;
44pub mod events;
45pub mod handlers;
46pub mod host;
47pub mod messaging;
48pub mod module;
49pub mod router;
50
51pub use error::Error;
52pub mod prelude {
53 //! Some useful imports in the crate prelude.
54 pub use alloc::{format, str::FromStr, string::String, vec, vec::Vec};
55}