Component
Registration
Priority
P1
Summary
The dotNS contracts changed how names below the top level are issued, and the dotns-sdk must be
updated anywhere it issues a subname or reads a lite (PoP) name.
Two contract-side changes drive this:
IDotnsRegistry.SubnodeRecord gained a persist field. When true the registry indexes the
subnode into the owner's LabelStore; when false it writes only the ownership and resolver
record and the caller writes the label into the store separately. Every setSubnodeOwner call
must now supply this field.
- A PoP lite username (
alice.01) is now issued as a subname alice beneath the numeric
container 01, not as one atomic label. Its node is
namehash(namehash(tldNode, keccak("01")), keccak("alice")), and its ownership lives in the
registry record, not as an ERC-721 token on the registrar.
Desired outcome: the SDK constructs the current SubnodeRecord shape, and resolves and reads
ownership of a lite name at its subname node through the registry.
Proposal
The new struct shape:
struct SubnodeRecord {
bytes32 parentNode;
string subLabel;
string parentLabel;
address owner;
bool persist;
}
- Update every place the SDK builds a
SubnodeRecord / calls setSubnodeOwner to include
persist, choosing true or false per the caller's store-indexing need.
- For a lite name
<stem>.<suffix>, split on the separator and derive the node as
namehash(namehash(tldNode, keccak(suffix)), keccak(stem)) rather than hashing the whole label
under the TLD.
- Read a lite name's owner from the registry (
owner(node)), which resolves both a tokenised name
and a subname, rather than from the registrar's ownerOf.
Acceptance criteria
Component
Registration
Priority
P1
Summary
The dotNS contracts changed how names below the top level are issued, and the dotns-sdk must be
updated anywhere it issues a subname or reads a lite (PoP) name.
Two contract-side changes drive this:
IDotnsRegistry.SubnodeRecordgained apersistfield. When true the registry indexes thesubnode into the owner's
LabelStore; when false it writes only the ownership and resolverrecord and the caller writes the label into the store separately. Every
setSubnodeOwnercallmust now supply this field.
alice.01) is now issued as a subnamealicebeneath the numericcontainer
01, not as one atomic label. Its node isnamehash(namehash(tldNode, keccak("01")), keccak("alice")), and its ownership lives in theregistry record, not as an ERC-721 token on the registrar.
Desired outcome: the SDK constructs the current
SubnodeRecordshape, and resolves and readsownership of a lite name at its subname node through the registry.
Proposal
The new struct shape:
SubnodeRecord/ callssetSubnodeOwnerto includepersist, choosing true or false per the caller's store-indexing need.<stem>.<suffix>, split on the separator and derive the node asnamehash(namehash(tldNode, keccak(suffix)), keccak(stem))rather than hashing the whole labelunder the TLD.
owner(node)), which resolves both a tokenised nameand a subname, rather than from the registrar's
ownerOf.Acceptance criteria
SubnodeRecord(withpersist) and every call site sets it.