Skip to content

4.0.0

Latest
Compare
Choose a tag to compare
@JustinBeckwith JustinBeckwith released this 13 Jun 23:36
· 5 commits to main since this release
834c255

Welcome to 4.0! This release includes new features and a couple of breaking changes.

Breaking Changes

Node.js 18.4 and up required

Support for previous versions of node.js have been dropped. This isn't a soft break - we now rely on the Ed25519 algorithm in subtlecrypto, which is only available in versions 18.4 and up.

verifyKey is now async

Due to the dependency on subtle crypto, the verifyKey method is now async. Make sure to use an await when evaluating the result of verifyKey. See #73 to learn more.

const signature = req.get('X-Signature-Ed25519');
const timestamp = req.get('X-Signature-Timestamp');
const isValid = await verifyKey(req.rawBody, signature, timestamp, 'MY_CLIENT_PUBLIC_KEY');

Features

  • Added ButtonStyleTypes.Premium #55
  • The library should be significantly faster due to dropping the dependency on tweetnacl