Skip to content

@ens:contenthash

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

Returns: bytes

@ens:contenthash(input)
Name Type Description
input string Content hash (e.g. “ipfs:Qm…”)
# Encode an IPFS content hash
set $hash @contenthash("ipfs:QmRAQB6YaCyidP37UdDnjFY5vQuiBrcqdyoW1CuDgwxkD4")
print $hash
  • Supported codecs: ipfs, ipns, skynet
  • Format: codec:hash