Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ABNF parser rewrite #213

Merged
merged 23 commits into from
Jan 21, 2025
Merged

ABNF parser rewrite #213

merged 23 commits into from
Jan 21, 2025

Conversation

chunningham
Copy link
Contributor

Builds on pr #200 and fixes some minor issues. We acknowledge the excellent work of ldthomas and thank them for their significant contribution. This PR is intended to prevent losing it, not to co-opt.

Closes issues:

ldthomas and others added 15 commits April 29, 2024 09:59
…s and valid-url. Added many new unit tests for validating both the message URI and the resource URIs. Added a script to re-generate the ABNF grammar object whenever the ABNF grammar needs to be changed.
… is the newly published version 4.4.0, 2)the script "apg" will generate a typescript grammar object from the ABNF grammar siwe-abnf.txt. Added an optional "doTrace" parameter to the constructor of ParsedMessage. The default is "false". If set to "true" apg-js will trace the parse tree of parsed message and write it to output/siwe-parser-trace.html. Consequently the output directory has been added to ".gitignore" and ".npmignore".
…dded "packages/siwe-parser/lib/t-isUri.test.ts" for unit testing of the "isUri" function. Added tests in the object block of the “SiweMessage” constructor for testing the EIP-55 address, the URI and the resources URIs. Added “packages/siwe/lib/objects.test.ts” for unit testing of the object block.
… as the syntax of date times. Removed the SiweMessage private function validateMessage(). Replaced it in the message object block of the constructor by parsing the stringified message object. In this way both the message and the message object get exactly the same validation. Fixed a bug for the case of an empty statement in the function toMessage().
@chunningham chunningham requested a review from w4ll3 November 25, 2024 15:28
@w4ll3 w4ll3 merged commit cfe87ba into main Jan 21, 2025
10 checks passed
@w4ll3 w4ll3 deleted the abnf-rewrite branch January 21, 2025 16:01
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.

3 participants