|
- Add the `verifyDigiIDCallback` async function to `src/digiid.ts`.
- Parses the received DigiID URI to extract nonce, callback details, and unsecure flag.
- Validates the callback URL path and scheme against expected values.
- Optionally validates the received nonce against the expected nonce.
- Utilizes the 'digibyte-message' library (via require) to perform cryptographic signature verification of the URI against the provided address.
- Throws specific `DigiIDError` exceptions for various validation and verification failures (e.g., invalid URI, URL mismatch, nonce mismatch, invalid signature).
- Returns a `DigiIDVerificationResult` upon successful verification.
- Imports necessary types and the CommonJS `digibyte-message` dependency.
|