Skip to content

@ens:contenthash

Encode a content hash (ipfs, ipns, skynet) for ENS records.

Returns: bytes

@ens:contenthash(input)
NameTypeDescription
inputstringContent hash (e.g. "ipfs:Qm...")
# Encode an IPFS content hash
set $hash @ens:contenthash("ipfs:QmRAQB6YaCyidP37UdDnjFY5vQuiBrcqdyoW1CuDgwxkD4")
print $hash
  • Supported codecs: ipfs, ipns, skynet
  • Format: codec:hash