KNS implementer kit

window.kastle

Inscribe a .kas name with Kastle

Official KNS table: extension inscribes, mobile does not. Vendor: Kastle Wallet API. Two confirmations (commit, then reveal). KNS does not support ECDSA addresses.

Connect

const ok = await window.kastle.connect();
const { address, publicKey } = await window.kastle.getAccount();
const network = await window.kastle.getNetwork(); // "mainnet"

Create example.kas

commitReveal(networkId, namespace, data) writes namespace as the envelope protocol id. KNS uses "kns". KRC-20 uses "kasplex".

const payload = JSON.stringify({ op: "create", p: "domain", v: "example" });
const { commitTxId, revealTxId } = await window.kastle.commitReveal(
  "mainnet",
  "kns",
  payload
);

Two popups. Expected.

KNS reveal output 0 must pay kaspa:qyp4nvaq3pdq7609z09fvdgwtc9c7rg07fuw5zgeee7xpr085de59eseqfcmynn. Kastle commitReveal only documents priority fees. It does not document a custom fee output. If output 0 is not the protocol address, the indexer will not verify the domain. Use the official inscribe tool, or build the reveal so output 0 is the fee.

Transfer

{"op":"transfer","p":"domain","id":"<inscriptionId>","to":"kaspa:q…"}

Same namespace kns.