Module utils

Source
Expand description

Core utilities.

Traits§

HasEndpoints
Extracts endpoints (ServiceEndpoint) from a type.
HasKeys
Extracts keys (JWK) from a type.

Functions§

canonicalize
JSON_CANONICALIZATION_SCHEME
canonicalize_str
JSON_CANONICALIZATION_SCHEME from a &str through type T to canonicalized String.
decode
Extracts and decodes the payload from the JWT.
decode_verify
Extracts payload from JWT and verifies signature.
extract_keys
Extracts a vec of public keys from a DID document.
generate_key
Generates a new cryptographic key.
get_did_from_suffix
Converts a short-form DID into a complete DID.
get_did_suffix
Returns the suffix of a short-form DID.
get_operations_path
Gets the path for storing operations and creates directories if they do not exist.
hash
Hash and encode data
init
json_contains
Tests whether one JSON object contains all the elements of another.
type_of
Gets the type of an object as a String. For diagnostic purposes (debugging) only.