bitpay / bitcore-wallet

A command line interface Multisig HD Wallet, based on `bitcore-wallet-service`.
MIT License
99 stars 108 forks source link

trying to use against https://bws.bitpay.com/bws/api #31

Closed offerm closed 9 years ago

offerm commented 9 years ago

Hi,

Is this supposed to work? I managed to create a 2-2 testnet wallet. I used copay-web as my spouse. wallet creation completed just fine.

Now, when I create a txproposal from the copay-web and ask for txproposals I get: { code: 'SERVERCOMPROMISED', message: 'Server sent fake transaction proposal' }

If I try to send money using the CLI I get:

[error] { code: 'BADREQUEST', message: 'Invalid proposal signature' }

What am I doing wrong?

Please note that I'm new to NODE so don't know how to provide more information about the environment. BTW - is there a java api available?

Thanks

matiu commented 9 years ago

What version of Copay you are using? No sure what you mean by copay-web.

thanks.

offerm commented 9 years ago

Copay web - a chrome application. Similar to the android app but running on by desktop.

Dont know how to check versions. I installed with npm.

Thanks

Sent from Yahoo Mail on Android

matiu commented 9 years ago

thanks for the feedback, let us check the same scenario and we will get back to you. It seems you are doing everything right.

offerm commented 9 years ago

Here is what I'm getting from "npm info bitcore-wallet-client"

One thing to note - after installing the bitcore-wallet-client I had to manually install many dependent packages like lodash etc. Maybe this has to do with the problem.

Let me know if you like me to uninstall everything and reinstall (please tell me how to)

Offer

{ name: 'bitcore-wallet-client', description: 'Client for bitcore-wallet-service', 'dist-tags': { latest: '0.0.33' }, versions: [ '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.0.10', '0.0.11', '0.0.13', '0.0.17', '0.0.18', '0.0.19', '0.0.21', '0.0.22', '0.0.23', '0.0.25', '0.0.26', '0.0.27', '0.0.29', '0.0.30', '0.0.31', '0.0.32', '0.0.33' ], maintainers: [ 'cmgustavo cmgustavo83@gmail.com', 'ematiu ematiu@gmail.com', 'isocolsky jungans@gmail.com' ], time: { modified: '2015-05-04T16:40:32.511Z', created: '2015-03-04T20:58:46.050Z', '0.0.1': '2015-03-04T20:58:46.050Z', '0.0.2': '2015-03-05T16:02:48.748Z', '0.0.3': '2015-03-05T21:27:25.430Z', '0.0.4': '2015-03-10T21:43:12.124Z', '0.0.5': '2015-03-10T22:35:53.229Z', '0.0.6': '2015-03-16T16:51:56.221Z', '0.0.7': '2015-03-17T11:37:20.396Z', '0.0.8': '2015-03-19T15:24:21.637Z', '0.0.9': '2015-03-19T16:20:52.078Z', '0.0.10': '2015-03-19T21:25:42.318Z', '0.0.11': '2015-03-26T12:34:06.018Z', '0.0.13': '2015-03-28T17:18:56.443Z', '0.0.17': '2015-04-02T21:23:37.821Z', '0.0.18': '2015-04-02T22:31:25.169Z', '0.0.19': '2015-04-03T00:38:38.425Z', '0.0.21': '2015-04-03T21:33:22.390Z', '0.0.22': '2015-04-04T17:56:57.601Z', '0.0.23': '2015-04-07T14:13:19.869Z', '0.0.25': '2015-04-09T22:16:37.967Z', '0.0.26': '2015-04-10T17:05:40.787Z', '0.0.27': '2015-04-13T18:01:58.696Z', '0.0.29': '2015-04-15T16:18:33.881Z', '0.0.30': '2015-04-16T20:51:35.258Z', '0.0.31': '2015-04-16T22:56:36.862Z', '0.0.32': '2015-04-23T18:38:53.991Z', '0.0.33': '2015-05-04T16:40:32.511Z' }, homepage: 'https://github.com/bitpay/bitcore-wallet-client', keywords: [ 'bitcoin', 'copay', 'multisig', 'wallet', 'client', 'bitcore' ], repository: { url: 'git@github.com:bitpay/bitcore-wallet-client.git', type: 'git' }, contributors: [ 'Ivan Socolsky ivan@bitpay.com', 'Matias Alejo Garcia ematiu@gmail.com' ], author: 'BitPay Inc', bugs: { url: 'https://github.com/bitpay/bitcore-wallet-client/issues' }, readmeFilename: 'README.md', version: '0.0.33', main: 'index.js', dependencies: { async: '^0.9.0', bitcore: '^0.11.6', 'bitcore-payment-protocol': '0.10.2', 'bitcore-wallet-utils': '0.0.12', 'browser-request': '^0.3.3', browserify: '^9.0.3', coveralls: '^2.11.2', lodash: '^3.3.1', preconditions: '^1.0.8', request: '^2.53.0', sjcl: '^1.0.2', 'socket.io-client': '^1.3.5', uglify: '^0.1.1' }, devDependencies: { 'bitcore-wallet-service': '0.0.25', chai: '^1.9.1', 'grunt-jsdoc': '^0.5.8', http: '0.0.0', https: '^1.0.0', istanbul: '', jsdoc: '^3.3.0-beta1', leveldown: '^0.10.0', levelup: '^0.19.0', memdown: '^1.0.0', mocha: '^1.18.2', sinon: '^1.10.3', supertest: '' }, scripts: { start: 'node app.js', coverage: 'istanbul cover ./node_modules/.bin/_mocha -- --reporter spec test', test: 'mocha', coveralls: 'istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage' }, gitHead: 'c1864aa8f5d5b0fcc6a284f6d6e1e69809cb1eba', dist: { shasum: '406acd37c610b55c5a758fa9a7f58b2aca40b691', tarball: 'http://registry.npmjs.org/bitcore-wallet-client/-/bitcore-wallet-client-0.0.33.tgz' }, directories: {} }

