Skip to content

Commit

Permalink
add checkDomain function
Browse files Browse the repository at this point in the history
  • Loading branch information
Inevitable-Design committed Jun 19, 2024
1 parent 9915c1b commit 490f0b9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ const ZNSConnectClass = class {
throw error;
}
}

async checkDomain(domain: string): Promise<boolean> {
try {
const domainData = await resolveDomain(domain);
return domainData.owner !== '0x0000000000000000000000000000000000000000';

Check failure on line 58 in src/index.ts

View workflow job for this annotation

GitHub Actions / release / Release

Property 'owner' does not exist on type 'unknown'.
} catch (error) {
console.error('Error checking domain:', error);
return false;
}
}
};

function ZNSConnect() {
Expand Down

0 comments on commit 490f0b9

Please sign in to comment.