1#![forbid(unsafe_code)]
14
15#[cfg(feature = "base64")]
17pub mod base64 {
18 pub use codec_base64::{base64_to_bytes, bytes_to_base64, Base64Error};
19}
20
21#[cfg(feature = "base64url")]
23pub mod base64url {
24 pub use codec_base64url::{
25 base64url_bytes_to_bytes, base64url_to_bytes, bytes_to_base64url, Base64UrlError,
26 };
27
28 #[cfg(feature = "serde")]
29 pub use codec_base64url::{serde_bytes, serde_option_bytes};
30}
31
32#[cfg(feature = "cbor")]
34pub mod cbor {
35 pub use codec_cbor::{
36 compute_cid_dag_cbor, dag_cbor_multihash, decode_dag_cbor, decode_deterministic_cbor,
37 encode_dag_cbor, encode_deterministic_cbor, is_valid_cid_string, sha2_256_content_hash,
38 try_parse_cid, verify_dag_cbor_cid, CborError, CborValue, ContentHash, DagCborMultihash,
39 DeterministicCborError, DeterministicCborInteger, DeterministicCborMapEntry,
40 DeterministicCborMapKey, DeterministicCborNegativeInteger, DeterministicCborProfileError,
41 DeterministicCborValue, DAG_CBOR_CODEC, DETERMINISTIC_CBOR_NEGATIVE_MAX,
42 DETERMINISTIC_CBOR_NEGATIVE_MIN, MAX_DETERMINISTIC_CBOR_AGGREGATE_BYTE_STRING_BYTES,
43 MAX_DETERMINISTIC_CBOR_AGGREGATE_TEXT_BYTES, MAX_DETERMINISTIC_CBOR_CONTAINER_ENTRIES,
44 MAX_DETERMINISTIC_CBOR_INPUT_LEN, MAX_DETERMINISTIC_CBOR_NESTING_DEPTH,
45 MAX_DETERMINISTIC_CBOR_NODES, MAX_DETERMINISTIC_CBOR_OUTPUT_LEN,
46 };
47}
48
49#[cfg(feature = "hex")]
51pub mod hex {
52 pub use codec_hex::{bytes_to_lower_hex, lower_hex_to_bytes, write_lower_hex, HexError};
53}
54
55#[cfg(feature = "jcs")]
57pub mod jcs {
58 pub use codec_jcs::{canonicalize_json_text, canonicalize_trusted_json_value, JcsError};
59}
60
61#[cfg(feature = "multibase")]
63pub mod multibase {
64 pub use codec_multibase::{
65 base58btc_decode, base58btc_encode, bytes_to_multibase58btc, bytes_to_multibase_base64url,
66 multibase_to_bytes, Base58Error, MultibaseError,
67 };
68}
69
70#[cfg(feature = "multicodec")]
72pub mod multicodec;
73
74#[cfg(feature = "multikey")]
76pub mod multikey {
77 pub use codec_multikey::{
78 binding_type_matches_codec, encode_multikey, parse_multikey, validate_key_binding,
79 KeyBindingInput, MultikeyError, ParsedMultikey,
80 };
81}
82
83#[cfg(feature = "pem")]
85pub mod pem {
86 pub use codec_pem::{
87 decode_pem, encode_pem, PemDecodePolicy, PemDocument, PemEncodeOptions, PemError, PemLabel,
88 PemLineEnding,
89 };
90}
91
92#[cfg(feature = "operation-contract")]
94pub mod operation_contract;
95
96#[cfg(feature = "operation-contract")]
98#[doc(hidden)]
99pub mod scalar_ops;