namehash

Learn about the namehash utils method

Introduction

The namehash method is used to compute the namehash of a name.

Usage

This method should be used when you want to compute the namehash of a name. The namehash is the result of applying the keccak-256 hash function to a name in a specific format.

Here's a simple code example to demonstrate how to use this method:

const { Utils } = require("alchemy-sdk");

let name = "sahilaujla.eth";

let namehash = Utils.namehash(name);
console.log(namehash); // '0xe6da5447d54460d3a2e0bf9c49d9204ce90277d6d171aca5749fc4b7c35d9c64'
ReadMe