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