* Bump rust sdk to 14.0.0
* Remove duplicate type declarations
These now match the types in the underlying library, so can be removed.
* bump to 14.0.1
* Use new `OutgoingRequest` type from wasm library
* fix types
* update lockfile
* Rust crypto: handle the SAS verifier being replaced
* lint
* make changes from review
* apply changes from code review
* remove useless assertions
* wrap acceptance inside a try-catch, and factor out acceptance into a function
* fix bugs
* we don't actually need the .accept variable
* move setInner to inside SAS class, and rename to replaceInner
* use defer to avoid using a closure
* lint
* prettier
* use the right name
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* combine onChangeCallback with onChange
* apply changes from review
* add test for QR code verification, and try changing order in onChange
* lint
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Process all verification event
* Add test for `isVerificationEvent`
* Review changes
* Remove null comparison and add doc to remote echo
* review changes
* Offer `m.qr_code.scan.v1` verification method by default
Normally, the application specifies the supported verification methods when
creating the MatrixClient (and matrix-react-sdk does so). If the application
leaves it unset, then the idea is that the js-sdk offers all known verification
methods.
However, by default, the rust-sdk doesn't specify `m.qr_code.scan.v1`. So
basically, we need to set our own list of supported methods, rather than
relying on the rust-sdk's defaults.
* Factor out base class from `RustSASVerifier`
* Implement QR code scanning
* Update src/rust-crypto/verification.ts
* implement `VerificationRequest.pending`
* Implement `VerificationRequest.timeout`
* Rust crypto: allow using a memory store (#3536)
* Rust crypto: allow using a memory store
It turns out that, for some usecases (in particular, "bot users" for cypress
tests), we don't need persistent storage and an in-memory store will be fine.
* Rust crypto: use a memory store for the unit tests
* Pass `supportedVerificationMethods` into `VerificationRequest`
... so that the application can later call `accept()` and we know what to send.
* Implement `VerificationRequest.accept`
* Implement `VerificationRequest.declining`
* Update src/rust-crypto/verification.ts
* integ tests: factor out some utility methods
* Add `VerificationRequest.startVerification` to replace `beginKeyVerification`
The rust SDK ties together creating the verifier and sending the
`m.key.verification.start` message, so we need to combine
`.beginKeyVerification` and `.verify`.
* add some unit tests