taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit c962e9402123900c53967c14cf809ea10576cdb8
parent 30ee3320c788129b258ed8b42f4fc63d28431e2f
Author: Florian Dold <florian.dold@gmail.com>
Date:   Mon, 29 Feb 2016 18:03:02 +0100

restructure

Diffstat:
Rextension/Makefile -> Makefile | 0
Rextension/background/main.ts -> background/main.ts | 0
Rextension/content_scripts/notify.js -> content_scripts/notify.js | 0
Rextension/content_scripts/notify.ts -> content_scripts/notify.ts | 0
Dextension/.gitignore | 9---------
Dextension/img/icon.png | 2--
Dextension/img/logo.png | 2--
Dextension/lib/vendor/jed.js | 2--
Rextension/gulpfile.js -> gulpfile.js | 0
Rextension/header.po -> header.po | 0
Dide/README | 1-
Dide/codeStyle.xml | 44--------------------------------------------
Aimg/icon.png | 2++
Rextension/img/logo-2015-medium.png -> img/logo-2015-medium.png | 0
Aimg/logo.png | 2++
Rextension/img/taler-logo-24.png -> img/taler-logo-24.png | 0
Rextension/lib/decl/chrome/chrome.d.ts -> lib/decl/chrome/chrome.d.ts | 0
Rextension/lib/decl/filesystem/filesystem.d.ts -> lib/decl/filesystem/filesystem.d.ts | 0
Rextension/lib/decl/filewriter/filewriter.d.ts -> lib/decl/filewriter/filewriter.d.ts | 0
Rextension/lib/decl/handlebars/handlebars-1.0.0.d.ts -> lib/decl/handlebars/handlebars-1.0.0.d.ts | 0
Rextension/lib/decl/handlebars/handlebars.d.ts -> lib/decl/handlebars/handlebars.d.ts | 0
Rextension/lib/decl/jquery/jquery.d.ts -> lib/decl/jquery/jquery.d.ts | 0
Rextension/lib/decl/lib.es6.d.ts -> lib/decl/lib.es6.d.ts | 0
Rextension/lib/decl/lodash.d.ts -> lib/decl/lodash.d.ts | 0
Rextension/lib/decl/mithril.d.ts -> lib/decl/mithril.d.ts | 0
Rextension/lib/decl/node.d.ts -> lib/decl/node.d.ts | 0
Rextension/lib/decl/systemjs/systemjs.d.ts -> lib/decl/systemjs/systemjs.d.ts | 0
Rextension/lib/decl/urijs/URIjs.d.ts -> lib/decl/urijs/URIjs.d.ts | 0
Rextension/lib/decl/webrtc/MediaStream.d.ts -> lib/decl/webrtc/MediaStream.d.ts | 0
Rextension/lib/emscripten/emsc.d.ts -> lib/emscripten/emsc.d.ts | 0
Rextension/lib/emscripten/libwrapper.js -> lib/emscripten/libwrapper.js | 0
Rextension/lib/i18n-strings.js -> lib/i18n-strings.js | 0
Rextension/lib/i18n.ts -> lib/i18n.ts | 0
Rextension/lib/module-trampoline.js -> lib/module-trampoline.js | 0
Rextension/lib/refs.ts -> lib/refs.ts | 0
Rextension/lib/vendor/URI.js -> lib/vendor/URI.js | 0
Alib/vendor/jed.js | 2++
Rextension/lib/vendor/lodash.core.min.js -> lib/vendor/lodash.core.min.js | 0
Rextension/lib/vendor/mithril.js -> lib/vendor/mithril.js | 0
Rextension/lib/vendor/system-csp-production.src.js -> lib/vendor/system-csp-production.src.js | 0
Rextension/lib/wallet/checkable.ts -> lib/wallet/checkable.ts | 0
Rextension/lib/wallet/cryptoApi.ts -> lib/wallet/cryptoApi.ts | 0
Rextension/lib/wallet/cryptoLib.ts -> lib/wallet/cryptoLib.ts | 0
Rextension/lib/wallet/cryptoWorker.ts -> lib/wallet/cryptoWorker.ts | 0
Rextension/lib/wallet/db.ts -> lib/wallet/db.ts | 0
Rextension/lib/wallet/emscriptif.ts -> lib/wallet/emscriptif.ts | 0
Rextension/lib/wallet/helpers.ts -> lib/wallet/helpers.ts | 0
Rextension/lib/wallet/http.ts -> lib/wallet/http.ts | 0
Rextension/lib/wallet/query.ts -> lib/wallet/query.ts | 0
Rextension/lib/wallet/types.ts -> lib/wallet/types.ts | 0
Rextension/lib/wallet/wallet.ts -> lib/wallet/wallet.ts | 0
Rextension/lib/wallet/wxApi.ts -> lib/wallet/wxApi.ts | 0
Rextension/lib/wallet/wxMessaging.ts -> lib/wallet/wxMessaging.ts | 0
Rextension/manifest.json -> manifest.json | 0
Rextension/package.json -> package.json | 0
Rextension/pages/confirm-contract.html -> pages/confirm-contract.html | 0
Rextension/pages/confirm-contract.tsx -> pages/confirm-contract.tsx | 0
Rextension/pages/confirm-create-reserve.html -> pages/confirm-create-reserve.html | 0
Rextension/pages/confirm-create-reserve.tsx -> pages/confirm-create-reserve.tsx | 0
Rextension/pages/debug.html -> pages/debug.html | 0
Rextension/pages/show-db.html -> pages/show-db.html | 0
Rextension/pages/show-db.ts -> pages/show-db.ts | 0
Rextension/pogen/.gitignore -> pogen/.gitignore | 0
Rextension/pogen/example/messages.po -> pogen/example/messages.po | 0
Rextension/pogen/example/test.ts -> pogen/example/test.ts | 0
Rextension/pogen/pogen.ts -> pogen/pogen.ts | 0
Rextension/pogen/tsconfig.json -> pogen/tsconfig.json | 0
Rextension/popup/popup.css -> popup/popup.css | 0
Rextension/popup/popup.html -> popup/popup.html | 0
Rextension/popup/popup.tsx -> popup/popup.tsx | 0
Dserve-testpages | 11-----------
Dstyle.txt | 49-------------------------------------------------
Rextension/style/wallet.css -> style/wallet.css | 0
Rextension/taler-wallet-de-DE.po -> taler-wallet-de-DE.po | 0
Rextension/taler-wallet-en-US.po -> taler-wallet-en-US.po | 0
Rextension/taler-wallet-fr-FR.po -> taler-wallet-fr-FR.po | 0
Rextension/taler-wallet-it-IT.po -> taler-wallet-it-IT.po | 0
Rextension/test/run_tests.js -> test/run_tests.js | 0
Rextension/test/tests/taler.ts -> test/tests/taler.ts | 0
Dtestpages/testpage_merchant.html | 16----------------
Rextension/tsconfig.json -> tsconfig.json | 0
81 files changed, 6 insertions(+), 136 deletions(-)

