GithubHelp home page GithubHelp logo

decentrasol / doicontacts Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 123.42 MB

Doichain Wallet for email and permissions

Home Page: https://www.doichain.org

License: MIT License

HTML 0.68% CSS 0.56% JavaScript 23.43% Java 39.90% Objective-C 26.39% C# 2.57% Swift 3.74% Batchfile 2.25% Shell 0.36% Ruby 0.01% C 0.10%
cordova react wallets yarn android doichain ios javascript blockchain

doicontacts's Introduction

DoiContacts - A Doichain wallet

GitHub tag code style: prettier MIT

Doichain Wallet. Help us to reduce email spam. Built with ReactJS, Cordova for Android, iOS and Desktop

Appstore Playstore

Remark: Double-Opt-In email permissions are necessary by EU-law, DoiContacts and Doichain solve this issue self-decentralizing, open, permissionless and anonymous on Doichain blockchain. For more information about DOI's and Doichain, please visit https://github.com/doichain/dapp or https://www.doichain.org

Doichain stores email permissions in form of signatures but doesn't store ANY encrypted nor unencrypted personal data. This app doesn't use any cloud storage. All private keys and personal data are stored only on your device!

Features

  • Wallets
    • create multiple Doichain Wallets and associate it offchain with an email address (e.g. private, project a, project b, ... ))
    • edit subject and email template used by the wallet
    • send/receive DOI to another wallet
    • list all transactions
  • Contacts
    • add an email address and request an email permission through Doichain transaction with a personalized email text
    • enter a current geo position when requesting the permission (you can remember where you meet)
    • show contacts status of a requested email permission (confirmed - yes/no)
    • scan email QR-Code from a second doiContact wallet
    • (under development) scan an IPFS-address QR-Code pointing to a IPFS-file with a signed SOI transaction ready to broadcasted (and signed) by a second party (Bob)

Want to contribute?

Orientation

  • doi_react_app/ - contains the react app (edit, yarn start, yarn build to deploy to ../www (cordova) from here)
  • doi_react_app/cypress/integration/App.e2e.js Cypress Tests
  • www/ - cordova directory - do not edit anything here.
  • cordova build / cordova run ios/android from the directory of this file

checkout this repository and cd doi_react_app

Run Cyress browser tests

  • Run npm run cypress in another terminal

How to test on android / ios emulater

  • run npm install in the root directory of the repository (cd ../ from doi_react_app)
  • run cordova build
  • run cordova run android or
  • run cordova run ios

License

MIT

RESPONSIBLE DISCLOSURE

Found critical bugs/vulnerabilities? Please email them [email protected] Thanks!

doicontacts's People

Contributors

davidreband avatar decentrasol avatar dependabot[bot] avatar lekg1 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

davidreband

doicontacts's Issues

Feature "Permissions Given"

