Giter Club home page Giter Club logo

raiwebwallet's Introduction

RaiWebWallet

THIS REPO IS DEPRECATED. IT HAS BEEN MOVED TO jaimehgb/RaiWalletV2

Overview

This is a web based wallet for RaiBlocks

This repo contains all the files which are downloaded to the browser at RaiWallet. Adding a compatible back-end anyone can build his own web based wallet from this.
The wallet itself is at Wallet.js. If you want to verify how blocks are created, signed and verified, how accounts are generated, etc ... you should look there. With it you can build your own private and homemade RaiBlocks wallet :D When an efficient way to generate PoW is found, the wallet will be almost self-sufficient. It will only need to query a server to get info about the ledger.

At js/custom.js you can find like the "Middleware" between the Wallet and the GUI. It also contains all the queries made to the server to request PoW, info about accounts and transactions, etc ...

The code relies on some NPM libraries for node.js. I've used browserify to use them at the browser.
$ browserify js/custom.js -o main.js (for example)


How is it built into RaiWallet.com

At RaiWallet the server is only used to store the users' wallets (ciphered), to provide information about the network to them, and to generate PoW. When a user signs up, a random identifier is generated to store the user wallet under it, but the wallet is created at the browser (seeds, keys, accounts, transactions, signatures, everything ... ). Once the user is done with the wallet, it is ciphered (AES256) with his password, still at the browser, and then the ciphered wallet is sent to the server to store it. Someone with access to the database wouldn't be able to find users' keys (if passwords are strong enough and haven't been leaked by their owners).


Contributing

Any kind of help is appreciated :) Suggestions, proposals, fixes, TODO items, issues, testing ... If you want to help there is stuff to do :D


Bounty

With the purpose of testing the wallet strength I have prepared a wallet with an account containing 2000 XRB as a bounty for the one able to log in to that wallet. The wallet has been created at raiwallet.com, using the code in this repo. I can give you all the info you need, except the password. Im going to start providing you with the wallet identifier, the account, the password format (I would prefer you to break it in a way other than bruteforcing it :P but well ...), the ciphered wallet data and... yeah
If you need more info, just ask. If you find a vulnerability and it is worth it I may consider increasing the bounty. So yeah, lets play!