offerm commented 9 years ago

another input - this has nothing to do with the copay-web wallet.

I just created two CLI walllets on my PC with a script similar to the README file.

the wallet is ready with 2 signers. I managed to transfer bitcoin to it.

however when I try to send them out I'm getting:

c:\delete\bitcore-wallet-master>node bin\wallet send -h https://bws.bitpay.com/ bws/api -f test8 msj42CCGruhRsFrGATiUuh25dtxYtnpbTx 200000bit [error] { code: 'BADREQUEST', message: 'Invalid proposal signature' }

offerm commented 9 years ago

I'm using bitcore-wallet 0.0.7 the dependency file lists bitcore-wallet-client 0.0.9

Should I really be using this old version?

Looks to me that the problem is with the creation of keys during the creation of the wallet. If no keys provided to "create" the code creates keys. However, this is done without using the network (-testnet). As such, the keys created for the livenet.

See line 612 at bitcore-wallet-client/lib/api.js (latest)

matiu commented 9 years ago

Yes! That's probably it. Would you like to update the dependency on bower.json and send a PR or we can do it later today.

On Tue, May 12, 2015 at 6:44 AM, offerm notifications@github.com wrote:

I'm using bitcore-wallet 0.0.7 the dependency file lists bitcore-wallet-client 0.0.9

Should I really be using this old version?

Looks to me that the problem is with the creation of keys during the creation of the wallet. If no keys provided to "create" the code creates keys. However, this is done without using the network (-testnet). As such, the keys created for the livenet.

See line 612 at bitcore-wallet-client/lib/api.js (latest)

— Reply to this email directly or view it on GitHub https://github.com/bitpay/bitcore-wallet/issues/31#issuecomment-101215461 .

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads!

offerm commented 9 years ago

Thanks for responding.This however is Chinese to me... I just got used to NPM. have no idea what I should do with bower and where to find bower.json. Can you please be more specific and tell me what I should do? I manually updated the bitcore-wallet-client to 0.0.33 (changed the package.json file and npm install). This however introduced aproblem between bitcore-wallet and BWC. Which versions should I be using? I also noticed that CoPay is not using the bitcore-wallet-client. is this true? Thanks Offer

  From: Matias Alejo Garcia <notifications@github.com>

To: bitpay/bitcore-wallet bitcore-wallet@noreply.github.com Cc: offerm offerm@yahoo.com Sent: Tuesday, May 12, 2015 3:37 PM Subject: Re: [bitcore-wallet] trying to use against https://bws.bitpay.com/bws/api (#31)

Yes! That's probably it. Would you like to update the dependency on bower.json and send a PR or we can do it later today.

On Tue, May 12, 2015 at 6:44 AM, offerm notifications@github.com wrote:

I'm using bitcore-wallet 0.0.7 the dependency file lists bitcore-wallet-client 0.0.9

Should I really be using this old version?

Looks to me that the problem is with the creation of keys during the creation of the wallet. If no keys provided to "create" the code creates keys. However, this is done without using the network (-testnet). As such, the keys created for the livenet.

See line 612 at bitcore-wallet-client/lib/api.js (latest)

— Reply to this email directly or view it on GitHub https://github.com/bitpay/bitcore-wallet/issues/31#issuecomment-101215461 .

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads! — Reply to this email directly or view it on GitHub.

matiu commented 9 years ago

no problem we will fix that soon, will update this thread.

