Function encodeContentHash

  • Encode a MassaContentHash into its ENSIP-7 compatible binary representation.

    Binary layout:

    codec(massa) empty
    codec(network) empty
    codec(feature) empty
    codec(target) lp-utf8(target-value)
    [codec(path) lp-utf8(file-path)] // deweb only

    Parameters

    Returns Uint8Array

    The binary contenthash

    Throws

    If the target or path values are invalid