aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2020-04-24 17:44:28 -0400
committerHubert Chathi <hubert@uhoreg.ca>2020-04-24 17:44:28 -0400
commitf409b69e889038393dc5992e01e58843f335e8aa (patch)
treeb5a0082a92ae9e2aced2b727d454f2fa73130982
parent954d6f98ebd13efa275cace915e3a3a52c063915 (diff)
add declarations for Inbound/OutboundGroupSession
-rw-r--r--javascript/index.d.ts25
1 files changed, 25 insertions, 0 deletions
diff --git a/javascript/index.d.ts b/javascript/index.d.ts
index 2bf756a..44041e3 100644
--- a/javascript/index.d.ts
+++ b/javascript/index.d.ts
@@ -59,6 +59,31 @@ declare class Utility {
ed25519verify(key: string, message: string, signature: string): void;
}
+declare class InboundGroupSession {
+ constructor();
+ free(): void;
+ pickle(key: string): string;
+ unpickle(key: string, pickle: string): string;
+ create(session_key: string): string;
+ import_session(session_key: string): string;
+ decrypt(message: string): object;
+ session_id(): string;
+ first_known_index(): number;
+ export_session(message_index: number): string;
+}
+
+declare class OutboundGroupSession {
+ constructor();
+ free(): void;
+ pickle(key: string): string;
+ unpickle(key: string): string;
+ create(): void;
+ encrypt(plaintext: string): string;
+ session_id(): string;
+ session_key(): string;
+ message_index(): number;
+}
+
declare class PkEncryption {
constructor();
free(): void;