gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-wallet-webex] branch master updated (204c10c0 -> 54f


From: gnunet
Subject: [GNUnet-SVN] [taler-wallet-webex] branch master updated (204c10c0 -> 54fec752)
Date: Mon, 19 Aug 2019 13:30:52 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a change to branch master
in repository wallet-webex.

    from 204c10c0 we don't use rollup, delete the dependency
     new da6b6e10 android support skeleton
     new 54fec752 more standardized binaries, better README

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README               | 46 ++++++++++++++++++++++++--------------
 bin/taler-wallet-cli |  2 ++
 package.json         |  8 ++++++-
 src/android/index.ts | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/index.ts         |  1 +
 yarn.lock            | 24 --------------------
 6 files changed, 102 insertions(+), 42 deletions(-)
 create mode 100755 bin/taler-wallet-cli
 create mode 100644 src/android/index.ts

diff --git a/README b/README
index ece8c2fb..f2256cc4 100644
--- a/README
+++ b/README
@@ -1,34 +1,46 @@
 GNU Taler Wallet
 ================
 
-Cross-browser GNU Taler wallet written for the WebExtensions API.
+This package implements a wallet for GNU Taler in TypeScript.
 
+It can be run on different platforms:
+1. As a cross-browser extension, written for the WebExtension API
+2. As a Node.JS package
 
-Installation
+
+Dependencies
 ============
 
+Dependencies are managed as NPM dependencies.  For performance reasons,
+we use `yarn' as a replacement for `npm' in the build system.
+
+For cryptographic operations, the wallet uses an emscripten-compiled
+library.  The binary files for this library are in `./emscripten'.
+The instructions for building this binary from scrach can be found
+in the libtaler-emscripten repository:
+
+https://git.taler.net/libtalerutil-emscripten.git/
+
+
+Building from source (Web Extension)
+======================================
+
 Run `./configure && make' to create an archive
 containing the extension in ./build/taler-wallet-$VERSION.zip
 
-Dependencies
-============
 
-See thirdparty/README for a list of dependencies that are checked into this
-repository as a git subtree.
+Building from source (Node.JS)
+======================================
 
-This project also has the following third-party runtime dependencies, which
-are checked in compiled or minified form:
-- React (Facebook Inc., BSD License)
+Run `./configure && make tsc' to build the wallet.  The command line
+interface for the wallet is available in `./bin/taler-wallet-cli'.
 
 
-Emscripten compiled dependencies:
-* libgnunetutil
-* libgnunetjson
-* libgcrypt
-* libunistring
+Installation
+============
 
+To install the package permanently on your system, run:
 
-Documentation
-=============
+$ npm install -g --prefix $PREFIX .
 
-See the documentation at http://doc.taler.net/dev-wallet-wx.html
+The binaries will be installed to `$PREFIX/bin'.
diff --git a/bin/taler-wallet-cli b/bin/taler-wallet-cli
new file mode 100755
index 00000000..1dbf05a0
--- /dev/null
+++ b/bin/taler-wallet-cli
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+require('../dist/node/headless/taler-wallet-cli.js')
diff --git a/package.json b/package.json
index 555e97e2..3cb44a0c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "taler-wallet",
-  "version": "0.6.1",
+  "version": "0.6.2",
   "description": "",
   "main": "dist/node/index.js",
   "repository": {
@@ -9,6 +9,12 @@
   },
   "author": "Florian Dold",
   "license": "GPL-3.0",
+  "bin": {
+    "taler-wallet-cli": "./bin/taler-wallet-cli"
+  },
+  "scripts": {
+    "build": "make tsc"
+  },
   "devDependencies": {
     "@types/moment": "^2.13.0",
     "@types/react": "^16.4.0",
diff --git a/src/android/index.ts b/src/android/index.ts
new file mode 100644
index 00000000..3e7eeb64
--- /dev/null
+++ b/src/android/index.ts
@@ -0,0 +1,63 @@
+/*
+ This file is part of GNU Taler
+ (C) 2019 GNUnet e.V.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
+ */
+
+/**
+ * Imports.
+ */
+import { Wallet } from "../wallet";
+import { getDefaultNodeWallet } from "../headless/helpers";
+
+
+class AndroidWalletHelper {
+  wallet: Wallet | undefined;
+  constructor (private sendMessage: (m: any) => void) {
+  }
+
+  async init() {
+    this.wallet = await getDefaultNodeWallet();
+  }
+}
+
+export function installAndroidWalletListener() {
+  // @ts-ignore
+  const sendMessage: (m: any) => void = global.__akono_sendMessage;
+  if (typeof sendMessage !== "function") {
+    const errMsg = "FATAL: cannot install android wallet listener: akono 
functions missing";
+    console.error(errMsg);
+    throw new Error(errMsg);
+  }
+  const walletHelper = new AndroidWalletHelper(sendMessage);
+  const onMessage = (msg: any) => {
+    const operation = msg.operation;
+    if (typeof operation !== "string") {
+      console.error("message to android wallet helper must contain operation 
of type string");
+      return;
+    }
+    switch (operation) {
+      case "init":
+        break;
+      case "getBalances":
+        break;
+      case "withdraw-testkudos":
+        break;
+      default:
+        console.error(`operation "${operation}" not understood`);
+        return;
+    }
+  };
+  // @ts-ignore
+  globalThis.__akono_onMessage = onMessage;
+}
\ No newline at end of file
diff --git a/src/index.ts b/src/index.ts
index 6b04c7e4..3a5cd949 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -20,3 +20,4 @@
 
 export { Wallet } from "./wallet";
 export { runIntegrationTest } from "./headless/integrationtest";
+export { installAndroidWalletListener } from "./android";
diff --git a/yarn.lock b/yarn.lock
index 15f01b48..ca91a090 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -332,11 +332,6 @@
   dependencies:
     "@types/filesystem" "*"
 
-"@types/estree@0.0.39":
-  version "0.0.39"
-  resolved 
"https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f";
-  integrity 
sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
-
 "@types/events@*":
   version "3.0.0"
   resolved 
"https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7";
@@ -409,11 +404,6 @@
   resolved 
"https://registry.yarnpkg.com/@types/node/-/node-11.12.0.tgz#ec5594728811dc2797e42396cfcdf786f2052c12";
   integrity 
sha512-Lg00egj78gM+4aE0Erw05cuDbvX9sLJbaaPwwRtdCdAMnIudqrQZ0oZX98Ek0yiSK/A2nubHgJfvII/rTT2Dwg==
 
-"@types/node@^12.6.9":
-  version "12.7.1"
-  resolved 
"https://registry.yarnpkg.com/@types/node/-/node-12.7.1.tgz#3b5c3a26393c19b400844ac422bd0f631a94d69d";
-  integrity 
sha512-aK9jxMypeSrhiYofWWBf/T7O+KwaiAHzM4sveCdWPn71lzUSMimRnKzhXDKfKwV1kWoBo2P1aGgaIYGLf9/ljw==
-
 "@types/prop-types@*":
   version "15.7.0"
   resolved 
"https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.0.tgz#4c48fed958d6dcf9487195a0ef6456d5f6e0163a";
@@ -631,11 +621,6 @@ acorn@^6.0.5, acorn@^6.0.7:
   resolved 
"https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f";
   integrity 
sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==
 
-acorn@^6.2.1:
-  version "6.3.0"
-  resolved 
"https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e";
-  integrity 
sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==
-
 ajv-errors@^1.0.0:
   version "1.0.1"
   resolved 
"https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d";
@@ -5560,15 +5545,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
     hash-base "^3.0.0"
     inherits "^2.0.1"
 
-rollup@^1.19.4:
-  version "1.19.4"
-  resolved 
"https://registry.yarnpkg.com/rollup/-/rollup-1.19.4.tgz#0cb4e4d6fa127adab59b11d0be50e8dd1c78123a";
-  integrity 
sha512-G24w409GNj7i/Yam2cQla6qV2k6Nug8bD2DZg9v63QX/cH/dEdbNJg8H4lUm5M1bRpPKRUC465Rm9H51JTKOfQ==
-  dependencies:
-    "@types/estree" "0.0.39"
-    "@types/node" "^12.6.9"
-    acorn "^6.2.1"
-
 run-queue@^1.0.0, run-queue@^1.0.3:
   version "1.0.3"
   resolved 
"https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47";

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]