Copay uses bitcore-wallet-client thru angular-bitcore-wallet-client (which depends en bwc).

On Tue, May 12, 2015 at 10:00 AM, offerm notifications@github.com wrote:

Thanks for responding.This however is Chinese to me... I just got used to NPM. have no idea what I should do with bower and where to find bower.json. Can you please be more specific and tell me what I should do? I manually updated the bitcore-wallet-client to 0.0.33 (changed the package.json file and npm install). This however introduced aproblem between bitcore-wallet and BWC. Which versions should I be using? I also noticed that CoPay is not using the bitcore-wallet-client. is this true? Thanks Offer

From: Matias Alejo Garcia notifications@github.com To: bitpay/bitcore-wallet bitcore-wallet@noreply.github.com Cc: offerm offerm@yahoo.com Sent: Tuesday, May 12, 2015 3:37 PM Subject: Re: [bitcore-wallet] trying to use against https://bws.bitpay.com/bws/api (#31)

Yes! That's probably it. Would you like to update the dependency on bower.json and send a PR or we can do it later today.

On Tue, May 12, 2015 at 6:44 AM, offerm notifications@github.com wrote:

I'm using bitcore-wallet 0.0.7 the dependency file lists bitcore-wallet-client 0.0.9

Should I really be using this old version?

Looks to me that the problem is with the creation of keys during the creation of the wallet. If no keys provided to "create" the code creates keys. However, this is done without using the network (-testnet). As such, the keys created for the livenet.

See line 612 at bitcore-wallet-client/lib/api.js (latest)

— Reply to this email directly or view it on GitHub < https://github.com/bitpay/bitcore-wallet/issues/31#issuecomment-101215461> .

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads! — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/bitpay/bitcore-wallet/issues/31#issuecomment-101266955 .

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads!

matiu commented 9 years ago

Oh, I see the problem, the npm version of bitcore-wallet is outdated.

We just update it (v0.0.9). could you please update you local copy and try again.

thanks.

On Tue, May 12, 2015 at 10:12 AM, Matias Alejo Garcia ematiu@gmail.com wrote:

no problem we will fix that soon, will update this thread.

Copay uses bitcore-wallet-client thru angular-bitcore-wallet-client (which depends en bwc).

On Tue, May 12, 2015 at 10:00 AM, offerm notifications@github.com wrote:

Thanks for responding.This however is Chinese to me... I just got used to NPM. have no idea what I should do with bower and where to find bower.json. Can you please be more specific and tell me what I should do? I manually updated the bitcore-wallet-client to 0.0.33 (changed the package.json file and npm install). This however introduced aproblem between bitcore-wallet and BWC. Which versions should I be using? I also noticed that CoPay is not using the bitcore-wallet-client. is this true? Thanks Offer

From: Matias Alejo Garcia notifications@github.com To: bitpay/bitcore-wallet bitcore-wallet@noreply.github.com Cc: offerm offerm@yahoo.com Sent: Tuesday, May 12, 2015 3:37 PM Subject: Re: [bitcore-wallet] trying to use against https://bws.bitpay.com/bws/api (#31)

Yes! That's probably it. Would you like to update the dependency on bower.json and send a PR or we can do it later today.

On Tue, May 12, 2015 at 6:44 AM, offerm notifications@github.com wrote:

I'm using bitcore-wallet 0.0.7 the dependency file lists bitcore-wallet-client 0.0.9

Should I really be using this old version?

Looks to me that the problem is with the creation of keys during the creation of the wallet. If no keys provided to "create" the code creates keys. However, this is done without using the network (-testnet). As such, the keys created for the livenet.

See line 612 at bitcore-wallet-client/lib/api.js (latest)

— Reply to this email directly or view it on GitHub < https://github.com/bitpay/bitcore-wallet/issues/31#issuecomment-101215461

.

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads! — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/bitpay/bitcore-wallet/issues/31#issuecomment-101266955 .

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads!

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads!

offerm commented 9 years ago

Many thanks. Working fine now.

  From: Matias Alejo Garcia <notifications@github.com>

To: bitpay/bitcore-wallet bitcore-wallet@noreply.github.com Cc: offerm offerm@yahoo.com Sent: Tuesday, May 12, 2015 4:24 PM Subject: Re: [bitcore-wallet] trying to use against https://bws.bitpay.com/bws/api (#31)

Oh, I see the problem, the npm version of bitcore-wallet is outdated.

We just update it (v0.0.9). could you please update you local copy and try again.

thanks.

On Tue, May 12, 2015 at 10:12 AM, Matias Alejo Garcia ematiu@gmail.com wrote:

no problem we will fix that soon, will update this thread.

