chore(enssdk): migrate core ENS types and utilities#1889
chore(enssdk): migrate core ENS types and utilities#1889
Conversation
moves core ENS utilities (constants, labelhash, normalization, interpretation, coin-type, dns-encoding, reverse-name, etc.) from @ensnode/ensnode-sdk into enssdk — the foundational library. removes the blanket `export * from "enssdk"` re-export from ensnode-sdk so all packages import enssdk types directly. adds typed wrappers for namehash() and labelhash() that return branded types. re-exports Address and Hex from viem. updates ~180 files across the monorepo to import from "enssdk" instead of "@ensnode/ensnode-sdk" for migrated symbols. closes #1878 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: abc3e30 The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Migrates foundational ENS utilities and types out of @ensnode/ensnode-sdk into enssdk, making enssdk the direct dependency for core ENS operations and removing the previous “blanket re-export” that obscured package boundaries.
Changes:
- Moved core ENS modules (labelhash/parse-labelhash, names/normalization, reverse-name parsing, coin-type, DNS encoding, constants, interpretation helpers) into
enssdkand re-exported them fromenssdk/src/lib/index.ts. - Added typed wrappers (
namehash,labelhash) and re-exported EVMAddress/Hextypes fromenssdk. - Mechanically updated many imports across apps/packages and added
enssdkas an explicit dependency where needed; removedexport * from "enssdk"fromensnode-sdk/src/ens/index.ts.
Reviewed changes
Copilot reviewed 220 out of 224 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Adds enssdk workspace links and new enssdk deps in lockfile. |
| packages/namehash-ui/src/utils/ensMetadata.ts | Switches Name type import to enssdk. |
| packages/namehash-ui/src/utils/ensManager.ts | Switches Address/Name type imports to enssdk. |
| packages/namehash-ui/src/utils/chains.ts | Switches ChainId type import to enssdk. |
| packages/namehash-ui/src/utils/blockExplorers.ts | Switches Address/ChainId type imports to enssdk. |
| packages/namehash-ui/src/components/registrar-actions/RegistrarActionCard.tsx | Uses enssdk Address/DefaultableChainId types instead of viem/ensnode-sdk. |
| packages/namehash-ui/src/components/identity/Name.tsx | Switches Name and beautifyName imports to enssdk. |
| packages/namehash-ui/src/components/identity/Identity.tsx | Switches DEFAULT_EVM_CHAIN_ID import to enssdk. |
| packages/namehash-ui/src/components/identity/EnsAvatar.tsx | Switches Name type import to enssdk. |
| packages/namehash-ui/src/components/identity/Address.tsx | Switches Address type import to enssdk. |
| packages/namehash-ui/src/components/chains/ChainName.tsx | Switches ChainId type import to enssdk. |
| packages/namehash-ui/src/components/chains/ChainIcon.tsx | Switches ChainId type import to enssdk. |
| packages/namehash-ui/package.json | Adds direct enssdk dependency. |
| packages/enssdk/src/lib/types/evm.ts | Re-exports Hex and aliases Address from viem for consumers. |
| packages/enssdk/src/lib/reverse-name.ts | Internal type import adjustments after migration. |
| packages/enssdk/src/lib/parse-reverse-name.ts | Removes asLowerCaseAddress dependency; uses local types. |
| packages/enssdk/src/lib/parse-reverse-name.test.ts | Adds test coverage for ENSIP-19 reverse-name parsing. |
| packages/enssdk/src/lib/parse-labelhash.ts | Uses local LabelHash type import. |
| packages/enssdk/src/lib/parse-labelhash.test.ts | Adds test coverage for parsing/normalizing labelhash & encoded labelhash forms. |
| packages/enssdk/src/lib/names.ts | Uses local ENS types; relies on @adraffy/ens-normalize for beautification. |
| packages/enssdk/src/lib/names.test.ts | Updates unicode test strings; keeps name helper coverage in enssdk. |
| packages/enssdk/src/lib/namehash.ts | Adds typed namehash(Name) -> Node wrapper around viem. |
| packages/enssdk/src/lib/labelhash.ts | Consolidates labelhash utilities, including literal-label hashing and encoded labelhash helpers. |
| packages/enssdk/src/lib/labelhash.test.ts | Moves/extends labelhash tests into enssdk. |
| packages/enssdk/src/lib/is-normalized.ts | Uses local ENS types; normalization check via viem/ens. |
| packages/enssdk/src/lib/is-normalized.test.ts | Updates unicode literals in normalization tests. |
| packages/enssdk/src/lib/interpreted-names-and-labels.ts | Points interpretation logic at migrated enssdk helpers/types. |
| packages/enssdk/src/lib/interpreted-names-and-labels.test.ts | Updates imports/unicode literals to match enssdk migration. |
| packages/enssdk/src/lib/index.ts | Re-exports migrated ENS utilities from enssdk’s public lib surface. |
| packages/enssdk/src/lib/dns-encoded-name.ts | Uses local ENS/DNS types after migration. |
| packages/enssdk/src/lib/dns-encoded-name.test.ts | Updates imports/unicode literals; uses enssdk labelhash helpers. |
| packages/enssdk/src/lib/constants.ts | Uses local Node type; keeps core node constants in enssdk. |
| packages/enssdk/src/lib/coin-type.ts | Uses local types; wraps address-encoder coinType mappings with ENSIP-19 behavior. |
| packages/enssdk/src/lib/coin-type.test.ts | Adds tests for coin-type conversion and bigint-to-coinType validation. |
| packages/enssdk/package.json | Adds @adraffy/ens-normalize dependency for migrated name beautification. |
| packages/ensrainbow-sdk/src/client.ts | Switches labelhash types + parser import to enssdk. |
| packages/ensrainbow-sdk/package.json | Adds direct enssdk dependency. |
| packages/ensnode-sdk/src/tokenscope/name-token.ts | Switches getParentNameFQDN import to enssdk. |
| packages/ensnode-sdk/src/shared/zod-schemas.test.ts | Switches encodeLabelHash import to enssdk. |
| packages/ensnode-sdk/src/shared/root-registry.ts | Switches makeRegistryId import to enssdk. |
| packages/ensnode-sdk/src/shared/protocol-acceleration/is-static-resolver.ts | Switches AccountId type import to enssdk. |
| packages/ensnode-sdk/src/shared/protocol-acceleration/is-ensip-19-reverse-resolver.ts | Switches AccountId type import to enssdk. |
| packages/ensnode-sdk/src/shared/protocol-acceleration/is-bridged-resolver.ts | Switches AccountId type import to enssdk. |
| packages/ensnode-sdk/src/shared/labelhash.ts | Deletes migrated labelhashLiteralLabel implementation from ensnode-sdk. |
| packages/ensnode-sdk/src/shared/labelhash.test.ts | Deletes migrated labelhashLiteralLabel tests from ensnode-sdk. |
| packages/ensnode-sdk/src/shared/interpretation/reinterpretation.ts | Switches encoding/normalization helpers import to enssdk. |
| packages/ensnode-sdk/src/shared/interpretation/reinterpretation.test.ts | Switches InterpretedLabel type import to enssdk. |
| packages/ensnode-sdk/src/shared/interpretation/interpret-record-values.ts | Switches isNormalizedName import to enssdk; keeps address helper local. |
| packages/ensnode-sdk/src/shared/interpretation/index.ts | Stops re-exporting interpreted-names-and-labels from ensnode-sdk shared interpretation barrel. |
| packages/ensnode-sdk/src/shared/config/build-rpc-urls.ts | Switches ChainId type import to enssdk. |
| packages/ensnode-sdk/src/resolution/ensip19-chainid.ts | Switches DEFAULT_EVM_CHAIN_ID import to enssdk. |
| packages/ensnode-sdk/src/index.ts | Removes re-export of deleted shared labelhash module. |
| packages/ensnode-sdk/src/ensindexer/config/label-utils.test.ts | Switches LabelHash type import to enssdk. |
| packages/ensnode-sdk/src/ensapi/client.test.ts | Switches Address/Name types to enssdk. |
| packages/ensnode-sdk/src/ens/labelhash.ts | Deletes migrated isLabelHash helper from ensnode-sdk. |
| packages/ensnode-sdk/src/ens/index.ts | Removes export * from "enssdk" and migrated ENS exports; keeps ensnode-sdk-only ENS exports. |
| packages/ensnode-sdk/src/ens/encode-labelhash.ts | Deletes migrated encoded-labelhash helpers from ensnode-sdk. |
| packages/ensnode-react/package.json | Adds direct enssdk dependency. |
| packages/ensdb-sdk/src/ensindexer-abstract/subgraph.schema.ts | Switches Address type import to enssdk. |
| packages/ensdb-sdk/src/ensindexer-abstract/protocol-acceleration.schema.ts | Switches multiple schema type imports to enssdk. |
| packages/ensdb-sdk/src/ensindexer-abstract/ensv2.schema.ts | Switches core type imports to enssdk; keeps EncodedReferrer from ensnode-sdk. |
| packages/ensdb-sdk/package.json | Adds direct enssdk dependency. |
| packages/ens-referrals/src/v1/referrer-metrics.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/v1/link.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/v1/link.test.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/v1/leaderboard-page.test.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/v1/edition-metrics.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/v1/award-models/shared/rules.ts | Switches AccountId type import to enssdk. |
| packages/ens-referrals/src/v1/award-models/shared/rank.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/v1/award-models/shared/leaderboard-page.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/v1/award-models/rev-share-limit/rules.ts | Switches AccountId/Address type imports to enssdk. |
| packages/ens-referrals/src/v1/award-models/rev-share-limit/referral-event.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/v1/award-models/rev-share-limit/metrics.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/v1/award-models/rev-share-limit/leaderboard.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/v1/award-models/pie-split/rules.ts | Switches AccountId type import to enssdk. |
| packages/ens-referrals/src/v1/award-models/pie-split/metrics.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/v1/award-models/pie-split/leaderboard.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/v1/api/types.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/v1/address.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/rules.ts | Switches AccountId type import to enssdk. |
| packages/ens-referrals/src/referrer-metrics.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/referrer-detail.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/rank.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/link.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/link.test.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/leaderboard.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/leaderboard-page.test.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/api/types.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/src/address.ts | Switches Address type import to enssdk. |
| packages/ens-referrals/package.json | Adds direct enssdk dependency. |
| apps/ensrainbow/src/utils/rainbow-record.ts | Switches LabelHash type import to enssdk. |
| apps/ensrainbow/src/utils/rainbow-record.test.ts | Switches LabelHash type import to enssdk. |
| apps/ensrainbow/src/lib/server.ts | Switches LabelHash type import to enssdk. |
| apps/ensrainbow/src/lib/rainbow-record.ts | Switches Label type import to enssdk. |
| apps/ensrainbow/src/lib/database.ts | Switches Hex type import to enssdk. |
| apps/ensrainbow/package.json | Adds direct enssdk dependency. |
| apps/ensindexer/src/plugins/tokenscope/lib/handle-nft-transfer.ts | Switches Address type import to enssdk. |
| apps/ensindexer/src/plugins/tokenscope/handlers/ThreeDNSToken.ts | Switches ChainId type import to enssdk. |
| apps/ensindexer/src/plugins/subgraph/shared-handlers/ThreeDNSToken.ts | Switches many ENS/DNS types/utilities imports to enssdk. |
| apps/ensindexer/src/plugins/subgraph/shared-handlers/Resolver.ts | Switches Address/Hex/Node types to enssdk. |
| apps/ensindexer/src/plugins/subgraph/shared-handlers/Registry.ts | Switches many ENS types/utils to enssdk; keeps ensnode-sdk-only helpers. |
| apps/ensindexer/src/plugins/subgraph/shared-handlers/Registrar.ts | Switches many ENS types/utils to enssdk; keeps ensnode-sdk-only helpers. |
| apps/ensindexer/src/plugins/subgraph/shared-handlers/NameWrapper.ts | Switches ENS parsing/types utilities to enssdk. |
| apps/ensindexer/src/plugins/subgraph/plugins/subgraph/handlers/Registry.ts | Switches Node/ROOT_NODE import to enssdk. |
| apps/ensindexer/src/plugins/registrars/shared/lib/universal-registrar-renewal-with-referrer-events.ts | Switches Address/Node types to enssdk. |
| apps/ensindexer/src/plugins/registrars/shared/lib/registrar-events.ts | Switches Address type to enssdk. |
| apps/ensindexer/src/plugins/registrars/shared/lib/registrar-controller-events.ts | Switches Address/Node types to enssdk. |
| apps/ensindexer/src/plugins/protocol-acceleration/handlers/ThreeDNSToken.ts | Switches Address/ChainId types to enssdk. |
| apps/ensindexer/src/plugins/protocol-acceleration/handlers/StandaloneReverseRegistrar.ts | Switches coin-type helpers import to enssdk. |
| apps/ensindexer/src/plugins/protocol-acceleration/handlers/Resolver.ts | Switches coin-type helpers/types import to enssdk. |
| apps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv2Registry.ts | Switches Address type import to enssdk. |
| apps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv1Registry.ts | Switches Address type import to enssdk. |
| apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ETHRegistrar.ts | Switches Address/TokenId type imports to enssdk. |
| apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ENSv2Registry.ts | Switches Address/LiteralLabel types to enssdk. |
| apps/ensindexer/src/plugins/ensv2/handlers/ensv2/EnhancedAccessControl.ts | Switches Address type import to enssdk. |
| apps/ensindexer/src/plugins/ensv2/handlers/ensv1/RegistrarController.ts | Switches labelhash helpers/types to enssdk. |
| apps/ensindexer/src/plugins/ensv2/handlers/ensv1/NameWrapper.ts | Switches ENS parsing/types utilities to enssdk. |
| apps/ensindexer/src/plugins/ensv2/handlers/ensv1/ENSv1Registry.ts | Switches core constants/types to enssdk. |
| apps/ensindexer/src/plugins/ensv2/handlers/ensv1/BaseRegistrar.ts | Switches Address type import to enssdk. |
| apps/ensindexer/src/lib/trace-transaction-helpers.ts | Switches Address/Hex type imports to enssdk. |
| apps/ensindexer/src/lib/tokenscope/seaport.ts | Switches AssetNamespaces/ChainId types to enssdk. |
| apps/ensindexer/src/lib/tokenscope/seaport-types.ts | Switches Address/Hex type imports to enssdk. |
| apps/ensindexer/src/lib/tokenscope/sales.ts | Switches Address/Hex type imports to enssdk. |
| apps/ensindexer/src/lib/tokenscope/nft-issuers.ts | Switches core ENS constants/types to enssdk; keeps ensnode-sdk-only datasource helpers. |
| apps/ensindexer/src/lib/threedns-helpers.ts | Switches Node/TokenId type imports to enssdk. |
| apps/ensindexer/src/lib/subgraph/subgraph-helpers.ts | Switches Node/ROOT_NODE imports to enssdk. |
| apps/ensindexer/src/lib/subgraph/is-label-subgraph-indexable.ts | Switches LiteralLabel type import to enssdk. |
| apps/ensindexer/src/lib/subgraph/is-label-subgraph-indexable.test.ts | Switches LiteralLabel type import to enssdk. |
| apps/ensindexer/src/lib/subgraph/ids.ts | Switches LabelHash/Node type imports to enssdk. |
| apps/ensindexer/src/lib/subgraph/db-helpers.ts | Switches Address type import to enssdk. |
| apps/ensindexer/src/lib/protocol-acceleration/resolver-db-helpers.ts | Switches Address type import to enssdk. |
| apps/ensindexer/src/lib/protocol-acceleration/registry-migration-status.ts | Switches Node type import to enssdk. |
| apps/ensindexer/src/lib/protocol-acceleration/domain-resolver-relationship-db-helpers.ts | Switches AccountId/Address/DomainId type imports to enssdk. |
| apps/ensindexer/src/lib/maybe-heal-label-by-addr-reverse-subname.ts | Switches core types/utils to enssdk. |
| apps/ensindexer/src/lib/maybe-heal-label-by-addr-reverse-subname.test.ts | Switches addrReverseLabel import to enssdk. |
| apps/ensindexer/src/lib/managed-names.ts | Switches core types to enssdk. |
| apps/ensindexer/src/lib/managed-names.test.ts | Switches AccountId type import to enssdk. |
| apps/ensindexer/src/lib/json-metadata.ts | Switches LiteralLabel/LiteralName type imports to enssdk. |
| apps/ensindexer/src/lib/heal-addr-reverse-subname-label.ts | Switches Address/LabelHash/LiteralLabel types to enssdk. |
| apps/ensindexer/src/lib/graphnode-helpers.ts | Switches LabelHash/LiteralLabel type imports to enssdk. |
| apps/ensindexer/src/lib/graphnode-helpers.test.ts | Switches LabelHash type import to enssdk. |
| apps/ensindexer/src/lib/get-this-account-id.ts | Switches AccountId type import to enssdk. |
| apps/ensindexer/src/lib/ensv2/label-db-helpers.ts | Switches label interpretation helpers/types to enssdk. |
| apps/ensindexer/src/lib/ensv2/domain-db-helpers.ts | Switches Address/ENSv1DomainId types to enssdk. |
| apps/ensindexer/src/lib/ensv2/account-db-helpers.ts | Switches Address type import to enssdk. |
| apps/ensindexer/src/lib/dns-helpers.ts | Switches DNS/ENS label/name types to enssdk. |
| apps/ensindexer/src/lib/dns-helpers.test.ts | Switches DNSEncodedLiteralName type import to enssdk. |
| apps/ensindexer/src/lib/currencies.ts | Switches AccountId/Address/ChainId types to enssdk. |
| apps/ensindexer/src/config/validations.ts | Switches Address type import to enssdk. |
| apps/ensindexer/src/config/types.ts | Switches ChainId type import to enssdk. |
| apps/ensindexer/src/config/serialized-types.ts | Switches ChainId/ChainIdString/UrlString type imports to enssdk. |
| apps/ensindexer/src/config/serialize.ts | Switches UrlString type import to enssdk. |
| apps/ensindexer/src/config/derived-params.ts | Switches ChainId type import to enssdk. |
| apps/ensapi/src/test/integration/find-domains/domain-pagination-queries.ts | Switches InterpretedLabel/Name type imports to enssdk. |
| apps/ensapi/src/omnigraph-api/schema/scalars.ts | Switches core scalar types to enssdk; keeps runtime helpers from viem/zod. |
| apps/ensapi/src/omnigraph-api/schema/resolver.ts | Switches namehash import to enssdk. |
| apps/ensapi/src/omnigraph-api/schema/resolver-records.ts | Switches bigintToCoinType import to enssdk. |
| apps/ensapi/src/omnigraph-api/schema/renewal.ts | Switches RenewalId type import to enssdk. |
| apps/ensapi/src/omnigraph-api/schema/registry.integration.test.ts | Switches InterpretedLabel type import to enssdk. |
| apps/ensapi/src/omnigraph-api/schema/registration.ts | Switches ENSv1DomainId/RegistrationId type imports to enssdk. |
| apps/ensapi/src/omnigraph-api/schema/query.integration.test.ts | Switches labelhash/namehash and core types to enssdk. |
| apps/ensapi/src/omnigraph-api/schema/permissions.ts | Switches ROOT_RESOURCE import to enssdk. |
| apps/ensapi/src/omnigraph-api/schema/permissions.integration.test.ts | Switches Address type import to enssdk. |
| apps/ensapi/src/omnigraph-api/schema/domain.ts | Switches interpreted-name helpers/types to enssdk. |
| apps/ensapi/src/omnigraph-api/schema/domain.integration.test.ts | Switches InterpretedLabel/Name type imports to enssdk. |
| apps/ensapi/src/omnigraph-api/schema/account.ts | Switches Address type import to enssdk. |
| apps/ensapi/src/omnigraph-api/schema/account.integration.test.ts | Switches Address/Name type imports to enssdk. |
| apps/ensapi/src/omnigraph-api/schema/account-id.ts | Switches AccountId type import to enssdk. |
| apps/ensapi/src/omnigraph-api/lib/get-latest-registration.ts | Switches DomainId type import to enssdk. |
| apps/ensapi/src/omnigraph-api/lib/get-domain-resolver.ts | Switches DomainId type import to enssdk. |
| apps/ensapi/src/omnigraph-api/lib/get-domain-by-interpreted-name.ts | Switches core helpers/types (incl. namehash) to enssdk. |
| apps/ensapi/src/omnigraph-api/lib/get-canonical-path.ts | Switches core types/constants to enssdk. |
| apps/ensapi/src/omnigraph-api/lib/find-events/find-events-resolver.ts | Switches Address/Hex type imports to enssdk. |
| apps/ensapi/src/omnigraph-api/lib/find-domains/layers/with-ordering-metadata.ts | Switches DomainId type import to enssdk. |
| apps/ensapi/src/omnigraph-api/lib/find-domains/layers/filter-by-registry.ts | Switches RegistryId type import to enssdk. |
| apps/ensapi/src/omnigraph-api/lib/find-domains/layers/filter-by-parent.ts | Switches DomainId type import to enssdk. |
| apps/ensapi/src/omnigraph-api/lib/find-domains/layers/filter-by-owner.ts | Switches Address type import to enssdk. |
| apps/ensapi/src/omnigraph-api/lib/find-domains/layers/filter-by-name.ts | Switches parsing/types utilities to enssdk. |
| apps/ensapi/src/omnigraph-api/lib/find-domains/layers/base-domain-set.ts | Switches Address/DomainId type imports to enssdk. |
| apps/ensapi/src/omnigraph-api/lib/find-domains/domain-cursor.ts | Switches DomainId type import to enssdk. |
| apps/ensapi/src/omnigraph-api/lib/find-domains/domain-cursor.test.ts | Switches DomainId type import to enssdk. |
| apps/ensapi/src/omnigraph-api/context.ts | Switches canonical path/domain ID type imports to enssdk. |
| apps/ensapi/src/omnigraph-api/builder.ts | Switches Address/Hex scalar types to enssdk. |
| apps/ensapi/src/lib/resolution/reverse-resolution.ts | Switches reverse-name helpers import to enssdk. |
| apps/ensapi/src/lib/resolution/resolve-with-universal-resolver.ts | Switches Name type import to enssdk. |
| apps/ensapi/src/lib/resolution/resolve-calls-and-results.ts | Switches core types (Address/Name/Node) to enssdk. |
| apps/ensapi/src/lib/resolution/multichain-primary-name-resolution.ts | Switches ChainId type import to enssdk. |
| apps/ensapi/src/lib/resolution/make-records-response.ts | Switches bigintToCoinType import to enssdk. |
| apps/ensapi/src/lib/resolution/make-records-response.test.ts | Switches CoinType type import to enssdk. |
| apps/ensapi/src/lib/resolution/forward-resolution.ts | Switches normalization/namehash/reverse parsing imports to enssdk. |
| apps/ensapi/src/lib/registrar-actions/find-registrar-actions.ts | Switches InterpretedName type import to enssdk. |
| apps/ensapi/src/lib/public-client.ts | Switches ChainId type import to enssdk. |
| apps/ensapi/src/lib/protocol-acceleration/resolver-records-indexed-on-chain.ts | Switches ChainId type import to enssdk. |
| apps/ensapi/src/lib/protocol-acceleration/get-records-from-index.ts | Switches core types/constants to enssdk. |
| apps/ensapi/src/lib/protocol-acceleration/get-primary-name-from-index.ts | Switches reverse-name helpers/types to enssdk. |
| apps/ensapi/src/lib/protocol-acceleration/find-resolver.ts | Splits ENS helpers/types to enssdk vs ensnode-sdk-specific helpers. |
| apps/ensapi/src/lib/name-tokens/get-indexed-subregistries.ts | Switches namehash import to enssdk. |
| apps/ensapi/src/lib/name-tokens/find-name-tokens-for-domain.ts | Switches core types to enssdk. |
| apps/ensapi/src/lib/handlers/params.schema.ts | Switches core ENS constants/normalization types to enssdk. |
| apps/ensapi/src/lib/handlers/params.schema.test.ts | Switches DEFAULT_EVM_CHAIN_ID/labelhash imports to enssdk. |
| apps/ensapi/src/lib/ensanalytics/referrer-leaderboard/database.ts | Switches Address type import to enssdk. |
| apps/ensapi/src/lib/ensanalytics/referrer-leaderboard/database-v1.ts | Switches Address type import to enssdk. |
| apps/ensapi/src/handlers/api/explore/registrar-actions-api.ts | Switches Node type import to enssdk. |
| apps/ensapi/src/handlers/api/explore/name-tokens-api.ts | Switches ENS_ROOT/getParentNameFQDN/namehash imports to enssdk. |
| apps/ensadmin/src/lib/get-ensip19-supported-chain-ids.ts | Switches ChainId type import to enssdk. |
| apps/ensadmin/src/lib/default-records-selection.ts | Switches CoinType and coin-type helpers to enssdk. |
| apps/ensadmin/src/components/nav-main.tsx | Switches UrlString type import to enssdk. |
| apps/ensadmin/src/components/name-links/index.tsx | Switches Name type import to enssdk. |
| apps/ensadmin/src/components/indexing-status/indexing-timeline.tsx | Switches ChainId type import to enssdk. |
| apps/ensadmin/src/components/indexing-status/block-refs.tsx | Switches ChainId type import to enssdk. |
| apps/ensadmin/src/app/name/page.tsx | Switches Name type import to enssdk. |
| apps/ensadmin/src/app/name/_components/ProfileHeader.tsx | Switches Name type import to enssdk. |
| apps/ensadmin/src/app/name/_components/NameDetailPageContent.tsx | Switches Name type import to enssdk. |
| apps/ensadmin/src/app/mock/registrar-actions/mocks.ts | Switches InterpretedName type import to enssdk. |
| apps/ensadmin/src/app/mock/display-identity/page.tsx | Switches core types/constants to enssdk. |
| apps/ensadmin/src/app/inspect/records/page.tsx | Switches Name type import to enssdk. |
| apps/ensadmin/src/app/inspect/primary-names/page.tsx | Switches Address type import to enssdk. |
| apps/ensadmin/src/app/inspect/primary-name/page.tsx | Switches Address/DefaultableChainId/DEFAULT_EVM_CHAIN_ID imports to enssdk. |
| apps/ensadmin/src/app/inspect/_lib/example-names.ts | Switches Name type import to enssdk. |
| apps/ensadmin/src/app/inspect/_lib/example-addresses.ts | Switches Address/Name type imports to enssdk. |
| apps/ensadmin/src/app/@breadcrumbs/name/page.tsx | Switches Name type import to enssdk. |
| apps/ensadmin/src/app/@breadcrumbs/inspect/records/page.tsx | Switches Name type import to enssdk. |
| apps/ensadmin/src/app/@actions/name/page.tsx | Switches Name type import to enssdk. |
| apps/ensadmin/package.json | Adds direct enssdk dependency. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
packages/enssdk/src/lib/reverse-name.ts:4
reverseName/addrReverseLabelassumes the providedAddressis already fully lowercase (and slices it directly), butAddressvalues in typical viem usage are often checksummed/mixed-case. This can produce non-canonical ENSIP-19 reverse names and will fail to round-trip withparseReverseName(which lowercases). Consider normalizingaddressto lowercase insidereverseName/addrReverseLabel(or tightening the param type to a lowercase-address type and enforcing it at runtime).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ssdk migrates remaining labelhash and namehash imports from "viem" to "enssdk" across the monorepo. also updates enssdk internals (constants.ts, interpreted-names-and-labels.ts) to use their own wrappers instead of importing directly from viem. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…om enssdk updates code examples in ensapi client.ts jsdoc, datasources README, and doc site .mdx files to import namehash/labelhash from enssdk instead of viem. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
moves asLowerCaseAddress from ensnode-sdk/shared/address.ts to enssdk/src/lib/address.ts. updates all call sites to import from "enssdk". removes the inlined version in parse-reverse-name.ts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
updates ensnode-sdk (14 files) and enskit (1 file) to import Address and Hex types from enssdk instead of viem. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 254 files, which is 104 over the limit of 150. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (254)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 250 out of 255 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Substantial PR
Reviewer Focus (Read This First)
the import splitting across ~200 files is mechanical, but worth spot-checking to make sure no symbols ended up on the wrong side of the
enssdk/@ensnode/ensnode-sdkboundary. the new typed wrappers (namehash,labelhash) inenssdk/src/lib/labelhash.tsandnamehash.tscoexist withlabelhashLiteralLabel— confirm the naming/semantics are clear.Problem & Motivation
closes #1878
core ENS utilities (constants, labelhash, normalization, interpretation, coin-type, dns-encoding, reverse-name, etc.) lived in
@ensnode/ensnode-sdkbut belong inenssdk— the foundational library. external consumers shouldn't needensnode-sdkfor basic ENS operations.additionally,
ensnode-sdk/src/ens/index.tshad a blanketexport * from "enssdk"that hid the dependency boundary — consumers couldn't tell which symbols came from which package.What Changed (Concrete)
ensnode-sdk→enssdk/src/lib/: labelhash, encode-labelhash, is-normalized, coin-type, parse-labelhash, constants, dns-encoded-name, names, reverse-name, parse-reverse-name, interpreted-names-and-labelsshared/labelhash.ts,ens/labelhash.ts, andens/encode-labelhash.tsinto a singleenssdk/src/lib/labelhash.tsnamehash(Name) → Nodeandlabelhash(Label) → LabelHashin enssdkAddressandHexfrom viem inenssdk/src/lib/types/evm.tsasLowerCaseAddressfromensnode-sdk/shared/address.tstoenssdk/src/lib/address.tsexport * from "enssdk"fromensnode-sdk/src/ens/index.ts"enssdk"directly — includingAddress/Hex,namehash/labelhash, andasLowerCaseAddressensapi/client.tsand doc site.mdx/README files to importnamehash/labelhashfrom enssdkenssdkas dependency to 7 packages that previously got enssdk types transitively: ensadmin, ensrainbow, ensdb-sdk, ensnode-react, ensrainbow-sdk, ens-referrals, namehash-ui@adraffy/ens-normalizeas dependency of enssdk (needed bybeautifyName)Design & Planning
.claude/plans/effervescent-foraging-walrus.mdSelf-Review
parseAssetIdandparseAccountIdwere incorrectly moved to enssdk imports (they're ensnode-sdk functions, not enssdk) — caught during typecheck and fixed. several ensv2 types (DomainId,PermissionsId,RegistrationId, etc.) were initially missed by the import migration agents — caught during typecheck and fixed.Cross-Codebase Alignment
from "@ensnode/ensnode-sdk",from "enssdk",from "viem"(for Address/Hex/namehash/labelhash), all enssdk type namesens/fuses.ts,ens/subname-helpers.ts,shared/interpretation/reinterpretation.ts,shared/interpretation/interpret-record-values.ts— intentionally stay in ensnode-sdk@ensnode/datasourcesstill importsAddressfrom viem (doesn't depend on enssdk)Downstream & Consumer Impact
enssdkgains all migrated exports.@ensnode/ensnode-sdkno longer re-exports enssdk's full surface — consumers that depended on this transitive re-export must now depend onenssdkdirectly.ensapi/client.ts, datasources README, and doc site.mdxfiles updated to import from enssdklabelhash(typed viem wrapper, handles encoded labelhashes) vslabelhashLiteralLabel(keccak256 of literal bytes, no encoded labelhash handling) coexist inlabelhash.tsTesting Evidence
pnpm typecheck— all packages passpnpm lint— cleanpnpm test— 1325/1325 tests pass across 117 test filesScope Reductions
interpretNamehelper deferred — not included per discussionens/subname-helpers.tsstays in ensnode-sdk for now@ensnode/datasourcesstill importsAddressfrom viem (doesn't depend on enssdk)Risk Analysis
Pre-Review Checklist (Blocking)
🤖 Generated with Claude Code