Go to file
Matias Alejo Garcia 3197e9449b Merge pull request #2429 from cmgustavo/bug/txsproposals-01
Update tx proposals after change the unit
2015-03-06 11:55:21 -03:00
browser-extensions fix grunt 2015-01-05 15:12:54 -03:00
cordova Display loading spinner on mobile devices 2015-02-13 18:05:09 -03:00
css Improve history with comments. Cleaning tx details popup 2015-02-19 20:15:23 -03:00
font add circle icons 2015-02-10 16:49:00 -03:00
img add clipo 2014-12-10 12:10:04 -03:00
js Merge pull request #2429 from cmgustavo/bug/txsproposals-01 2015-03-06 11:55:21 -03:00
lib update bitcore 2014-12-19 19:10:34 -03:00
po More translations fixes 2015-02-23 17:59:40 -03:00
setup Remove underscore for lodash 2014-10-25 21:14:59 -03:00
shell we still need node integration, so fix moment loader another way 2014-07-07 15:53:42 -04:00
sound
test Fix karma test 2015-02-20 12:27:05 -03:00
util fixed swipe script 2014-12-22 16:59:37 -03:00
views More translations fixes 2015-02-23 17:59:40 -03:00
webapp
.bowerrc
.coveralls.yml
.ctags
.gitignore Enhancement of mobile files generation. Created a dist folder with all compressed files 2014-11-22 17:54:07 -03:00
.jshint Add Insight save and register 2014-10-24 10:51:38 -03:00
.travis.yml Test for profile backups. Update travis.yaml 2014-11-12 12:35:50 -03:00
CHANGES.md Update CHANGES.md 2014-06-27 18:32:38 -03:00
CONTRIBUTE.md Removes mobile check. Adds QA bug reporting standard to Readme. 2014-10-02 13:51:56 -03:00
Gruntfile.js Autodetect device language. Removed select language from settings 2015-02-23 15:40:14 -03:00
LICENSE add MIT license 2014-06-04 18:36:42 -07:00
Makefile grunt prod duplicated 2015-02-06 10:52:14 -03:00
README.md Update README.md 2015-02-20 14:54:09 -03:00
TODO.md Update README.md and reference to Crosswalk 8 2014-07-17 16:59:04 -03:00
app.js update bitcore 2014-12-19 19:10:34 -03:00
bower.json add configService 2014-12-05 14:33:49 -03:00
config.js Autodetect device language. Removed select language from settings 2015-02-23 15:40:14 -03:00
copay.js add configService 2014-12-05 14:33:49 -03:00
index.html Fix translation string. Complete some words in spanish 2015-02-23 14:55:19 -03:00
init.js chromeStorage fixes 2014-12-05 11:56:42 -03:00
initial.js Multiple fixes for chrome app 2014-12-05 11:56:42 -03:00
jsdoc.conf.json JSDocs generated by grunt 2014-09-13 23:49:56 -03:00
karma.conf.js Setting up karma coverage 2015-02-18 12:41:10 -03:00
launch.js run js-beautify on everything 2014-06-24 08:36:32 -07:00
package.json Added karma-coverage to package.json 2015-02-18 14:51:51 -03:00
popup.html Update firefox extension 2014-08-01 09:49:03 -03:00
server.js run js-beautify on everything 2014-06-24 08:36:32 -07:00

README.md

Copay

