[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