Skip to main content

Crate codec_multikey

Crate codec_multikey 

Source
Expand description

Multikey public-key encoding: a multicodec algorithm prefix plus multibase, with strict length and binding validation on decode.

Structs§

KeyBindingInput
Binding metadata to validate against a parsed multikey.
ParsedMultikey
A multikey decoded into its codec metadata and raw public key bytes.

Enums§

BindingAlgorithmKind
Classified algorithm label, used for stable error reporting.
BindingTypeKind
Classified binding-type label, used for stable error reporting.
CodecNameReason
Reason a codec name could not be resolved, used in error messages.
MultikeyCodecKind
Classified multicodec name used for deterministic, non-string error context.
MultikeyError
Error returned when parsing, encoding, or validating a multikey fails.

Functions§

binding_type_matches_codec
Generic binding compatibility rules. Binding labels are protocol-facing metadata and are validated here as algorithm constraints over multikey-encoded public keys. Returns whether a binding-type label is compatible with a codec name.
encode_multikey
Encodes a public key as a multibase (base58btc) multikey string.
parse_multikey
Parses a multibase-encoded multikey string into its codec and key bytes.
validate_key_binding
Validates that a binding’s type and algorithm agree with a parsed key.