Skip to content

Commit

Permalink
Add test vector for (invalid) mixed-case offer encoding (lightning#1217)
Browse files Browse the repository at this point in the history
The spec requires the bech32 offer encodings to be all upper- or
lowercase, but disallows mixed-case encodings.

Here, we add a test vector for this.
  • Loading branch information
tnull authored Feb 4, 2025
1 parent e92a7fa commit 5f31faa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bolt12/format-string-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
"valid": true,
"string": "LNO1PQPS7SJQPGT+ YZM3QV4UXZMTSD3JJQER9WD3HY6TSW3+ 5K7MSJZFPY7NZ5YQCN+\nYGRFDEJ82UM5WF5K2UCKYYPWA3EYT44H6TXTXQUQH7LZ5DJGE4AFGFJN7K4RGRKUAG0JSD+\r\n 5XVXG"
},
{
"comment": "Mixed case is invalid",
"valid": false,
"string": "LnO1PqPs7sJqPgTyZm3qV4UxZmTsD3JjQeR9Wd3hY6TsW35k7mSjZfPy7nZ5YqCnYgRfDeJ82uM5Wf5k2uCkYyPwA3EyT44h6tXtXqUqH7Lz5dJgE4AfGfJn7k4rGrKuAg0jSd5xVxG"
},
{
"comment": "+ must be surrounded by bech32 characters",
"valid": false,
Expand Down

0 comments on commit 5f31faa

Please sign in to comment.