pragma solidity >=0.6.12; // Author: Louis Holbrook 0826EDA1702D1E87C6E2875121D2E7BB88C2A746 // SPDX-License-Identifier: AGPL-3.0-or-later // File-version: 2 interface IMultiHash { // Represents a multicodec item. struct MultiHash { uint8 l; uint8 codecRLength; uint8 prefixRLength; bytes16 prefix; bytes8 codec; } // All registered multicodecs function digestCodec(uint256 _codec) external view returns(MultiHash memory); function haveDigestEncoding(uint256 _codec) external view returns(bool); // Generate a multihash from the given digest and current selected multicodec function encodeDigest(uint256 _codec, bytes memory _digest) external view returns(bytes memory); }