Migrating to v2
TypeScript v2
Last updated
TypeScript v2
Last updated
If you are using siwe v1.1.6
, we encourage you to update to the latest version (2.1.x
). The following guide walks you through how to update your application.
The function validate(sig, provider)
is now deprecated and is replaced by verify(VerifyParams, VerifyOpts)
. These two new parameters accept the following fields:
The new function makes it easier to match fields automatically - like domain
, nonce
and match against other TimeDate instead of now (time
).
The return type was also modified. It now returns a SiweResponse
instead of a SiweMessage
, and this new object is defined by the following interface:
As part of the new API, new error types were introduced to clarify when a message fails verification. These errors are defined at:
More information regarding the rationale behind the API Harmonization and TypeScript v2.0 beta release can be found here: