Cardano Signature Verification
A lightweight typescript library to verify a cip30 datasignature
Getting Started
npm i @cardano-foundation/cardano-signature-verification
Verification
You need a key and a signature from a cip30 datasignature. Use e.g. window.cardano."wallet_name".enable().then(api => api.signData(...))
or the signMessage function of the cardano-connect-with-wallet library to get a valid key and signature.
The plain message and/or the readable address can be provided for testing optionally. Checkout this examples.
verifySignature: (
signature: string,
key: string,
message?: string,
address?: string
) => boolean;