Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"ox": "^0.14.45"
"ox": "^1.8.13"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must: ox 1.x changes the P-256 shapes this package uses, and this bump does not migrate them, so CI fails on typecheck and 12 P-256 tests fail. At runtime it is worse: P256.noble.ProjectivePoint no longer exists (noble v2 renamed it to Point), and the catch in oxPublicKey (src/p256.ts:43) turns that into "P-256 public key is not a point on the curve", so every valid key is rejected. ox 1.0.0 also moved x, y, r and s from bigint to 32-byte padded hex.

Code to migrate: src/p256.ts L43, L60, L68-69, L87-88; src/signatures.ts L226-230; test/p256.test.ts L86-95.

Suggestion: use P256.noble.Point.fromHex, type the key as ReturnType<typeof P256.getPublicKey<'Object'>>, concat point.x, point.y, r and s directly, and pass hex x/y plus numberToHex(r|s, { size: 32 }) to P256.verify. With that change typecheck, all 373 tests and the build pass, and addresses, public keys and signatures match the current release on 5000 deterministic keys, including keys with a leading zero byte. This migration is in #62.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should: ox 0.14.45 shipped with an npm provenance attestation and 1.8.13 does not; no 1.x release before 1.8.15 is attested. The publisher is the same trusted GitHub workflow and the tarball source matches the ox@1.8.13 tag, so this is not a compromise signal, but it lowers what we can verify.

Suggestion: target ^1.8.16 instead. It is attested, past the 7 day release age gate, and its P-256 code is the same as 1.8.13.

},
"peerDependencies": {
"viem": "^2.21.0"
Expand Down
Loading