Skip to content

chore(sdk): drop unused EIP-712 schemas from signatureSchemas - #14551

Merged
rickyrombo merged 2 commits into
mainfrom
chore/sdk-drop-dead-signature-schemas
Aug 7, 2026
Merged

chore(sdk): drop unused EIP-712 schemas from signatureSchemas#14551
rickyrombo merged 2 commits into
mainfrom
chore/sdk-drop-dead-signature-schemas

Conversation

@rickyrombo

Copy link
Copy Markdown
Contributor

Found while adding EIP-712 upload signing in #14550. Independent of that stack.

packages/sdk/src/sdk/utils/signatureSchemas.ts 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 sdk/index.ts re-exports only parseParams, rendezvous, errors, and hashId — 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 chainId and verifyingContract, and typing userId as uint rather than uint256. That last one 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 before checking whether anything used it.

Renamed to nonce.ts

Two reasons. It matches what is left, and there is a live packages/libs/src/data-contracts/signatureSchemas.js — used by identity-service/rateLimiter, AudiusABIDecoder, and libs' own EntityManagerClient. 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/sdk and packages/common typecheck clean, the SDK builds, and the EntityManager tests pass.

🤖 Generated with Claude Code

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-bot

changeset-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d4a3ff6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@audius/sdk Patch
@audius/sdk-legacy Patch
@audius/protocol-dashboard Patch
@audius/sp-actions Patch

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>
@rickyrombo
rickyrombo merged commit 075329a into main Aug 7, 2026
15 checks passed
@rickyrombo
rickyrombo deleted the chore/sdk-drop-dead-signature-schemas branch August 7, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant