Giter Club home page Giter Club logo

my-wallet-v3's Introduction

MyWallet Build Status Coverage Status

JavaScript Model for Blockchain.info wallet.

Build

Install Yarn

yarn # recommended, can also use `npm install`
npm run build

Tests

npm test

Dev

Watch files and re-build

npm run build:watch

Clean

Clean generated files:

make clean

Getting Started

Load dist/my-wallet.js.

Optional: set alias for modules you use

var MyWallet = Blockchain.MyWallet;
var WalletStore = Blockchain.WalletStore;
var Spender = Blockchain.Spender;
var API = Blockchain.API;

Disable logout, if desired, for development work:

MyWallet.disableLogout(true);

// Set an interval, since logout gets reactived by certain parts of the code
window.setInterval(function() { MyWallet.disableLogout(true); }, 60000);

My Wallet communicates about its state with user-defined event listeners. Setup a listener like so:

function myListenerFun(eventName, data) {
    // Handle events
}

// Register listener function with MyWallet
MyWallet.addEventListener(myListenerFun);

Some events that we need to process:

Event Name Our Action
did_multiaddr Populate wallet statistics on the UI
hd_wallets_does_not_exist Create an HD wallet
on_wallet_decrypt_finish Get wallet transaction history

To build an HD wallet with an existing legacy wallet, we must initialize after receiving event notification from MyWallet.

var passphrase = MyWallet.generateHDWalletPassphrase();

MyWallet.initializeHDWallet(passphrase, null, null, _successFun, _errorFun);

Load a wallet from the server, with no 2FA

var guid = "my-wallet-guid-1234-bcde";
var pass = "wallet-password";
var twoFactorCode = null;

MyWallet.fetchWalletJSON(guid, null, null, pass, twoFactorCode,
    successFun, need2FAfun, wrong2FAfun, otherErrorFun);

// Do stuff with the wallet
var LegacyAddresses = MyWallet.getLegacyActiveAddresses();

In order to fetch the wallet history, make a call to get_history:

MyWallet.get_history(_successFun, _errorFun);

get_history will trigger the did_multiaddr event on completion, so the wallet stats and display can be updated.

Security

Security issues can be reported to us in the following venues:

my-wallet-v3's People

Contributors

alexprut avatar clarkmoody avatar jtormey avatar keonne avatar kristovatlas avatar kwgithubusername avatar mpfluger avatar pernas avatar plondon avatar prwelber avatar schnogz avatar sha49 avatar sjors avatar stequald avatar thore3 avatar tuzzolo 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  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

my-wallet-v3's Issues

Unable to get 2FA code mail, client stops working

After receiving my first mail confirmation and clicking on its verification link, and immediately after entering the wallet password for the second time, the UI shows up an e-mail code textbox, and each textbox gets disabled. On the (Safari) console, the following error appears:

Error: undefined is not an object (evaluating 'wallet.my.wallet.bch.getHistory')

Tested on blockchain.info's My-Wallet-V3 Frontend v1.29.9 and My-Wallet-V3 v3.40.9, running on top of Firefox 57.0.2 and Safari 11.0.2 (13604.4.7.1.3).

Detailed Firefox log

Using My-Wallet-V3 Frontend v1.29.9 and My-Wallet-V3 v3.40.9, connecting to /
landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:367:30061
Server Time offset 57ms - This offset 57
landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:368:3506
Second password required to prepare KV Store
my-wallet-c08cb03fc2c059fc13e85ca992b351b9d584768e.min.js:1:791500
Error: wallet.my.wallet.bch is undefined
Wallet/wallet.fetchAccountInfo/<@https://blockchain.info/wallet/js/wallet-6bf7b6b89ee3871c85ca04f78b3f4f192cf203a8.min.js:11:7787
e/<@https://blockchain.info/wallet/js/landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:133:434
$eval@https://blockchain.info/wallet/js/landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:148:65
$digest@https://blockchain.info/wallet/js/landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:145:123
$evalAsync/<@https://blockchain.info/wallet/js/landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:148:154
f@https://blockchain.info/wallet/js/landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:46:490
mg/k.defer/c<@https://blockchain.info/wallet/js/landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:49:418
landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:120:446
Server Time offset 529.625ms - This offset 1002.25
landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:368:3506
Source map error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Resource URL: https://blockchain.info/wallet/js/landing-554956be23423706c0a01135d41bfa4effea9e13.min.js
Source Map URL: angular-sanitize.min.js.map
[Learn More]

