Update javascript/index.d.ts

This commit is contained in:
Michael Telatynski 2022-11-18 13:56:16 +00:00 committed by Hubert Chathi
parent 6d767aaf29
commit 722f4df4aa

20
javascript/index.d.ts vendored
View file

@ -18,28 +18,28 @@ export as namespace Olm;
declare class Account {
constructor();
free();
create();
free(): void;
create(): void;
identity_keys(): string;
sign(message: string | Uint8Array): string;
one_time_keys(): string;
mark_keys_as_published();
mark_keys_as_published(): void;
max_number_of_one_time_keys(): number;
generate_one_time_keys(number_of_keys: number);
remove_one_time_keys(session: Session);
generate_fallback_key();
generate_one_time_keys(number_of_keys: number): void;
remove_one_time_keys(session: Session): void;
generate_fallback_key(): void;
fallback_key(): string;
unpublished_fallback_key(): string;
forget_old_fallback_key(): void;
pickle(key: string | Uint8Array): string;
unpickle(key: string | Uint8Array, pickle: string);
unpickle(key: string | Uint8Array, pickle: string): void;
}
declare class Session {
constructor();
free(): void;
pickle(key: string | Uint8Array): string;
unpickle(key: string | Uint8Array, pickle: string);
unpickle(key: string | Uint8Array, pickle: string): void;
create_outbound(
account: Account, their_identity_key: string, their_one_time_key: string,
): void;
@ -67,7 +67,7 @@ declare class InboundGroupSession {
constructor();
free(): void;
pickle(key: string | Uint8Array): string;
unpickle(key: string | Uint8Array, pickle: string);
unpickle(key: string | Uint8Array, pickle: string): void;
create(session_key: string): string;
import_session(session_key: string): string;
decrypt(message: string): object;
@ -80,7 +80,7 @@ declare class OutboundGroupSession {
constructor();
free(): void;
pickle(key: string | Uint8Array): string;
unpickle(key: string | Uint8Array, pickle: string);
unpickle(key: string | Uint8Array, pickle: string): void;
create(): void;
encrypt(plaintext: string): string;
session_id(): string;