Skip to content

feat(sdk): DotNS registry reads + writes in identity - #293

Open
TarikGul wants to merge 11 commits into
mainfrom
tg-dotns-registry-impl
Open

feat(sdk): DotNS registry reads + writes in identity#293
TarikGul wants to merge 11 commits into
mainfrom
tg-dotns-registry-impl

Conversation

@TarikGul

Copy link
Copy Markdown
Member

Description:
Implements the DotNS registry surface in @parity/product-sdk/identity, replacing the exported-but-throwing resolveDotNs / reverseDotNs / isDotNsAvailable stubs. 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)). Returns
    Result<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):

  • setDotNsRecordresolver.setAddress.
  • prepareDotNsRegistration — the commit-reveal flow: returns { secret, commitCall, registerCall, minCommitmentAge, maxCommitmentAge, price }. Register's payable value is PopRules.price(label). Registration is two txs separated by a mandatory wait, so it can't be one submittable.

Also

  • namehash / DOT_NODE exported (DotNS-specific, rooted at the .dot node).
  • DotNsError (SdkError, source: "dotns").
  • Contract addresses default to the Paseo AH deployment, all overridable.

Notes

  • Breaking: the old stubs took no options and threw; the new signatures require DotNsClientOptions and return a Result. Pre-1.0, so minor.
  • DotNsRecord.expiresAt is omitted — this deployment has no on-chain expiry.
  • The on-chain viem round-trip is validated against a live/forked Asset Hub, not unit-tested in-package (would duplicate the contracts harness); in-package tests cover validation + the error model.
  • 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.)

@github-actions

Copy link
Copy Markdown

📦 Bundle size impact

Comparing 2026-08-11T17:46:19.213Z2026-08-11T17:46:20.243Z

Package Entry Bundled before Bundled after Δ Ship gzip Δ Shake ratio
🟢 @parity/product-sdk . 6.33 MB 6.33 MB -8 B (-0.0%) 0 B 0% (was 0%)
🟢 @parity/product-sdk ./core 6.33 MB 6.33 MB -8 B (-0.0%) 0 B 0% (was 0%)
🔴 @parity/product-sdk ./identity 57.6 KB 105.7 KB +48.1 KB (+83.5%) +2.3 KB 33% (was 60%)
🟢 @parity/product-sdk ./react 6.34 MB 6.34 MB -8 B (-0.0%) -2 B 0% (was 0%)

Thresholds — warn: ≥10% or ≥5.0 KB · fail: ≥20% or ≥15.0 KB (bundled). Percentage only applies once the baseline is ≥ 10 KB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant