chore(sdk): drop unused EIP-712 schemas from signatureSchemas - #14551
Merged
Conversation
The file exported `domains`, `types`, and `generators` alongside `getNonce`, but only `getNonce` has ever been imported — EntityManagerClient builds its typed data from the contract package's `EntityManager.types` instead, and nothing re-exports this module from the SDK's public surface. The rest is unreachable. Deleting it is not really about the line count. It is an attractive nuisance: it is the first thing you find when adding EIP-712 signing to the SDK, and what you find is the wrong definition — contract-shaped with chainId and verifyingContract, and typing userId as `uint` rather than `uint256`, which is what the `@ts-ignore Need to update this type to "uint32" instead of "uint"` in EntityManagerClient is working around. I reached for it myself while adding upload signing before checking whether anything used it. Renamed to nonce.ts to match what is left, and because a live `data-contracts/signatureSchemas.js` still exists in packages/libs — used by identity-service, AudiusABIDecoder, and libs' own EntityManagerClient. That one is untouched; having two files with the same name where one is dead invites editing the wrong one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: d4a3ff6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Found while adding EIP-712 upload signing in #14550. Independent of that stack.
packages/sdk/src/sdk/utils/signatureSchemas.tsexporteddomains,types, andgeneratorsalongsidegetNonce, but onlygetNoncehas ever been imported.EntityManagerClientbuilds its typed data from the contract package'sEntityManager.typesinstead, andsdk/index.tsre-exports onlyparseParams,rendezvous,errors, andhashId— not this module. So the rest is unreachable, and removing it is not a breaking change.Why bother
Not the line count. It is an attractive nuisance: it is the first thing you find when adding EIP-712 signing to the SDK, and what you find is the wrong definition — contract-shaped with
chainIdandverifyingContract, and typinguserIdasuintrather thanuint256. That last one is what the// @ts-ignore Need to update this type to "uint32" instead of "uint"inEntityManagerClientis working around.I reached for it myself before checking whether anything used it.
Renamed to
nonce.tsTwo reasons. It matches what is left, and there is a live
packages/libs/src/data-contracts/signatureSchemas.js— used byidentity-service/rateLimiter,AudiusABIDecoder, and libs' ownEntityManagerClient. That one is untouched here. Two files with the same name where one is dead invites editing the wrong one; I conflated them myself at first.Verification
packages/sdkandpackages/commontypecheck clean, the SDK builds, and the EntityManager tests pass.🤖 Generated with Claude Code