Wallet Identifier: 2964ae96e92370aee570aa92419bc3698dd611172acc2fc85781a43c29bcc9aa 
Account: xrb_3haojq7ntgd45qe1wde4bkqqruazt4sspw6r3ceshfqjnnrzaof63qhhehmf 
Bounty: 2000 XRB ---> 0.07 BTC --> 300$ (at time of writing, 2000 XRB will always stay the same)
Wallet Ciphertext Hex-encoded:
9b003185af74621c71ef70276fe27c8d7a25b6d519c2605ea936c690bb0c9b65d18261d8cd255bea010f4f874b6736bb8b1f73c1528eb3a97050c939033b24712f83f283a93e594540bfd5c4ba81eada2fb1fe7ad713f42e727e53c622a154ce5845f864d51776a905a77e2cf479406af8f9465779af8fd2429d3d154eecd44c4f15240f0bad7274e57aebf82df2014370a988d979e555497e1a9d13601d9ff2ae0878e9b42ea24b307664f9ca5fdd212eb7e7f12ca254fefbdb77ab6a91f905f858836bf61f549d3ceaf489e3bf60d013bcb3a7371dbefe6b5ba1f113906286606ccbd42801813be1e0507a26ac73afd3cd454f0fb4bb2565baf0dff13fabbe3e38edea58bd4a733e1d76d84c1e63736ee8e756152eb9e9bab053ce952174f08b1506867a623d06f6e3e073d9fc2450937996e7214b99e6423f4ed5b3e690e4dd833851cfe82f9ca76cfacca186bb81f88eea840ae56e87c6026172338ed2d066f62e5aea1a548dcec46fb2d4834b45721f293aab16d6a754ca3fc9a2378011869ac9575306f23bc68269ddb5288a7ef42b65a3095e0e83e268327d6d3257240392b11fe8ae1d16c2519b107b1e228357e7b5ea7560e9457a1d57d40eb245c3c0612f28eef19f02e41f7fdfa0d041e89ff1a3808ff63a990872f0374dffb1600e0780edcb812dc75350cbd9fdb0524f0a1894ee85aa204af3c0e815b163a99600d9902637797ea2d4a0dc31d687595310ca4e03d5018aa40657c46ec0bdedd6a16921c5ce5bfced36d2dc98d303fdd8cfe1b00ed1182c32a564fa0604f20edc8427abea3305c584672c3de2c0e44cda397a0d4c35ca6d27aeab79e7852965bcfbaedcd6e84c429e222de7a36edde252d877fe4f6968f3f5c477a1ecd7ab9c80e0ef599550fc8d45bdf9ae6dea52a86d237f09a3663387896249fb51c83c61b32428785dec413448813b1836638bdf67ca4271d28d9fafe824309259bc7576fc57fc78c2f8c5cdc1750139c11e25132ddb0126f4fd7c1a2deb5c07f99ee15be7ed2356e177a9fadbd57c91ca99b94e98c0e12074f2c752a290e0b388ee66439cc03dc9430b3d3683207014643f812fe2996984defc022efeab93d0f39469d1531dbca82da5a018b0cc8fbc37d604a557fd4fe8a0537f64db15722a6de5f65b0c5b6633979f22dfbbcb542193d518f0ca147eafd47e3f12cb37644ad68edf841f41e8cbd6ac0ccc9fcac194f3a15ea6a4be251fa047af2a5fbf49d46d2778130a8f7bfaafc3f7deeb1968b177ef1c179a5674fa86116b481d55f0eafc523698c4dc985831d87a0ba3467cda5a1970f1cad68a065e8e8ed3f05a4c2ae8caada3d1f0b43b383a0f856e8d5ddad1dbcbed58b27928e589e09d9840176de1bd2501a1f0670c9348f6e474dbe3b65a599d69c5466e3bf68c195edee21a848e1dba7a14643d80072366ffa1ef854ebb86a271d0520909671ad8b4b54dcc088b70fd4b3eec32929def173472a226d3df0638358ecd7ae4f988beafdfab91e2ca7557019a286273cf5063817ef78e8f3faca5bf07f58385297929f3a8ad1130d0ba510eb0376859067b96964de393179e6587e22abcd213f0c50b61f02d3df06215ccec84680c6a7e095d9a4cf44968ed4ba700ed1335e99f5acca4062a7fc0c455a97f962ba2b70a28019273282a96847e1a14e0719de5327865f9651c873cd0c06d29f783e87eb73f2aa1679282d65e395138000624d648987e12ec0e08630ed95c11b7d559bb5c2e902fafe11e03a369416a9ba054daa301210bddfef850f2ab5ba2a3709ccb483a60f4514d4a79f805201955684a49d896bbf1b983274354191447a7

TODO


- Find an efficient way to generate PoW at the browser.
- Allow user to change pbkdf2 password stretching iterations (security).
- Allow user to set a minimum receive amount (Utility)
- Allow user to import a wallet seed, importing all chains in case it has been used already in the network (Utility)
- Allow user to import single private keys, of course not backed by the seed (Utility)
- Load more transactions when scrolling down the txs page, currently only the last 20 are loaded (UX)
- Change URI when changing tabs (UX)
- On page refresh, show up the login modal with the wallet id already filled so users can log back in quickly (UX)
- Intensive testing.
- Code cleaning.
- Client/Server comunication optimization, there are too many calls.

raiwebwallet's People

Contributors

jaimehgb avatar precisiontrent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raiwebwallet's Issues

UI is confusing for new users. Suggest an onboarding tour plus more help text.

As a first-time user, the UI doesn't immediately make sense to me.

