#![cfg_attr(feature = "base64url", doc = include_str!("../README.md"))]
#![forbid(unsafe_code)]
#[cfg(feature = "base64")]
pub mod base64 {
pub use codec_base64::{base64_to_bytes, bytes_to_base64, Base64Error};
}
#[cfg(feature = "base64url")]
pub mod base64url {
pub use codec_base64url::{
base64url_bytes_to_bytes, base64url_to_bytes, bytes_to_base64url, Base64UrlError,
};
#[cfg(feature = "serde")]
pub use codec_base64url::{serde_bytes, serde_option_bytes};
}
#[cfg(feature = "cbor")]
pub mod cbor {
pub use codec_cbor::{
compute_cid_dag_cbor, dag_cbor_multihash, decode_dag_cbor, decode_deterministic_cbor,
encode_dag_cbor, encode_deterministic_cbor, is_valid_cid_string, sha2_256_content_hash,
try_parse_cid, verify_dag_cbor_cid, CborError, CborValue, CidVerificationStatus,
ContentHash, DagCborCidVerification, DagCborMultihash, DeterministicCborError,
DeterministicCborInteger, DeterministicCborMapEntry, DeterministicCborMapKey,
DeterministicCborNegativeInteger, DeterministicCborProfileError, DeterministicCborValue,
ParsedCid, DAG_CBOR_CODEC, DETERMINISTIC_CBOR_NEGATIVE_MAX,
DETERMINISTIC_CBOR_NEGATIVE_MIN, MAX_DETERMINISTIC_CBOR_AGGREGATE_BYTE_STRING_BYTES,
MAX_DETERMINISTIC_CBOR_AGGREGATE_TEXT_BYTES, MAX_DETERMINISTIC_CBOR_CONTAINER_ENTRIES,
MAX_DETERMINISTIC_CBOR_INPUT_LEN, MAX_DETERMINISTIC_CBOR_NESTING_DEPTH,
MAX_DETERMINISTIC_CBOR_NODES, MAX_DETERMINISTIC_CBOR_OUTPUT_LEN,
};
}
#[cfg(feature = "hex")]
pub mod hex {
pub use codec_hex::{bytes_to_lower_hex, lower_hex_to_bytes, write_lower_hex, HexError};
}
#[cfg(feature = "jcs")]
pub mod jcs {
pub use codec_jcs::{canonicalize_json_text, canonicalize_trusted_json_value, JcsError};
}
#[cfg(feature = "multibase")]
pub mod multibase {
pub use codec_multibase::{
base58btc_decode, base58btc_encode, bytes_to_multibase58btc, bytes_to_multibase_base64url,
multibase_to_bytes, Base58Error, MultibaseError,
};
}
#[cfg(feature = "multicodec")]
pub mod multicodec;
#[cfg(feature = "multikey")]
pub mod multikey {
#[allow(deprecated)]
pub use codec_multikey::{
binding_type_matches_codec, encode_multikey, parse_multikey, validate_key_binding,
validate_multikey_binding, KeyBindingInput, MultikeyError, ParsedMultikey,
};
}
#[cfg(feature = "pem")]
pub mod pem {
pub use codec_pem::{
decode_pem, encode_pem, PemDecodePolicy, PemDocument, PemEncodeOptions, PemError, PemLabel,
PemLineEnding,
};
}
#[cfg(feature = "operation-contract")]
pub mod operation_contract;