HomePhabricator
Diffusion Comm b5559ffbc9fc

[crypto] implement getting one-time keys in `OlmAPI`

Description

[crypto] implement getting one-time keys in OlmAPI

Summary:
Shared code to get one-time keys on the web and native.

According to this comment marking keys as published right before calling Identity.

The web part should match the native C++ code implemented in D10977 (despite one change - see inline comment below).

This code should return one-time keys in a short format - calling Identity in the next diff in the stack.

Depends on D11112

Test Plan:
Call this code on both web and native:

const { olmAPI } = getConfig();
 await olmAPI.initializeCryptoAccount();
 const keys = await olmAPI.getOneTimeKeys(10);
 console.log(keys);

Reviewers: marcin, varun, tomek

Reviewed By: varun, tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D11119

Details

Provenance
kamilAuthored on Feb 20 2024, 5:28 AM
Reviewer
varun
Differential Revision
D11119: [crypto] implement getting one-time keys in `OlmAPI`
Parents
rCOMMa49cc2b6b26f: [crypto] implement creating `olm` inbound session
Branches
Unknown
Tags
Unknown