aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extension/background/emscriptif.ts31
-rw-r--r--extension/manifest.json2
2 files changed, 21 insertions, 12 deletions
diff --git a/extension/background/emscriptif.ts b/extension/background/emscriptif.ts
index e8c9e0cec..b5b040dc5 100644
--- a/extension/background/emscriptif.ts
+++ b/extension/background/emscriptif.ts
@@ -16,17 +16,17 @@
"use strict";
-declare var Module: any;
-
-
-// Size of a native pointer.
-const PTR_SIZE = 4;
-
-const GNUNET_OK = 1;
-const GNUNET_YES = 1;
-const GNUNET_NO = 0;
-const GNUNET_SYSERR = -1;
+declare var Module: EmscModule;
+interface EmscModule {
+ cwrap: EmscFunGen;
+ _free(ptr: number);
+ _malloc(n: number): number;
+ Pointer_stringify(p: number, len?: number): string;
+ getValue(ptr: number, type: string, noSafe?: boolean): number;
+ setValue(ptr: number, value: number, type: string, noSafe?: boolean);
+ writeStringToMemory(s: string, buffer: number, dontAddNull?: boolean);
+}
interface EmscFunGen {
(name: string,
@@ -43,6 +43,16 @@ interface EmscFunGen {
args: string[]): ((...x: (number|string)[]) => string);
}
+
+// Size of a native pointer.
+const PTR_SIZE = 4;
+
+const GNUNET_OK = 1;
+const GNUNET_YES = 1;
+const GNUNET_NO = 0;
+const GNUNET_SYSERR = -1;
+
+
let getEmsc: EmscFunGen = (...args) => Module.cwrap.apply(null, args);
var emsc = {
@@ -268,7 +278,6 @@ class SyncArena extends DefaultArena {
}
}
-
let arenaStack: Arena[] = [];
arenaStack.push(new SyncArena());
diff --git a/extension/manifest.json b/extension/manifest.json
index 764c88789..e56704083 100644
--- a/extension/manifest.json
+++ b/extension/manifest.json
@@ -2,7 +2,7 @@
"description": "Privacy preserving and transparent payments",
"manifest_version": 2,
"name": "GNU Taler Wallet",
- "version": "0.4",
+ "version": "0.5",
"applications": {
"gecko": {