Copay uses bitcore-wallet-client thru angular-bitcore-wallet-client (which depends en bwc).

On Tue, May 12, 2015 at 10:00 AM, offerm notifications@github.com wrote:

Thanks for responding.This however is Chinese to me... I just got used to NPM. have no idea what I should do with bower and where to find bower.json. Can you please be more specific and tell me what I should do? I manually updated the bitcore-wallet-client to 0.0.33 (changed the package.json file and npm install). This however introduced aproblem between bitcore-wallet and BWC. Which versions should I be using? I also noticed that CoPay is not using the bitcore-wallet-client. is this true? Thanks Offer

From: Matias Alejo Garcia notifications@github.com To: bitpay/bitcore-wallet bitcore-wallet@noreply.github.com Cc: offerm offerm@yahoo.com Sent: Tuesday, May 12, 2015 3:37 PM Subject: Re: [bitcore-wallet] trying to use against https://bws.bitpay.com/bws/api (#31)

Yes! That's probably it. Would you like to update the dependency on bower.json and send a PR or we can do it later today.

On Tue, May 12, 2015 at 6:44 AM, offerm notifications@github.com wrote:

I'm using bitcore-wallet 0.0.7 the dependency file lists bitcore-wallet-client 0.0.9

Should I really be using this old version?

Looks to me that the problem is with the creation of keys during the creation of the wallet. If no keys provided to "create" the code creates keys. However, this is done without using the network (-testnet). As such, the keys created for the livenet.

See line 612 at bitcore-wallet-client/lib/api.js (latest)

— Reply to this email directly or view it on GitHub < https://github.com/bitpay/bitcore-wallet/issues/31#issuecomment-101215461

.

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads! — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/bitpay/bitcore-wallet/issues/31#issuecomment-101266955 .

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads!

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads! — Reply to this email directly or view it on GitHub.

matiu commented 9 years ago

great, thanks a lot for the feedback.

On Tue, May 12, 2015 at 10:49 AM, offerm notifications@github.com wrote:

Many thanks. Working fine now.

From: Matias Alejo Garcia notifications@github.com To: bitpay/bitcore-wallet bitcore-wallet@noreply.github.com Cc: offerm offerm@yahoo.com Sent: Tuesday, May 12, 2015 4:24 PM

Subject: Re: [bitcore-wallet] trying to use against https://bws.bitpay.com/bws/api (#31)

Oh, I see the problem, the npm version of bitcore-wallet is outdated.

We just update it (v0.0.9). could you please update you local copy and try again.

thanks.

On Tue, May 12, 2015 at 10:12 AM, Matias Alejo Garcia ematiu@gmail.com wrote:

no problem we will fix that soon, will update this thread.

Copay uses bitcore-wallet-client thru angular-bitcore-wallet-client (which depends en bwc).

On Tue, May 12, 2015 at 10:00 AM, offerm notifications@github.com wrote:

Thanks for responding.This however is Chinese to me... I just got used to NPM. have no idea what I should do with bower and where to find bower.json. Can you please be more specific and tell me what I should do? I manually updated the bitcore-wallet-client to 0.0.33 (changed the package.json file and npm install). This however introduced aproblem between bitcore-wallet and BWC. Which versions should I be using? I also noticed that CoPay is not using the bitcore-wallet-client. is this true? Thanks Offer

From: Matias Alejo Garcia notifications@github.com To: bitpay/bitcore-wallet bitcore-wallet@noreply.github.com Cc: offerm offerm@yahoo.com Sent: Tuesday, May 12, 2015 3:37 PM Subject: Re: [bitcore-wallet] trying to use against https://bws.bitpay.com/bws/api (#31)

Yes! That's probably it. Would you like to update the dependency on bower.json and send a PR or we can do it later today.

On Tue, May 12, 2015 at 6:44 AM, offerm notifications@github.com wrote:

I'm using bitcore-wallet 0.0.7 the dependency file lists bitcore-wallet-client 0.0.9

Should I really be using this old version?

Looks to me that the problem is with the creation of keys during the creation of the wallet. If no keys provided to "create" the code creates keys. However, this is done without using the network (-testnet). As such, the keys created for the livenet.

See line 612 at bitcore-wallet-client/lib/api.js (latest)

— Reply to this email directly or view it on GitHub <

https://github.com/bitpay/bitcore-wallet/issues/31#issuecomment-101215461

.

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads! — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub < https://github.com/bitpay/bitcore-wallet/issues/31#issuecomment-101266955> .

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads!

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads! — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/bitpay/bitcore-wallet/issues/31#issuecomment-101289214 .

Matías Alejo Garcia @ematiu Roads? Where we're going, we don't need roads!