feat(sdk): DotNS registry reads + writes in identity - #293
Open
TarikGul wants to merge 11 commits into
Open
Conversation
📦 Bundle size impactComparing
Thresholds — warn: ≥10% or ≥5.0 KB · fail: ≥20% or ≥15.0 KB (bundled). Percentage only applies once the baseline is ≥ 10 KB. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Implements the DotNS registry surface in
@parity/product-sdk/identity, replacing the exported-but-throwingresolveDotNs/reverseDotNs/isDotNsAvailablestubs. DotNS is an ENS-style set of Revive contracts on Paseo Asset Hub, reached via@parity/product-sdk-contracts.Reads
resolveDotNs(name)— namehash →registry.resolver(node)→resolver.addressOf(node)(+registry.owner(node)). ReturnsResult<DotNsRecord | null, DotNsError>;ok(null)when unregistered.reverseDotNs(account)—reverseResolver.nameOf(account).isDotNsAvailable(name).Writes
Return prepared
BatchableCalls the caller submits with their own signe (surface stays signer-free, like the reads):setDotNsRecord—resolver.setAddress.prepareDotNsRegistration— the commit-reveal flow: returns{ secret, commitCall, registerCall, minCommitmentAge, maxCommitmentAge, price }. Register's payable value isPopRules.price(label). Registration is two txs separated by a mandatory wait, so it can't be one submittable.Also
namehash/DOT_NODEexported (DotNS-specific, rooted at the.dotnode).DotNsError(SdkError,source: "dotns").Notes
DotNsClientOptionsand return aResult. Pre-1.0, sominor.DotNsRecord.expiresAtis omitted — this deployment has no on-chain expiry.TODO(dotns-addr): a teammate cited a StoreFactory address that differs from the deployment manifest — confirm the live deployment. (Off the resolution path, so it doesn't affect reads/writes.)