Skip to content

decode: add BigInt and BigInt[] support#28

Merged
kubo39 merged 1 commit into
mainfrom
decode-bigint
Jan 27, 2026
Merged

decode: add BigInt and BigInt[] support#28
kubo39 merged 1 commit into
mainfrom
decode-bigint

Conversation

@kubo39

@kubo39 kubo39 commented Jan 27, 2026

Copy link
Copy Markdown
Owner

fixes #5

@kubo39 kubo39 self-assigned this Jan 27, 2026
@kubo39 kubo39 mentioned this pull request Jan 27, 2026
2 tasks
@kubo39
kubo39 requested a review from Copilot January 27, 2026 20:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds RLP decoding support for BigInt and BigInt[] to complement the existing encoding support and ensure symmetry between encode and decode.

Changes:

  • Extend isRlpDecodable to recognize BigInt and BigInt[] as decodable types.
  • Add a decode!BigInt branch that decodes scalar RLP values into BigInt using the same big-endian magnitude semantics as encode(BigInt).
  • Allow BigInt elements in the generic array-decoding path and add unit tests for BigInt and BigInt[] decoding (including error cases).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kubo39
kubo39 merged commit e7f8264 into main Jan 27, 2026
9 checks passed
@kubo39
kubo39 deleted the decode-bigint branch January 27, 2026 20:46
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.

Support BigInt

2 participants