please remove "Settings Tab" and replace it with "My grants"

  1. extend Doichain dApp Validator Code in case a recipients email (peter) registers an own wallet on a validator node, #13 (can be also disabled again - just remove the registration from validator)
  • transfer Peters already confirmed nameId's from Bobs address to Peters Doichain address
  • register Peters email address with his Doichain Address on the validator only locally
  • in case Bob (the responsible validator) receives a DOI request for this email, he additionally informs Peters Mobile-Wallet (App) via REST-response / websocket answer of the new DOI-Request (including all data e.g. subject, email, from address, to-address). If Peter confirms this DOI transaction, he will receive the storage fee and revocation fee from Bob. Validation fee is kept for the validator.
  1. get list of nameId's from Doichain node which I am owner (must be a DOI request which is either unconfirmed (no doiSignature) or confirmed (with doiSignature)
  2. display a DOI request securely inside the mobile Wallet (subject, email content etc.)
  3. confirm a DOI request (create a DOI-transaction paid by an already signed input of Bob

Feature: Contact Details

please implement, when clicking on contact:

  • date created
  • nameID
  • walletName
  • txId
  • status (DOI confirmed)
  • name / transaction history

Todo:

  • create onclick Handler in ContactList.js just as in WalletList.js
  • setModus just as in WalletPage.js
  • create a new component ContactDetail.js displaying the email address of this contact
  • add all above mentioned attributes of contat

Show transaction history of a wallet or contact permission

Under contacts or wallets when showing a single wallet or contact it should be possible to see the transaction history.

  • Wallets: implement a Doicoin transaction list which connects to the dApp when opening the wallet screen
  • Contacts: also show transaction history but only show namespace beginning with e/

RPC interface on Doichain dApp is implemented under /api/v1/listtransactions and takes the Doichain "address" of the wallet as parameter.
edited: /api/v1/listtransactions doesn't work correctly - balances and transactions need to be tracked by our node. Update: this is done!*

See also: #15 and
#36

Bug: After successful or insuccessful click on request doi permission button state still wrong

Clicking on the "Request Email permission" button when adding a new contact results in a successful or insuccessful operation. In either case the ProgressButton state is not correctly handled. When handled succesfully, button should turn to 'success' if an error occured button should be in state "error".

See details: https://reactjsexample.com/simple-react-component-for-a-circular-progress-button/

Button should be also disabled in either case. and after a timeout of 2 secs it should return to the list mode.

When scanning Doichain address via QR-Code - transaction cannot be sent

For some reason, when scanning the Doichain address from QR-Code, the address is transferred correctly into the input type for the Doichain Address. Unfortunately the underluying state variable gets not updated by our action and stays empty. If you now hit "send transaction" the transaction must fail.

Please investigate this issue. Make sure the state variable is changed too, when scanning process is finished.

Add Contact

When adding a new contact under "Contacts", after successfully adding the contact request to the blockchain the screen should automatically jump back to the contact list. (Right now it stays on the same screen after showing 'success'.

If the transaction is not successful (because of insufficient funds) it should stay on this screen and not jump back to contact list.

An example how to do this you can see under "wallets" when sending DOI to an Doichain address. It correctly jumps back to the wallet after the coins where send successfully.

Feature: Testnet-Mainnet Switch / Change Validator URL #115

The current implementation runs on Doichain - Testnet only. If one wants to switch to Mainnet (once its updated with all the new functionality) he should be able to change the validator URL to another one.

In the case doiContacts App should recognise the type of network automatically (Regtest, Testnet or Mainnet) and should change the parameters inside the doiContacts App accordingly which are responsible to generate addresses, encryption and signature creation as needed.

Navigation Bar should be extended with another icon which brings up a dialog in order to change the validator URL.

Feature: Actualization of transactions

When ever one opens the app, the app should automatically look for new transactions concerning the wallets of the app.

Also implement a "pull to refresh" gesture.

Bug: 16: bad-txns-in-belowout

When requesting a DOI permission and utxos are available but not sufficient then transaction is created from our side successfully but Doichain node doesn't like it and responds with bad-txns-in-belowout. We must make sure that the chosen wallet has sufficient amount of funds before creating the transaction.

This is maybe an issue also when sending Doicoin in the wallet section. (please check)

Display unconfirmed transactions

  1. If we send a transaction to the node we produce a utxo for that, which we can reuse then.
    The resulting balance should be marked in a different color (e.g. orange) if its not yet confirmed.
    If there are other "old" confirmed utxos still available, then they should be displayed normally and the unconfirmed balance in another color just behind.

  2. Also if we receive transaction through a mempool (which was called by walletnotify) then we should parse this transactions amount and display it in the color (e.g. orange) behind the confirmed balance.
    1,56 DOI (2,3 DOI unconfirmed)

See also: #24

After scan of QR-Code textfield does not reset when scanning another contact or wallet

When scanning an QR-Code e.g. under contacts and wallets the scanned text (an email under contacts and a Doichain address under wallets) will be inserted into the textfield.

Then after sending the transaction it is necessary to reset this qrCode in global state again since it appears again when scanning another contact (or scanning another Doichain address) for the next transaction.

VerifySignature Plaintext Anfrage an Doichain - dApp

Doichain dApp's logfile shows plaintext requests for "verifySignature" even tho we request via ssl this doesn't seem such a great approach...

verifySignature: { data: 'userxys@[email protected]',
signature: 'H+CZ03oQ9revuMiTZvNuHSMWIFXFmGj8LW9xbeqqQBgZIYs68P3MWFP4xISDq218r57LnBMyDE1kDHjWZlHhA8U=',
publicKey: '03bed8dbb60a0b8d641c374ad9f3e9e6947cc73d77fd08aae22988e6d550080cce' }

Feature: Implement encrypted Backup

Implement a possibility to make an encrypted backup on cloud services (e.g. ftp, webdav, own cloud, google cloud, amazon aws, dropbox, etc.)

Feature: export / import private keys and/or seed phrases

We could add "settings" icon into the navigation bar.
when touching settings there will be a function

  • import private key (add a private key and a wallet - like add wallet just don't generate a new key pair)
  • export private key (choose the wallet (email) and export the keypair into a textfile
  • backup
  • restore

Add/Replace "edit" icon in both wallets and contacts screen

The current "edit" icon under wallets for editing wallets should be replaced by a more intuitive one. (e.g. a pen)

The same icon and function needs to be implemented in contacts.
Here the contact should be able to be edited. (e.g add city name and other contact data)

Provide a QR-Code which leads to installation of the app if not installed and include a DOI-Request

When creating a QR-Code for a DOI-Request we normally just use a Doichain address or an email address (or a IPFS-Hash).

So in cases where the user doesn't have a doiContact App who would have to install it first.

Question is now: (research needed)
Is it possible to put a longer URL into every QR-Code (e.g. in shops) which sends the user to the shops Doichain Node with a certain Doichain address. There will be a button which says "Open in doiContact App" or "Download doiContact App".

In such an URL you could easily add other parameters as Doichain Address or email addresses and other information so this could processed.

See: https://developers.google.com/android/management/provision-device

New Installation: Wallet creator with Seedphrase

If a doiContact is installed first time, it should ask the user if he wants to

  1. create a new wallet -> present seed phrase - re-enter see phrase - go to first page.
  2. import a seed phrase -> ..
  3. import a privateKey ->

See also: #7 (Seed phrase) #8 (Import Export Private Keys Feature)

Copy to clipboard - wallet address / publicKey

In the wallet details we need a function to copy a Doichain address to the clipboard (and also the publicKey)

Put an icon behind the address and if you click on that icon it should copy the address into the clipboad

Feature: Simple Wallet-Editor

When adding/editing a wallet the textfield should be replaced with a button other component which when clicked navigates to another screen with a bigger textfield of editing an email template.

Calculate correct transaction fees

When sending a Doicoin transaction we are sending so far a fixed mining transaction fee (to make it simple) (not talking about SOI/DOI storage fees, revocation fee, validator fee)

A transaction fee must be calculated correctly according to the possibilities of Bitcoin like described here. (https://bitcoinelectrum.com/how-to-manually-set-transaction-fees/) a transaction fee must be changeable (maybe with a switch for it)

Please check if general miner transaction fees in Namecoin are calculated like on Bitcoin or in a different way (maybe more simple?)

QR-Code Scanner - Cancel Button missing

When starting a QR-Code scan it must be possible to stop a scan.

  1. stop scan automatically after 10 seconds
    and/or if you we have a cancel icon on the scanner screen
  2. add a cancel scan button on the screen.

Feature: Verified Doichain Email address

We must register an email address on the blockchain, associating a wallet (privateKey/publicKey) with the email address of the wallet.

The result would be a "Verified Doichain Email address"

We need to do so before broadcasting a DOI request transaction. The sender email address must be registered on Doichain. We suggest creating a signature over the sender email address with the privateKey of the associated wallet. The signature we store loosely as nameId (key) (without any value for now) on the Doichain blockchain.

The validator (Doichain dApp) has now to find this nameId om the blockchain before continuing processing the transaction. He has to verify the nameId (the signature) with the senders email address.

Remark the registration process of the email should be done aftr creating a wallet. Here the responsible validator would receive the signature and email address and would request a confirmation email from the sender to make sure the verification process was requested by the original owner of the email address.

The owner of this nameId (signature) MUST BE the responsible validator.
Please also compare: Doichain/dapp#114

Todo:

  • request a nameId from Doichain - dApp (signature from 'my' email address and 'my' public key) if available return true/false

Implement "new address from public key"

It should be possible to generate a new address from the current public key from the currrent wallet.
This address should be added then to the wallet.

It needs some research in the code where we just generate the standard address from a public key.
Here we need to replace this with the new address instead of the standard address.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.