Create a new IndexedDBCryptoStore
global indexedDB instance
name of db to connect to
Static
STORE_Static
STORE_Static
STORE_Static
STORE_Static
STORE_Static
STORE_Static
STORE_Static
STORE_Static
STORE_Internal
Returns true if this CryptoStore has ever been initialised (ie, it might contain data).
Implementation of CryptoStore.containsData.
Internal
Count the number of Megolm sessions in the database.
Implementation of CryptoStore.countEndToEndInboundGroupSessions.
Returns the number of end-to-end sessions in the store
An active transaction. See doTxn().
Called with the count of sessions
Internal
Delete a batch of Megolm sessions from the database.
Implementation of CryptoStore.deleteEndToEndInboundGroupSessionsBatch.
Internal
Delete a batch of Olm sessions from the database.
Implementation of CryptoStore.deleteEndToEndSessionsBatch.
Perform a transaction on the crypto store. Any store methods that require a transaction (txn) object to be passed in may only be called within a callback of either this function or one of the store functions operating on the same transaction.
'readwrite' if you need to call setter functions with this transaction. Otherwise, 'readonly'.
List IndexedDBCryptoStore.STORE_* options representing all types of object that will be accessed or written to with this transaction.
Function called with the transaction object: an opaque object that should be passed to store functions.
Optional
log: LoggerA possibly customised log
Promise that resolves with the result of the func
when the transaction is complete. If the backend is
async (ie. the indexeddb backend) any of the callback
functions throwing an exception will cause this promise to
reject with that exception. On synchronous backends, the
exception will propagate to the caller of the getFoo method.
Get the public part of the cross-signing keys (eg. self-signing key, user signing key).
An active transaction. See doTxn().
Called with the account keys object:
{ key_type: base64 encoded seed }
where key type = user_signing_key_seed or self_signing_key_seed
Retrieve the end-to-end inbound group session for a given server key and session ID
The sender's curve 25519 key
The ID of the session
An active transaction. See doTxn().
Called with A map from sessionId to Base64 end-to-end session.
Internal
Fetch a batch of Megolm sessions from the database.
Implementation of CryptoStore.getEndToEndInboundGroupSessionsBatch.
Get an object of roomId->roomInfo
for all e2e rooms in the store
An active transaction. See doTxn().
Function called with the end-to-end encrypted rooms
Retrieve a specific end-to-end session between the logged-in user and another device.
The public key of the other device.
The ID of the session to retrieve
An active transaction. See doTxn().
Called with A map from sessionId to session information object with 'session' key being the Base64 end-to-end session and lastReceivedMessageTs being the timestamp in milliseconds at which the session last received a message.
Retrieve the end-to-end sessions between the logged-in user and another device.
The public key of the other device.
An active transaction. See doTxn().
Called with A map from sessionId to session information object with 'session' key being the Base64 end-to-end session and lastReceivedMessageTs being the timestamp in milliseconds at which the session last received a message.
Internal
Fetch a batch of Olm sessions from the database.
Implementation of CryptoStore.getEndToEndSessionsBatch.
Internal
Get data on how much of the libolm to Rust Crypto migration has been done.
Implementation of CryptoStore.getMigrationState.
An active transaction. See doTxn().
Called with the private key
A key type
Mark sessions as needing to be backed up.
The sessions that need to be backed up.
Optional
txn: IDBTransactionAn active transaction. See doTxn(). (optional)
resolves when the sessions are marked
Internal
Set data on how much of the libolm to Rust Crypto migration has been done.
Implementation of CryptoStore.setMigrationState.
Ensure the database exists and is up-to-date, or fall back to a local storage or in-memory store.
This must be called before the store can be used.
resolves to either an IndexedDBCryptoStoreBackend.Backend, or a MemoryCryptoStore
Write the account pickle to the store. This requires an active transaction. See doTxn().
An active transaction. See doTxn().
The new account pickle to store.
Writes an end-to-end inbound group session to the store. If there already exists an inbound group session with the same senderCurve25519Key and sessionID, it will be overwritten.
The sender's curve 25519 key
The ID of the session
The session data structure
An active transaction. See doTxn().
Store a session between the logged-in user and another device
The public key of the other device.
The ID for this end-to-end session.
Session information object
An active transaction. See doTxn().
Write the cross-signing private keys back to the store
An active transaction. See doTxn().
The type of cross-signing private key to store
keys object as getCrossSigningKeys()
Static
existsStatic
existsUtility to check if a legacy crypto store exists and has not been migrated. Returns true if the store exists and has not been migrated, false otherwise.
An implementation of CryptoStore, which is normally backed by an indexeddb, but with fallback to MemoryCryptoStore.