X Handle Methods
X (formerly Twitter) root TLD
const TWITTER_ROOT_PARENT_REGISTRY_KEY = new PublicKey(
"4YcexoW3r78zz16J2aqmukBLRwGq6rAvWzJpkYAXqebv"
);Direct look up
import { getHandleAndRegistryKey } from "@bonfida/spl-name-service";
const pubkey = new PublicKey("FidaeBkZkvDqi1GXNEwB8uWmj9Ngx2HXSS5nyGRuVFcZ");
const [handle] = await getHandleAndRegistryKey(connection, pubkey);Reverse look up
import { getTwitterRegistry } from "@bonfida/spl-name-service";
const handle = "bonfida";
const registry = await getTwitterRegistry(connection, handle);
const owner = registry.owner.toBase58()Last updated