SDK Reference
The @midnames/sdk package lets you resolve .night domains, query domain data, and embed domain profile widgets in your app.
Installation
Section titled “Installation”npm install @midnames/sdkQuick start
Section titled “Quick start”import { resolveDomain } from "@midnames/sdk";
const result = await resolveDomain("facu.night");
if (result.success) { // result.data is a DomainTarget: { type: "contract" | "shielded" | "unshielded", address: string } console.log("Target type:", result.data.type); console.log("Address:", result.data.address);} else { console.error("Error:", result.error.message);}All SDK functions return a Result<T> object. Check result.success to determine if the call succeeded, then access result.data for the value or result.error for the error details.
Modules
Section titled “Modules” Core functions resolveDomain, getDomainInfo, getDomainFields, and more
Write operations createDomain, transferDomain, addDomainField, and more
Domain Widget Embeddable React component for domain profiles