Delete Domains
import {
getDomainKeySync,
NAME_PROGRAM_ID,
deleteInstruction,
} from "@bonfida/spl-name-service";
const domain = "bonfida.sol"; // With or without .sol
// Owner public key
const owner = new PublicKey("...")
const { pubkey: domainKey } = getDomainKeySync(domain);
const ix = deleteInstruction(
NAME_PROGRAM_ID,
domainKey,
owner,
owner
);
// sign and send instruction...Last updated