aboutsummaryrefslogtreecommitdiff
path: root/javascript/index.d.ts
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2020-09-01 15:57:20 -0400
committerHubert Chathi <hubert@uhoreg.ca>2020-09-01 15:57:20 -0400
commitc45f19f12d3da498075970586a37aed7aaafda5a (patch)
tree27302fc28d6b89a12fb97f861c949f52ec5dd171 /javascript/index.d.ts
parent171044f3fca084bd1c5c1f8f4bfe146434b07f0b (diff)
parent89050dc0b68f0d5f1bf9f9f386f7c2f4ac043f4f (diff)
Merge branch 'master' into uhoreg/fallback
Diffstat (limited to 'javascript/index.d.ts')
-rw-r--r--javascript/index.d.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/javascript/index.d.ts b/javascript/index.d.ts
index 9d101a8..e558fec 100644
--- a/javascript/index.d.ts
+++ b/javascript/index.d.ts
@@ -21,7 +21,7 @@ declare class Account {
free();
create();
identity_keys(): string;
- sign(message: string): string;
+ sign(message: string | Uint8Array): string;
one_time_keys(): string;
mark_keys_as_published();
max_number_of_one_time_keys(): number;
@@ -36,8 +36,8 @@ declare class Account {
declare class Session {
constructor();
free(): void;
- pickle(key: string): string;
- unpickle(key: string, pickle: string);
+ pickle(key: string | Uint8Array): string;
+ unpickle(key: string | Uint8Array, pickle: string);
create_outbound(
account: Account, their_identity_key: string, their_one_time_key: string,
): void;
@@ -57,8 +57,8 @@ declare class Session {
declare class Utility {
constructor();
free(): void;
- sha256(input: string): string;
- ed25519verify(key: string, message: string, signature: string): void;
+ sha256(input: string | Uint8Array): string;
+ ed25519_verify(key: string, message: string | Uint8Array, signature: string): void;
}
declare class InboundGroupSession {
@@ -99,8 +99,8 @@ declare class PkDecryption {
init_with_private_key(key: Uint8Array): string;
generate_key(): string;
get_private_key(): Uint8Array;
- pickle(key: string): string;
- unpickle(key: string, pickle: string): string;
+ pickle(key: string | Uint8Array): string;
+ unpickle(key: string | Uint8Array, pickle: string): string;
decrypt(ephemeral_key: string, mac: string, ciphertext: string): string;
}
@@ -122,6 +122,6 @@ declare class SAS {
calculate_mac_long_kdf(input: string, info: string): string;
}
-export function init(): Promise<void>;
+export function init(opts?: object): Promise<void>;
export function get_library_version(): [number, number, number];