Takes binary input and returns it (multi) hash digest. Return value is
either promise of a digest or a digest. This way general use can await
while performance critical code may asses return value to decide whether
await is needed.
Optionaloptions: DigestOptions
Sync variant of
MultihashHasherthat refines return type of thedigesttoMultihashDigest. It is subtype ofMultihashHasherso implementations of this interface can be passed anywhereMultihashHasheris expected, allowing consumer to eitherawaitor check the return type to decide whether to await or proceed with return value.SyncMultihashHasheris useful in certain APIs where async hashing would be impractical e.g. implementation of Hash Array Mapped Trie (HAMT).