Skip to main content

Documentation Index

Fetch the complete documentation index at: https://namehash-krzysztofwrobel-sc-24494-nameguard-remove-goerli-a.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The NameGuard SDK is open source and can be installed using your dependency manager.

Install

npm install @namehash/nameguard

Instantiate

NameGuard exports a singleton that can be imported that has the defaults instantiated already, these defaults are:
  • URL: https://api.nameguard.io
  • Network: mainnet
import { nameguard } from "@namehash/nameguard";

Configure Chain

You can customize the chain used by using the createClient method, and passing your desired networkSee supported chains.
import { createClient } from "@namehash/nameguard";

const nameguard = createClient({
  network: "sepolia",
});

Custom Client

If you’re working locally with or have self-hosted the NameGuard API, you’ll need to update the url for the API by creating a custom client.
import { createClient } from "@namehash/nameguard";

const nameguard = createClient({
  url: "http://localhost:5000",
});