Skip to content

Align receipt canonicalization/status and remove legacy ENS verify shim#8

Merged
GsCommand merged 1 commit into
mainfrom
codex/fix-defaults-in-ens.verify.ts
May 9, 2026
Merged

Align receipt canonicalization/status and remove legacy ENS verify shim#8
GsCommand merged 1 commit into
mainfrom
codex/fix-defaults-in-ens.verify.ts

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Motivation

  • Remove a fragile legacy ENS helper that defaulted to the wrong TXT key and could mislead consumers, per the fix-or-delete decision.
  • Ensure current-line receipt canonicalization is deterministic and consistent by using the shared json.sorted_keys.v1 routine.
  • Make runtime types and emitted receipts consistent by standardizing the status enum to the runtime value "success".
  • Track the lockfile to stabilize installs and keep published artifacts reproducible.

Description

  • Deleted the legacy ENS verify shim (src/ens.verify.ts) and removed its export from src/index.ts so the malformed default TXT key is not shipped.
  • Replaced the inline recursive sorter in canonicalizeReceipt with a call to canonicalizeSortedKeysV1 by importing it in src/receipt.ts to unify canonicalization logic.
  • Changed the ReceiptStatus type in src/types.ts from "ok" | "error" to "success" | "error" and updated tests and README examples to use "success".
  • Added package-lock.json, removed it from .gitignore, and rebuilt distribution artifacts under dist/ so the package output remains consistent for publishing.

Testing

  • Ran npm install successfully to populate dependencies.
  • Ran the full test script with npm test (which runs tsc as part of the pipeline) and all automated tests passed.
  • TypeScript build succeeds as part of the test run and the test-suite is green.

Codex Task

@GsCommand GsCommand merged commit 5a17e5d into main May 9, 2026
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