KNS implementer kit

Copy of official KNS docs, implementable

Inscription protocol

Official: inscriptions, ops, indexer API, simply-kaspa-indexer.

Envelope

Protocol id kns. Commit-reveal P2SH. Same family as KRC-20.

<xonly_pubkey> OP_CHECKSIG OP_FALSE OP_IF <kns> <0> <payload> OP_ENDIF

KasWare builds this with buildScript({ type: "KNS", data }). Tangem uses ECDSA instead of Schnorr; the envelope is the same.

Max envelope 520 bytes. Label max 255 chars. ENS-normalize (@adraffy/ens-normalize). Visual length for price is grapheme length (graphemer). Do not price emoji domains with UTF-16 length.

Ops

oppayloadWhen
create{"op":"create","p":"domain","v":"<label>"}Register. s optional TLD, default kas.
transfer{"op":"transfer","p":"domain","id":"…","to":"kaspa:…"}Owner change.
list{"op":"list","p":"domain","id":"…"}Marketplace listing.
send{"op":"send","id":"…"}Fill a listing.

v is the label without .kas. Compact JSON. Proven: kns.kas used exactly {"op":"create","p":"domain","v":"kns"}.

Fees (reveal output 0)

mainnetkaspa:qyp4nvaq3pdq7609z09fvdgwtc9c7rg07fuw5zgeee7xpr085de59eseqfcmynn
tn10kaspatest:qq9h47etjv6x8jgcla0ecnp8mgrkfxm70ch3k60es5a50ypsf4h6sak3g0lru
Visual lengthKAS
1–24200
32100
4525
5+35
text inscription1

No renewal. First-come, first-served. Check before inscribing:

POST https://api.knsdomains.org/mainnet/api/v1/domains/check
{"domainNames":["example.kas"],"address":"<payer>"}

Resolve

URL-encode the name. Bases: https://api.knsdomains.org/mainnet and /tn10. OpenAPI: apidoc.knsdomains.org.

GET  /api/v1/{domain}/owner
GET  /api/v1/assets?owner=&asset=&type=domain
GET  /api/v1/asset/{assetId}/detail
GET  /api/v1/domain/{assetId}/profile?keys=redirectUrl,bio,avatarUrl,website,x,github,telegram,discord,email,banner
GET  /api/v1/primary-name/{owner}
POST /api/v1/domain/primary-name
Show the resolved address. It is indexer-derived, not consensus. Transfers cannot be reversed.

What inscription KNS cannot do