sonicapi/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 unsafe_code,
28 dead_code,
29 // TODO: Complete documentation
30 // missing_docs,
31 unused_variables,
32 unused_mut,
33 unused_imports,
34 non_upper_case_globals,
35 non_camel_case_types,
36 non_snake_case
37)]
38#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
39#![cfg_attr(docsrs, feature(doc_auto_cfg))]
40
41#[macro_use]
42extern crate core;
43extern crate alloc;
44
45#[macro_use]
46extern crate amplify;
47#[macro_use]
48extern crate strict_types;
49
50#[cfg(feature = "serde")]
51#[macro_use]
52extern crate serde;
53
54mod api;
55mod issuer;
56mod articles;
57mod builders;
58mod state;
59
60pub use api::{Api, ApisChecksum, GlobalApi, OwnedApi, ParseVersionedError, SemanticError, Semantics, StateUnknown};
61pub use articles::{Articles, ArticlesId, SigBlob};
62pub use builders::{
63 Builder, BuilderRef, CoreParams, IssueParams, IssuerSpec, NamedState, OpBuilder, OpBuilderRef, VersionRange,
64};
65pub use issuer::{Issuer, IssuerId, ISSUER_MAGIC_NUMBER, ISSUER_VERSION};
66pub use sonic_callreq::*;
67pub use state::*;
68pub use ultrasonic::*;