hypersonic/lib.rs
1// SONIC: Standard library for formally-verifiable distributed contracts
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5// Designed in 2019-2025 by Dr Maxim Orlovsky <orlovsky@ubideco.org>
6// Written in 2024-2025 by Dr Maxim Orlovsky <orlovsky@ubideco.org>
7//
8// Copyright (C) 2019-2024 LNP/BP Standards Association, Switzerland.
9// Copyright (C) 2024-2025 Laboratories for Ubiquitous Deterministic Computing (UBIDECO),
10// Institute for Distributed and Cognitive Systems (InDCS), Switzerland.
11// Copyright (C) 2019-2025 Dr Maxim Orlovsky.
12// All rights under the above copyrights are reserved.
13//
14// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
15// in compliance with the License. You may obtain a copy of the License at
16//
17// http://www.apache.org/licenses/LICENSE-2.0
18//
19// Unless required by applicable law or agreed to in writing, software distributed under the License
20// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
21// or implied. See the License for the specific language governing permissions and limitations under
22// the License.
23
24// TODO: Activate once StrictEncoding will be no_std
25// #![cfg_attr(not(feature = "std"), no_std)]
26#![deny(
27 // TODO: Activate once StrictEncoding removes invalid unsafe fn modifiers from the raw reader
28 // unsafe_code,
29 dead_code,
30 // TODO: Complete documentation
31 // missing_docs,
32 unused_variables,
33 unused_mut,
34 unused_imports,
35 non_upper_case_globals,
36 non_camel_case_types,
37 non_snake_case
38)]
39#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
40#![cfg_attr(docsrs, feature(doc_auto_cfg))]
41
42#[macro_use]
43extern crate core;
44extern crate alloc;
45
46#[macro_use]
47extern crate amplify;
48#[macro_use]
49extern crate strict_types;
50
51#[cfg(feature = "serde")]
52#[macro_use]
53extern crate serde;
54
55pub use sonicapi::*;
56#[allow(unused_imports)]
57pub use ultrasonic::*;
58
59mod state;
60mod stock;
61mod deed;
62mod ledger;
63#[cfg(feature = "stl")]
64pub mod stl;
65
66pub use deed::{CallParams, DeedBuilder, Satisfaction};
67pub use ledger::{AcceptError, Ledger};
68#[cfg(feature = "binfile")]
69pub use ledger::{DEEDS_MAGIC_NUMBER, DEEDS_VERSION};
70pub use state::{EffectiveState, ProcessedState, RawState, Transition};
71pub use stock::{IssueError, Stock};