Build Status Coverage Status ![Stories in Ready](https://badge.waffle.io/bitpay/copay.svg?label=in progress&title=In progress)

Copay is an open-source secure bitcoin wallet platform for friends and companies. Easy-to-use multisignature bitcoin wallet, bringing corporate-level security to ordinary people.

When friends or company executives join a Copay wallet, more than one person must sign every transaction. If your computer is compromised and your private keys are stolen, the bitcoins are still safe if you use the multi-signature feature. This is in addition to state-of-the-art encrypted storage and communication.

Before you start

Please check Copay Known Issues before using Copay with real Bitcoins.

Installation

git clone https://github.com/bitpay/copay.git
cd copay

Install bower and grunt if you haven't already:

npm install -g bower
npm install -g grunt-cli

Build Copay:

bower install
npm install
grunt

For production environments:

grunt prod

Open Copay:

npm start

Then visit localhost:3000 in your browser.

Tests

Open test/index.html in your browser to test models. Install and run karma to test the services and controllers.

npm install mocha
npm install karma-cli

Run all tests:

mocha
karma start

Configuration

The default configuration can be found in the config.js file. See config.js for more info. This configuration could be partially overidden with the options set at the "Settings" tab.

Troubleshooting

Building on Ubuntu 14.04, gyp, Python

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2

Ubuntu 14.04 has Python 2.7, but gyp requires Python 2.6 (http://stackoverflow.com/questions/21155922/error-installing-node-gyp-on-ubuntu)

One solution is to use Copay with a Python version manager for 2.6.

Development

Google Chrome App

To build Copay's Chorme App, run:

npm run-script chrome
  • On sucess, the chrome extension is located at: browser-extensions/chrome/copay-chrome-extension

To install it go to chrome://extensions/ at your chrome browser, make sure you have 'developer mode' option checked at your Chrome settings. Click on "Load unpacked chrome extension" and choose the directory mentioned above.

Firefox Add-on

Firefox Extension is no longer supported.

QA - Bug Reporting

In the interest of improving bug reporting, each bug that you find and want to create a ticket about it, please refer to a form that contains:

· Brief description of the bug · Steps to reproduce it · Platform in which you are testing · Screenshots if possible · Expected behaviour

i.e:

The application fails at login.

  1. Launch the app npm run start

  2. Click on "Join a Wallet"

  3. Type an unexistent username

  4. The app stops working, throws "Unhandled exception" error.

Expected: The app should login to the home screen after clicking login and show no errors.

Platform: Android 4.3, Android 4.4, iOS

About Copay

General

Copay implements a multisig wallet using p2sh addresses. It supports multiple wallet configurations, such as 3-of-5 (3 required signatures from 5 participant peers) or 2-of-3. To create a multisig wallet shared between multiple participants, Copay needs the public keys of all the wallet participants. Those public keys are incorporated into the wallet configuration and are combined to generate a payment address with which funds can be sent into the wallet.

To unlock the payment and spend the wallet's funds, a quorum of participant signatures must be collected and assembled in the transaction. The funds cannot be spent without at least the minimum number of signatures required by the wallet configuration (2 of 3, 3 of 5, 6 of 6, etc). Each participant manages their own private key, and that private key is never transmitted anywhere. Once a transaction proposal is created, the proposal is distributed among the wallet participants for each participant to sign the transaction locally. Once the transaction is signed, the last signing participant will broadcast the transaction to the Bitcoin network using a public API (defaults to the Insight API).

Copay also implements BIP32 to generate new addresses for the peers. The public key each participant contributes to the wallet is a BIP32 extended public key. As additional public keys are needed for wallet operations (to produce new addresses to receive payments into the wallet, for example) new public keys can be derived from the participants' original extended public keys. Each participant keeps their own private keys locally. Private keys are not shared. Private keys are used to sign transaction proposals to make a payment from the shared wallet.

Addresses are generated using the procedure described on [https://github.com/maraoz/bips/blob/master/bip-NNNN.mediawiki].

Security model

Copay peers encrypt and sign each message using ECIES (a.k.a. asynchronous encryption) as decribed on [http://en.wikipedia.org/wiki/Integrated_Encryption_Scheme].

The identity key is a ECDSA public key derived from the participant's extended public key using a specific BIP32 branch. This special public key is never used for Bitcoin address creation, and should only be known by members of the WR. In Copay this special public key is named copayerId. The copayerId is hashed and the hash is used to register with the peerjs server (See SINs at https://en.bitcoin.it/wiki/Identity_protocol_v1). This hash is named peerId.

Registering with a hash avoids disclosing the copayerId to parties outside of the WR. Peer discovery is accomplished using only the hashes of the WR members' copayerIds. All members of the WR know the full copayerIds of all the other members of the WR.

Bitcore

Copay uses the Javascript library Bitcore for Bitcoin related functions. Bitcore should be built this way:

var cmd = `node util/build_bitcore.js`
cd <BITCORE_HOME>
node $cmd

Payment Protocol

Copay support BIP70 (Payment Protocol), with the following current limitations:

  • Only one output is allowed. Payment requests is more that one output are not supported.
  • Only standard Pay-to-pubkeyhash and Pay-to-scripthash scripts are supported (on payment requests). Other script types will cause the entire payment request to be rejected.
  • Memos from the custormer to the server are not supported (i.e. there is no place to write messages to the server in the current UX)