Skip to content

🐛 fix: Validate topic format in EventLog.from()#277

Merged
roninjin10 merged 1 commit intomainfrom
fix/issue-91-log-from
Jan 4, 2026
Merged

🐛 fix: Validate topic format in EventLog.from()#277
roninjin10 merged 1 commit intomainfrom
fix/issue-91-log-from

Conversation

@roninjin10
Copy link
Contributor

Summary

Test plan

  • Valid 32-byte topics accepted
  • Empty topics array accepted
  • Too short topics rejected
  • Too long topics rejected
  • Non-Uint8Array rejected

🤖 Generated with Claude Code

EventLog.create/from now validates that all topics are exactly 32 bytes
(valid Hash type). Throws InvalidLengthError with detailed context if
any topic has incorrect length or is not a Uint8Array.

Fixes #91

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
dist Error Error Jan 4, 2026 11:32am
voltaire Error Error Jan 4, 2026 11:32am

@roninjin10 roninjin10 merged commit 8721a7d into main Jan 4, 2026
19 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Log.from() doesn't validate topic format

1 participant