Here are some of my specific issues. All of these could be fixed by adding either some help text or a fly-through tour using something like Bootstrap Tour.

  • I was confused about the "Pending Blocks (Waiting for PoW...)" title, so I googled it and found a LOT of other confused people.
  • I was also confused when going to "Receive" that there was a field for "Amount" (I had to google this as well to discover that it's optional).
  • I can't actually copy my existing receive address from the "Receive" modal.
  • "Generate New Account" - what is an account? Should I make a new one every time I want to receive money?
  • I can only get a QR code for my account when generating a new one - after that I can't seem to any more.
  • Why do the amount fields all say XRB/MRai? Are they different? Am I entering XRB or MRai?
  • What is a representative? When would I want to change mine, and what would I change it to?

If you want help with this I could potentially find some time in the coming weeks, but I'm not actually sure I know the answers to these questions well enough to write some supporting help text for them.

Feature request: return transaction

It would be nice to have a button on a transaction in the transactions overview to easily send back a transaction to the sender account. Useful when friends lend you money.

Update the code.

The website code is running a new code, but i'ts not in this repo.

Feature request: account address book

Currently the only option we have is to copy and paste wallet addresses into a text box which isn't ideal for most users, a more user friendly and recognisable (in the sense that we can translate an address belongs to person X) approach could be users maintaining their own address books. This way, when users are sending frequent transactions it's a lot easier to keep sending the currency to known associates by selecting from a list.

Thoughts?

Feature request: 2fa setting for accounts

It would be nice if you could enable 2FA per account additionally to the whole wallet. This way, a computer virus would not be able to quickly empty your account by sending away all funds after you logged in.

Bounty wallet reset?

Hello,

I know recently due to some phishing all of the wallet identifiers were reset for users in the database. Did this also apply to the bounty wallet identifier? I was poking around and noticed that identifier wasn't valid anymore.

Account sends menu holds back 0.000001 xrb from being selected

Found this while testing a micro-transaction.

screen shot 2017-12-28 at 2 30 18 pm

Screenshot says most of what I know at this time. Need to look into the code but I am at work rn, just wanted to take note here. Sorry can't be of more help.

The Send menu dropdown lets me choose accounts and shows one value (incorrect) but the wallet itself shows the right values. Not a big deal but hey, maybe one day 0.000001 xrb won't be as insignificant.

Consider scrypt or some memory-intensive hash rather than pbkdf2

Just a thought: consider using a memory-intensive KDF like scrypt instead of pbkdf2. I noticed on the TODO list the option of setting one's own interation count. This would be a way to skip that need. And as such, recommend to folks to setup the wallet on a powerful desktop and just suffer the increased latency on mobile phones. Making it dynamic would be difficult since Web APIs don't offer a means to querying system resource information, so the amount of memory and cpu can be configurable...

...and now that I'm typing it all out, maybe allowing one to set their own pbkdf2 interation count is easier, lol.

Transaction overview "from:" field shows own account

It seems the From field shows the address of the receiver instead of the sender in the transaction overview page. The "To:" field is correct and shows the receiver.

I tried sending back an amount that I received from a friend, but when using the From address I turned out sending the coins to myself.

Multiple wallet identifiers from same wallet seed

Disclaimer before anybody freaks out:
This could be a non-issue, but I don't know enough about the inner workings of RaiBlocks to be sure if it is actually a security issue and I figured it was my responsibility to report it here.

The problem:
It is possible, from the same wallet seed, to produce multiple wallet identifiers, whether from the same email/password combination, or differing email/password combinations, in which all these varying combinations produce varying wallet identifiers albeit with the same address - that is, the same public key.

Steps to reproduce:

  1. Use a valid wallet seed from the window that is opened by clicking "recover your wallet with your wallet seed"
  2. Provide any valid email and password - you will see it doesn't matter what combination you choose, the address in the wallet will be the same (though not the wallet identifier)
  3. You get the window that gives you your wallet identifier and the wallet seed (wallet seed shown should be the same wallet seed you provided)
  4. Upon clicking "go to your wallet" - you will see the address is always the same, indifferent to what email or password you provide

Main concern:
My concern is that an attacker could do this thousands/hundreds of thousands of times, and then send various different transactions from these multiple wallets simultaneously, creating a challenging and confusing load on the network - on the blockchain all the requests would appear from the same address. Again, this could mainly be mitigated by the blockchain itself - I'm not a RaiBlocks expert so I'm not sure if this would be the case.

Possible solution/mitigation:
Not sure; we can't test if the email or password match the seed, since you don't store the seed server side...

But... you could limit the number of times an email can register with a seed, indifferent to whatever seed they are using, just get the times the email pings the server - this could prevent a lot of spamming, which could be a recurring issue as RaiBlocks gains popularity/market cap. ๐Ÿ˜Š

[Feature request]

It would be nice if the server would send the account holder an email when funds are received. I realize this might increase server load. As an alternative, it could be implemented using a HTML5 notification when the user keeps the page open.

Pocketed funds not appearing immediately

I've seen this with myself and a few other users of the wallet through the raiblocks discord channel... this is where the raiblocks have been successfully placed on the blockchain, but they don't show anywhere on the wallet GUI.

The quick fix was to log out of my wallet and log back on again - I'm assuming this is just a front-end error from not updating from the server, but can't be sure.

Asking for contact information of jaimehgb

Hello,

i am not really experienced with github, i am sorry if the thread here is on the wrong place.

i would like to contact jamiehgb, its about the railwallet bounty, i have one question to ask to continue with the work to get the passwort :D any help?

Wallet reported false balance after sending and receiving at the same time.

So this morning I tried to send a small amount of XRB from one address to another address of mine, just to feel how quick the whole process is.
My whole balance is A. After I sent B XRB from address 1 to address 2, the wallet reported I have A + B XRB which is not correct. After a refresh and re-login it reported correctly.

I think this is just a small thing (I don't want to say bug because it's unharm) but if you guys can fix this it would be better I guess.

Email validation to recover wallet with seed is incorrect

When attempting to recover a wallet using the generated seed, the email address is not allowed to contain + characters. For example, "[email protected]". However, a + sign is however a valid email address. Also note that it is possible to create an account that uses an email address containing a + sign, it's only when an attempt is made to recover the wallet that it goes wrong.

Uncaught TypeError: Cannot read property 'getHash' of undefined at resolve (main4.js?v=1.0.2:2758)

I think it's somewhat specific to my wallet config as the web wallet seems to work ok when I create a new account.

I know that I created several receive accounts - perhaps that is related somehow.

I can look into the code flow/reproduction steps a little more deeply later, but thought I'd see if anyone else was having a similar/the same problem.

Here's the error/stack trace:

Uncaught TypeError: Cannot read property 'getHash' of undefined
    at resolve (main4.js?v=1.0.2:2758)
    at Object.success (main4.js?v=1.0.2:2818)
    at i (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at y (jquery.min.js:4)
    at XMLHttpRequest.c (jquery.min.js:4)
resolve @ main4.js?v=1.0.2:2758
(anonymous) @ main4.js?v=1.0.2:2818
i @ jquery.min.js:2
fireWith @ jquery.min.js:2
y @ jquery.min.js:4
c @ jquery.min.js:4
XMLHttpRequest.send (async)
send @ jquery.min.js:4
ajax @ jquery.min.js:4
n.(anonymous function) @ jquery.min.js:4
resolve @ main4.js?v=1.0.2:2760
resolveForks @ main4.js?v=1.0.2:2848
(anonymous) @ main4.js?v=1.0.2:2729
i @ jquery.min.js:2
fireWith @ jquery.min.js:2
y @ jquery.min.js:4
c @ jquery.min.js:4
XMLHttpRequest.send (async)
send @ jquery.min.js:4
ajax @ jquery.min.js:4
n.(anonymous function) @ jquery.min.js:4
checkChains @ main4.js?v=1.0.2:2691
goToWallet @ main4.js?v=1.0.2:2910
(anonymous) @ main4.js?v=1.0.2:3040
i @ jquery.min.js:2
fireWith @ jquery.min.js:2
y @ jquery.min.js:4
c @ jquery.min.js:4
XMLHttpRequest.send (async)
send @ jquery.min.js:4
ajax @ jquery.min.js:4
n.(anonymous function) @ jquery.min.js:4
(anonymous) @ main4.js?v=1.0.2:2991
dispatch @ jquery.min.js:3
r.handle @ jquery.min.js:3

Show result of address check to user

When pasting an address in, many users stress about somehow missing a character or making a mistake in some other way, sending to some address that nobody owns. See this issue from official repo.

Could it show a reassuring "this is a valid address" statement (and perhaps even fetch basic info about it such as the current balance of that address, how many blocks) when a valid address is entered? Perhaps in green? And a red "this is not a valid address" otherwise. And maybe orange (or blue?) for "this is a valid address but has no open block on the network yet, is it a cold/offline wallet?"

Local PoW option not saved between sessions

I check Local PoW checkbox and get message "Preferences updated. PoW will be generated at client side now."
Then I sign out and then sign in again.
Go to Settings and see Local PoW option unchecked.
Result: local PoW never generates and I see the "Pending Blocks (Waiting for PoW ...)" message forever.
This happens both in Chrome and Firefox.

Feature request: No signup/account mode

Hi,

It would be nice if the wallet has a no signup/account mode, where the seed is only stored with the user. All operations done locally and nothing stored on the server. Something like myetherwallet for ethereum.

Attributions of licenses?

Apologies if this is your own work, but the PoW stuff appears to have been sourced from elsewhere without attribution

Incomplete account address showing on smaller screens (UI responsiveness error)

Check the following screenshot:

image

Due to the page not being properly responsive, the address trails outside of the right <body> bounds. A user may copy an invalid address like this and lose funds on exchanges that do not validate withdrawal addresses such as BitGrail.

This could be fixed by either showing the accounts above or below the list of transactions by default, or based on media queries when the screen size is too small. Additionally, a "copy address" button could be added like in the Coinomi wallet so the user can be sure the right address is copied in full without selection mistakes.

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.