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