isValidName

Learn about the isValidName utils method

Introduction

The isValidName method is used to check if a string is a valid Ethereum name. This method is often used to validate Ethereum names (ENS).

Usage

This method should be used when checking if a string is a valid Ethereum name. For example, you can use this method to check if the string 'myName' is a valid Ethereum name. The result would be true.

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

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

let string = "myName";
let isValid = Utils.isValidName(string); 
console.log(isValid); // true
ReadMe