isAddress

Checks if a given string is a valid address.

Example

import { isAddress } from "thirdweb/utils";
isAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed");
//=> true
function isAddress(address: string): address is `0x${string}`;

Parameters

The address to check.

Type

let address: string;

Returns

let returnType: address is (`0x${string}`)

True if the address is valid, false otherwise.