The parameters for the conversion.
The multibase identifier as a string.
This method provides a way to represent a cryptographic key as a multibase identifier.
It takes a Uint8Array
representing the key, and either the multicodec code or multicodec name
as input. The method first adds the multicodec prefix to the key, then encodes it into Base58
format. Finally, it converts the Base58 encoded key into a multibase identifier.
const key = new Uint8Array([...]); // Cryptographic key as Uint8Array
const multibaseId = keyBytesToMultibaseId({ key, multicodecName: 'ed25519-pub' });
Converts a cryptographic key to a multibase identifier.