Detailed Safari log

[Info] Using My-Wallet-V3 Frontend v1.29.9 and My-Wallet-V3 v3.40.9, connecting to / (landing-554956be23423706c0a01135d41bfa4effea9e13.min.js, line 367)
[Log] Server Time offset 26ms - This offset 26 (landing-554956be23423706c0a01135d41bfa4effea9e13.min.js, line 368)
[Warning] Second password required to prepare KV Store (my-wallet-c08cb03fc2c059fc13e85ca992b351b9d584768e.min.js, line 1)
[Error] Error: undefined is not an object (evaluating 'wallet.my.wallet.bch.getHistory')
https://blockchain.info/wallet/js/wallet-6bf7b6b89ee3871c85ca04f78b3f4f192cf203a8.min.js:11:7820
https://blockchain.info/wallet/js/landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:133:435
$digest@https://blockchain.info/wallet/js/landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:145:136
https://blockchain.info/wallet/js/landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:148:163
f@https://blockchain.info/wallet/js/landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:46:497
https://blockchain.info/wallet/js/landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:49:419
	(función anónima) (landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:93)
	(función anónima) (landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:134)
	$digest (landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:145:137)
	(función anónima) (landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:148:164)
	f (landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:46:498)
	(función anónima) (landing-554956be23423706c0a01135d41bfa4effea9e13.min.js:49:420)
[Log] Server Time offset 781.5ms - This offset 1537 (landing-554956be23423706c0a01135d41bfa4effea9e13.min.js, line 368)

CLaiming BTG from imported wallet

I have imported a wallet (by importing a private key) in my Blockchain.info wallet.

That wallet has no balance but on the day of the BTG fork (25 oct) there was 1 BTC in it. How can I claim the BTG?
Tnx.

2FA Code

Please i need help. Am trying to log in but not getting text of my 2fa code to my registered phone number. I have tried to do a reset but not helping. I have written to support but not yielding any result. Anyone with same experience that has scaled through should please contact me.

Thanks

Any documentation?

Just wondering. Is it supposed to be public and used by anyone besides blockchain.info employees? If that's the case, is there any public documentation of the API?

I'm just wondering if there is any field in Wallet object that says precisely how much funds can be withdrawn at current time. (balance without unconfirmed / doublespends)

how do i review my bitcoin wallets .??

hi can you please help me review my wallet? im not sure how to review my wallet even though i have a bitcoin wallet encryption. please help me .thank you

Commission

How does Blockchain calculate the recommended commission for the transaction and from where does it take all the data?

A two factor authentication reset request is currently pending approval not displayed on screen/page

When I try and login to blockchain wallet the underlying service returns the message

"A two factor authentication reset request is currently pending approval in 13 days 19 hours 6 minutes. For more information click the Reset Two Factor Authentication Button."

However the web page simply shows "Please check your email to approve this login attempt."

However I don't get an email so the website should show the real message rather than misleading users into believing an email is on its way.

sorry friends

I'm just starting to understand what I'm looking at let's see what happens

i have the problem

Good afternoon! I can not enter my wallet? Even after the letter arrives in the mail with my id. What should I do?

Errors upgrading wallet to V3 when encrypted with 2nd password

I accessed my wallet yesterday for the first time in almost 2 years and was required to upgrade to a V3 wallet. This required me to enter the second password, but it was repeatedly rejected.

It appears that it was incorrectly attempting to derive the 2nd encryption key using 5000 PBKDF rounds, whereas the wallet had been encrypted using a key derived with only 10 rounds. There seems to be code intended to handle older wallet data with 1 and 10 round PBKDF for the 2nd key, but it wasn't being hit.

Account Access Recovery is Broken

I have two accounts that I can't access.

I have the identifier and password for both accounts.

In one case (90f8dfdd-454b-40dd-9f9a-d77bc45f6a25) the login verification e-mail never arrives. Attempting to change the e-mail address associated with the account appears to work (the reset e-mail arrives at one of the possible addresses associated with the account), but nothing changes even after attempting to reset the e-mail to a known working address.

In the second case (e48f760b-41a7-4013-aec9-c35e494e71e8), Google Authenticator is no longer available and resetting 2FA appears to complete successfully but login still prompts for a Google Authenticator code.

I'm posting this issue to the repository because I can't find a more appropriate(?) support channel to use.

Not getting email for logging approve

I'm unable to access my wallet. when I enter wallet Id and Password than there is a message appearing on screen "Please check your email to approve this login attempt." but I didn't receive any Email.

(Help!) Partial Spend from a cold wallet sent to a change address without PK

Hello friends, I need help on an important issue.

I keep most of my funds in a cold wallet, generated in bitaddress.org (Offline), when I want to spend these funds, I enter the private address in Blockchain.info on Settings > Address > Import new address.

After that, I send the amount I want for some exchange, and return the change (Rest of funds) to another cold wallet, that I generate in bitaddress, entering in blockchain the public key of the same to follow the balance, I have been doing this for a long time and I never had problems.

But last time on the transaction screen, I noticed that below of Watch-Address field of the cold wallet, there is a Private Key field, which has decreased the job of inserting it in the option menu a new address to spend the funds.

1

I decided to enter the private key of my cold wallet in this field, and sended a portion of my funds to the exchange, imagining that the change, would be re-sent to my default wallet of blockchain, but that was not what happened, these funds are sent to an address which was added as 'Watch-Only' address, and that I do not own the private key.

3

The money sent to the exchange has arrived correctly, but the change of my funds are stuck in a unknown address.

Address of cold wallet: 1AXXCct4QATf2UdX92piw1AA2As8AoZaoM

Exchange address (Correctly sent): 1PjcZKMFR8wkFjoMAE2aoVfSeB5xHwVLdu

Change address (Stuck funds): 1KfTVrLG376B7SYb1bA6NnY7KyK825T72B

2
I believe it was not malware, since the funds were sent to the exchange correctly, otherwise, the entire balance would have withdrawned to some other address.

I am a developer and started to study your code to understand how the process of generating the change address is done in the case of a partial spend, but this will take a while.

I'm using this tool: https://iancoleman.io/bip39/ (Offline) trying to discover the private key of the address: 1KfTVrLG376B7SYb1bA6NnY7KyK825T72B but apparently it is not part of my HD wallet, or it is in some child node that I can not find.

These addresses are part of the transaction after the cold wallet address, and are contained in the HD nodes (Internal and External):

141rWhPaeSpTqn2YH1fw2WFnwhojQTERyp
4

1LsLpbPNS2w98WnKbQ2MmubkQBWhxbPvrz
5

Please, I ask this team to help me because these are all savings I have, I'm very worried and ready to help them and begin to collaborate with the project independent of the outcome, including to correct this problem.

Thanks for all your help!

Tor Browser 6.5.1, wallet does not work, only flashing squares

Hello,

when i submit login form at https://blockchain.info/wallet/#/login
(On the bottom of the Blockchain login page is: v1.13.13 (MyWallet v3.28.9))

via Tor Browser 6.5.1 (based on Mozilla Firefox 45.8.0) it take me into my account,
But the current exchange rate "1 BTC = " shows only flashing squares (means something like "loading")

Same three flashing squares are below "Most Recent Activity" and Transactions sub-page does not show any activity.

In the Firefox 52.0.2 (64-bit), all works without issue, but in Tor Browser is mentioned problem.

I want to generate bitcoin wallet for users with api

I want to generate bitcoin wallet for users when they register on my website and I want to use php
I created server on digitalocean Ubuntu
But all my efforts fail please give me step by step instructions to follow
Thanks

Hardware device support

Will your wallet support hardware device such as Trezor or Ledger?
Electron, wallet.trezor.io or myetherwallet does it already.

"JSON.parse: unexpected character at line 1 column 1 of the JSON data"

I am using the latest Tor Browser. It is impossible to start a new wallet, I get a "JSON.parse: unexpected character at line 1 column 1 of the JSON data" error every time.

It is also impossible to on on the existing wallets. Most of the time, like 90% of the times, when you finally log on your wallet it's empty, there are no funds and no archived transactions.

The address blockchainbdgpzk.onion also redirects me every time to blockchain.info and blockchain.info recognizes that I use Tor so it redirects me to blockchainbdgpzk.onion and this goes on to ad infinium.

Frozen money

Hi
I pushed Receive button. Got address. On this address i send money. And ? Nothing !
Wallet is only blinking with squares everywhere. When I push transaction ? Empty
But money reached that address. Over 30+ confirmations.
When I push Send ? Blinkin' dots .... I can see my money only in : My wallet-> used addresses.
How to get them back ? how to send them to another adress ?
PLease help