diff --git a/extension/Makefile b/Makefile diff --git a/extension/background/main.ts b/background/main.ts diff --git a/extension/content_scripts/notify.js b/content_scripts/notify.js diff --git a/extension/content_scripts/notify.ts b/content_scripts/notify.ts diff --git a/extension/.gitignore b/extension/.gitignore @@ -1,9 +0,0 @@ -node_modules/ -*.js.map -background/*.js -lib/wallet/*.js -lib/*.js -!lib/module-trampoline.js -popup/*.js -test/tests/*.js -build/ diff --git a/extension/img/icon.png b/extension/img/icon.png @@ -1 +0,0 @@ -taler-logo-24.png -\ No newline at end of file diff --git a/extension/img/logo.png b/extension/img/logo.png @@ -1 +0,0 @@ -logo-2015-medium.png -\ No newline at end of file diff --git a/extension/lib/vendor/jed.js b/extension/lib/vendor/jed.js @@ -1 +0,0 @@ -../../node_modules/jed/jed.js -\ No newline at end of file diff --git a/extension/gulpfile.js b/gulpfile.js diff --git a/extension/header.po b/header.po diff --git a/ide/README b/ide/README @@ -1 +0,0 @@ -Settings and project files for IDEs and other tools should be stored here. diff --git a/ide/codeStyle.xml b/ide/codeStyle.xml @@ -1,44 +0,0 @@ -<code_scheme name="GNU Taler"> - <option name="RIGHT_MARGIN" value="80" /> - <option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" /> - <TypeScriptCodeStyleSettings> - <option name="SPACE_AFTER_TYPE_COLON" value="true" /> - <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" /> - </TypeScriptCodeStyleSettings> - <XML> - <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" /> - </XML> - <codeStyleSettings language="HTML"> - <indentOptions> - <option name="INDENT_SIZE" value="2" /> - <option name="CONTINUATION_INDENT_SIZE" value="4" /> - <option name="TAB_SIZE" value="2" /> - </indentOptions> - </codeStyleSettings> - <codeStyleSettings language="JavaScript"> - <indentOptions> - <option name="INDENT_SIZE" value="2" /> - <option name="CONTINUATION_INDENT_SIZE" value="2" /> - <option name="TAB_SIZE" value="2" /> - </indentOptions> - </codeStyleSettings> - <codeStyleSettings language="TypeScript"> - <option name="ALIGN_MULTILINE_CHAINED_METHODS" value="true" /> - <option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" /> - <option name="ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION" value="true" /> - <option name="CALL_PARAMETERS_WRAP" value="5" /> - <option name="PREFER_PARAMETERS_WRAP" value="true" /> - <option name="METHOD_PARAMETERS_WRAP" value="5" /> - <option name="METHOD_CALL_CHAIN_WRAP" value="5" /> - <option name="FOR_STATEMENT_WRAP" value="5" /> - <option name="ARRAY_INITIALIZER_WRAP" value="5" /> - <option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" /> - <option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" /> - <option name="IF_BRACE_FORCE" value="3" /> - <indentOptions> - <option name="INDENT_SIZE" value="2" /> - <option name="CONTINUATION_INDENT_SIZE" value="2" /> - <option name="TAB_SIZE" value="2" /> - </indentOptions> - </codeStyleSettings> -</code_scheme> diff --git a/img/icon.png b/img/icon.png @@ -0,0 +1 @@ +taler-logo-24.png +\ No newline at end of file diff --git a/extension/img/logo-2015-medium.png b/img/logo-2015-medium.png Binary files differ. diff --git a/img/logo.png b/img/logo.png @@ -0,0 +1 @@ +logo-2015-medium.png +\ No newline at end of file diff --git a/extension/img/taler-logo-24.png b/img/taler-logo-24.png Binary files differ. diff --git a/extension/lib/decl/chrome/chrome.d.ts b/lib/decl/chrome/chrome.d.ts diff --git a/extension/lib/decl/filesystem/filesystem.d.ts b/lib/decl/filesystem/filesystem.d.ts diff --git a/extension/lib/decl/filewriter/filewriter.d.ts b/lib/decl/filewriter/filewriter.d.ts diff --git a/extension/lib/decl/handlebars/handlebars-1.0.0.d.ts b/lib/decl/handlebars/handlebars-1.0.0.d.ts diff --git a/extension/lib/decl/handlebars/handlebars.d.ts b/lib/decl/handlebars/handlebars.d.ts diff --git a/extension/lib/decl/jquery/jquery.d.ts b/lib/decl/jquery/jquery.d.ts diff --git a/extension/lib/decl/lib.es6.d.ts b/lib/decl/lib.es6.d.ts diff --git a/extension/lib/decl/lodash.d.ts b/lib/decl/lodash.d.ts diff --git a/extension/lib/decl/mithril.d.ts b/lib/decl/mithril.d.ts diff --git a/extension/lib/decl/node.d.ts b/lib/decl/node.d.ts diff --git a/extension/lib/decl/systemjs/systemjs.d.ts b/lib/decl/systemjs/systemjs.d.ts diff --git a/extension/lib/decl/urijs/URIjs.d.ts b/lib/decl/urijs/URIjs.d.ts diff --git a/extension/lib/decl/webrtc/MediaStream.d.ts b/lib/decl/webrtc/MediaStream.d.ts diff --git a/extension/lib/emscripten/emsc.d.ts b/lib/emscripten/emsc.d.ts diff --git a/extension/lib/emscripten/libwrapper.js b/lib/emscripten/libwrapper.js diff --git a/extension/lib/i18n-strings.js b/lib/i18n-strings.js diff --git a/extension/lib/i18n.ts b/lib/i18n.ts diff --git a/extension/lib/module-trampoline.js b/lib/module-trampoline.js diff --git a/extension/lib/refs.ts b/lib/refs.ts diff --git a/extension/lib/vendor/URI.js b/lib/vendor/URI.js diff --git a/lib/vendor/jed.js b/lib/vendor/jed.js @@ -0,0 +1 @@ +../../node_modules/jed/jed.js +\ No newline at end of file diff --git a/extension/lib/vendor/lodash.core.min.js b/lib/vendor/lodash.core.min.js diff --git a/extension/lib/vendor/mithril.js b/lib/vendor/mithril.js diff --git a/extension/lib/vendor/system-csp-production.src.js b/lib/vendor/system-csp-production.src.js diff --git a/extension/lib/wallet/checkable.ts b/lib/wallet/checkable.ts diff --git a/extension/lib/wallet/cryptoApi.ts b/lib/wallet/cryptoApi.ts diff --git a/extension/lib/wallet/cryptoLib.ts b/lib/wallet/cryptoLib.ts diff --git a/extension/lib/wallet/cryptoWorker.ts b/lib/wallet/cryptoWorker.ts diff --git a/extension/lib/wallet/db.ts b/lib/wallet/db.ts diff --git a/extension/lib/wallet/emscriptif.ts b/lib/wallet/emscriptif.ts diff --git a/extension/lib/wallet/helpers.ts b/lib/wallet/helpers.ts diff --git a/extension/lib/wallet/http.ts b/lib/wallet/http.ts diff --git a/extension/lib/wallet/query.ts b/lib/wallet/query.ts diff --git a/extension/lib/wallet/types.ts b/lib/wallet/types.ts diff --git a/extension/lib/wallet/wallet.ts b/lib/wallet/wallet.ts diff --git a/extension/lib/wallet/wxApi.ts b/lib/wallet/wxApi.ts diff --git a/extension/lib/wallet/wxMessaging.ts b/lib/wallet/wxMessaging.ts diff --git a/extension/manifest.json b/manifest.json diff --git a/extension/package.json b/package.json diff --git a/extension/pages/confirm-contract.html b/pages/confirm-contract.html diff --git a/extension/pages/confirm-contract.tsx b/pages/confirm-contract.tsx diff --git a/extension/pages/confirm-create-reserve.html b/pages/confirm-create-reserve.html diff --git a/extension/pages/confirm-create-reserve.tsx b/pages/confirm-create-reserve.tsx diff --git a/extension/pages/debug.html b/pages/debug.html diff --git a/extension/pages/show-db.html b/pages/show-db.html diff --git a/extension/pages/show-db.ts b/pages/show-db.ts diff --git a/extension/pogen/.gitignore b/pogen/.gitignore diff --git a/extension/pogen/example/messages.po b/pogen/example/messages.po diff --git a/extension/pogen/example/test.ts b/pogen/example/test.ts diff --git a/extension/pogen/pogen.ts b/pogen/pogen.ts diff --git a/extension/pogen/tsconfig.json b/pogen/tsconfig.json diff --git a/extension/popup/popup.css b/popup/popup.css diff --git a/extension/popup/popup.html b/popup/popup.html diff --git a/extension/popup/popup.tsx b/popup/popup.tsx diff --git a/serve-testpages b/serve-testpages @@ -1,11 +0,0 @@ -#!/bin/bash - -# Start a web server on port 8000 to serve test pages for the wallet extension. - -set +x - -# directory where our script resides -mydir="$(dirname "$(readlink -f "$0")")" - -cd "$mydir/testpages/" -exec python3 -m http.server 8000 diff --git a/style.txt b/style.txt @@ -1,49 +0,0 @@ -TypeScript style -================ - -Basics: -- Indent with 2 spaces. -- Keep a maximum line length of 120 characters. -- Prefer "double quotes" for strings. -- Never omit optional semicolons. -- Do not put opening braces or brackets on a new line. -- Call functions without spaces: foo(bar) -- Use 'let' instead of 'var' whenever possible. -- Declare "use strict;". -- Use rocket (=>) syntax for anonymous functions. If an anonymous function is - too long, make it a named function. -- Use the strict equality operator (===). -- Document functions with JSDoc comments (http://usejsdoc.org). - - -JavaScript version: -Stick to ES6 features. Do not rely on any vendor-specific extensions (such as -Firefox often offers). ES6 features not yet supported by major browsers are -okay as long as there is a well-supported and reasonable polyfill (such as -babel) available. - - -Names: -- Use PascalCase for classes/types, camelCase for variables, functions and - properties, UPPER_SNAKE_CASE for constants, kebab-case for event names. -- Only capitalize the first letter of an acronym in identifiers (e.g. HttpResponseCode). - - -APIs: -- Prefer 'Promise' to one-shot continuations whenever possible. -- Prefer handlebars templates to poking around in the DOM. - - -Dependency Injection (DI): -DI is a useful pattern when components need to be replaced by mocks or have -multiple co-existing implementations. But DI also makes code overly generic, -bureaucratic and less readble. Only use DI if there is a definite need for it, -do not use it by default. Inject individual dependencies via class -constructors and avoid service locators. - - -Misc: -- Do not use ES6 template strings for constructing HTML, - use TSX/JSX literals instead. -- For everything not covered here, stick to this style guide: - https://github.com/airbnb/javascript. diff --git a/extension/style/wallet.css b/style/wallet.css diff --git a/extension/taler-wallet-de-DE.po b/taler-wallet-de-DE.po diff --git a/extension/taler-wallet-en-US.po b/taler-wallet-en-US.po diff --git a/extension/taler-wallet-fr-FR.po b/taler-wallet-fr-FR.po diff --git a/extension/taler-wallet-it-IT.po b/taler-wallet-it-IT.po diff --git a/extension/test/run_tests.js b/test/run_tests.js diff --git a/extension/test/tests/taler.ts b/test/tests/taler.ts diff --git a/testpages/testpage_merchant.html b/testpages/testpage_merchant.html @@ -1,16 +0,0 @@ -<!doctype html> -<script type="text/javascript"> - "use strict"; - function talerHandshake() { - document.body.addEventListener('taler-wallet-present', function(e) { - var x = document.getElementById('indicator'); - x.innerHTML = 'found!'; - }); - var evt = new Event('taler-checkout-probe'); - document.body.dispatchEvent(evt); - } - - window.onload = (e) => talerHandshake(); -</script> - -Waiting for Taler wallet ... <span id='indicator'></span> diff --git a/extension/tsconfig.json b/tsconfig.json