Module Olm.Account
module IdentityKeys : sig ... endmodule OneTimeKeys : sig ... endtype t={buf : char Ctypes_static.ptr;acc : C.Types.Account.t Ctypes_static.ptr;}
val clear : C.Types.Account.t Ctypes_static.ptr -> (int, [> `OlmError ]) Core.resultclear accClear memory backing the given account pointer.
val check_error : t -> Unsigned.Size_t.t -> (int, [> OlmError.t ]) Core.resultcheck_error t retCheck whether return code
retis equal to `olm_error()` ( -1 ), returning the return value as an int if not, and the `last_error` from the accounttif so.
val alloc : unit -> talloc ()Allocate an
C.Types.Account.tand return the pointers in at.
val create : unit -> (t, [> OlmError.t ]) Core.resultcreate ()Create a new Olm account, and its matching identity key pair. If there weren't enough random bytes for the account creation the error will be
`NotEnoughRandom.
val pickle : ?pass:string -> t -> (string, [> OlmError.t ]) Core.resultpickle ?pass tStores an account
tas a base64 string. Encrypts the account using the optionally supplied passphrasepass. Returns a base64 encoded string of the pickled account on success.
val from_pickle : ?pass:string -> string -> (t, [> OlmError.t | `ValueError of string ]) Core.resultfrom_pickle ?pass pickleLoads an account from a pickled base64-encoded string
pickleand returns at, decrypted with the optionally supplied passphrasepass. If the passphrase doesn't match the one used to encrypt the account then the error will be`BadAccountKey. If the base64 couldn't be decoded then the error will be`InvalidBase64.
val identity_keys : t -> (IdentityKeys.t, [> OlmError.t | `YojsonError of string ]) Core.resultidentity_keys tGet the public part of the identity keys from the account
t.
val sign : t -> string -> (string, [> OlmError.t ]) Core.resultsign t msgSigns a message with the private ed25519 identity key of the account
t, returning the signature.
val max_one_time_keys : t -> (int, [> OlmError.t ]) Core.resultmax_one_time_keys tThe maximum number of one-time keys the account
tcan store.
val mark_keys_as_published : t -> (int, [> OlmError.t ]) Core.resultmark_keys_as_published tMark the current set of one-time keys in account
tas being published.
val generate_one_time_keys : t -> int -> (int, [> OlmError.t ]) Core.resultgenerate_one_time_keys t nGenerate
nnew one-time keys. If the total number of keys stored by this account exceedsmax_one_time_keys tthen the old keys are discarded.
val one_time_keys : t -> (OneTimeKeys.t, [> OlmError.t | `YojsonError of string ]) Core.resultone_time_keys tGet the public part of the one-time keys for the account
t.