HOW TO FIX THIS?

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]

Bitcoin

Ola quero que os bitcoins estão aonde que nem eu sei dos meus ganhos que fim levou os meus bitcoin/

2FA broken

Why i don't receive 2FA sms anymore?? i can't login anymore...
the old wallet say when i click resend sms:
3 tentativi di accesso a sinistra
and the new wallet say:
Impossibile inviare SMS di verifica. (Failed to send verification SMS)

so the problem is blockchain, please fix it quickly i can't enter in my wallet!

Error decrypting wallet, please check that your password is correct.

What can i do to this error on my bitcoin account . when i tried to sign in into my account the send me verification message to my email but it says (Error decrypting wallet, please check that your password is correct) What do i need to do to resolve this error message
Thanks

Not possible to send with 0 fee

This was something I loved from the old wallet -- the ability to send bitcoin for zero fee. Good for times when the network allows it (i.e. very old bitcoin and/or simple transactions). Would love to have this feature back.

Now it seems that there is a limit of how small the fee can be.

Impossible to login - page instantly reloads and logs you out

Summary

I am unable to login to my wallet in any functional way because the page instantly reloads and logs me out. I can provide a screen recording of the bug in action but I'm not putting it on a public site.

Steps to reproduce

Go to https://blockchain.info/wallet/#/login
and login to your account.

And yes, correct ID / password / 2FA are all given

Expected result

I am logged in and able to interact with my wallet.

What actually happens

I am logged in for about 300ms before the entire page reloads and sends me back to https://blockchain.info/ . Trying to go back to https://blockchain.info/wallet/#/home redirects me to the login page. So I am effectively locked out of my wallet.

Browsers used

Firefox 55 and Chromium 60.0.3112.78

Creating a blockchain wallet

Hello. I can not figure out how to create a blockchain purse using Javascript. Could you direct me in the right direction?

Cannot log into old wallet because of faulty authorization redirect loop

I definitely used the correct wallet id and password, but I haven't logged in since 2014. So it sends me an email with the subject: "Authorize log-in attempt". I press on the big blue "AUTHORIZE LOG IN" button and it redirects me to a page that says: "Login approved! Please return to your previous browser / tab to see your wallet."

...What now? There was no previous "browser" or "tab". If I back out of the page I'm still not inside my wallet. If I refresh that page or the log in screen I'm still not logged in and throws a prompt saying "Request Already Approved or Expired". What gives?

Would fixing this redirect code allow me to access my wallet?

A search online shows that others have the same problem:
https://www.reddit.com/r/BitcoinBeginners/comments/6cso5n/blockchaininfo_login_loop/
https://www.reddit.com/r/btc/comments/45bdzr/has_anyone_else_got_an_email_like_this_from/

Login Verification Emails not being sent

As per above have been trying to get into me wallet for a week now and ID, password and two factor all good but because email isn't being sent I have no access. It is not being blocked or sent to spam folder either as wallet ID request gets through.

Wallet address changes for no clear reason

My wallet address has changed. (Web client and iOS client)
At first it was:
12f6NiQivUAineFpNG6iWr8jgxKij8pCYL
and now it is:
13n8Tk3GMXFfRTt39QEWk6DjGFLzJ77dzd

Why has this happened? Should I get worried? Is there a bug, or do we have a security matter here?

Did I get scammed? HELP!!

I was friend-ed by a guy on Linkedin and he asked if wanted t get involved in Bitcoin. I had been reading a lot about it and thought I would give it a shot. He said that if I funded my wallet in Blockchain with a minimum of 0.1 BTC he would mine it for me. He said I would have a return of 0.3 BTC within 48 hours. He had asked me what kind of goal I had for my return and I told I asked him if $40k a month would be possible and he said he would try. Putting up the $1500.00 USD was a bit of a stretch as I am on disability and he knew this. He started the mining process and I was led to believe all was going well but he tells me know that since he had to raise the Hash_______?? that the antminer was requesting for more funding to a tune of 0.2 BTC more...about $4k today's price. He tells me now that he will release the coin back to my wallet but I will not be able to withdraw it until I come up with the 0.2 BTC and once I fund that I can withdraw all of it them. Still waiting on the return of the coin to my wallet but thinking he threw the screws to me.
Anyone know how to verify this and his information and is there anyway to do some type charge back similar to bad transactions with credit cards?
HELP!!

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.