validateName
Parameters
Returns
Example
import { ThothIdSDK } from "thoth-id-sdk";
async function validateName() {
try {
const sdk = new ThothIdSDK();
await sdk.loadContractIds();
const isValid = await sdk.validateName("validname.htr");
console.log("Is 'validname.htr' valid?", isValid);
const isInvalid = await sdk.validateName("Invalid-Name.htr");
console.log("Is 'Invalid-Name.htr' valid?", isInvalid);
} catch (error) {
console.error("Error validating name:", error);
}
}
validateName();Last updated

