Skip to content

SIWE 2.1.2 Release

Compare
Choose a tag to compare
@w4ll3 w4ll3 released this 14 Oct 13:22
· 25 commits to main since this release
a9c707e

Dropping support for RegExp

Due to small inconsistencies between the ABNF grammar and the RegExp parser it was decided that it will no longer be supported and as of this version was removed. (#120)

Library improvements

With this release is now possible to extend the behavior of the verify function. Using the argument verificationFallback in the VerifyOpts object makes it possible to create a custom condition for verifying a SIWE message in case of failure (#85).

verificationFallback requires a function that has the same return as verify (Promise<SiweResponse>) and is provided with four arguments, those being:

  • params: VerifyParams: same params used in the verify call;
  • opts: VerifyOpts: same opts used in the verify call;
  • message: SiweMessage: the message currently being verified by verify;
  • EIP1271Promise: Promise<SiweResponse>: the result of the verification if the message was signed by a SmartContract Wallet.

Thanks to #99 a big performance upgrade was also possible making the library even better.

Additional tests were also introduced, additional checks and safeguards and general improvements to code quality.