This is a fork of Bitcoin.com's wallet with added features.
  • JavaScript 55.9%
  • CSS 19.9%
  • HTML 15.6%
  • SCSS 7.6%
  • Shell 0.5%
  • Other 0.5%
Find a file
Matias Alejo Garcia f31713576d readme updated
2014-05-01 16:37:31 -03:00
bin add File storage class and tests 2014-04-16 21:12:27 -03:00
css fix conflics 2014-05-01 09:58:56 -03:00
font fix #10 remove google fonts 2014-04-01 12:16:33 -03:00
img item tx new style 2014-04-29 16:34:40 -03:00
js fix conflicts 2014-05-01 11:04:21 -03:00
lib rm bitcore 2014-04-30 13:57:55 -03:00
sound various style and wording fixes 2014-04-29 19:30:26 -03:00
test fix conflicts 2014-05-01 11:04:21 -03:00
util add sjcl bundle to the repo to fix its bower dist 2014-04-30 11:04:59 -03:00
.bowerrc move all files to root path 2014-03-21 14:21:13 -03:00
.gitignore added a zip file to download the webapp 2014-04-24 16:30:10 -03:00
.travis.yml Fix: travis.yml and package.json 2014-04-28 15:24:27 -03:00
API.js fix conflics 2014-04-24 23:43:05 -03:00
app.js add simplest possible express server to host files 2014-04-20 16:46:03 -03:00
bower.json implements authenticated encryption 2014-04-30 11:04:16 -03:00
concat.sh copay tests in the browser! 2014-04-07 15:31:41 -03:00
config.template.js add cache for keys 2014-04-30 11:04:40 -03:00
copay.js fix browser tests 2014-04-16 21:39:42 -03:00
ghpages.sh added a zip file to download the webapp 2014-04-24 16:30:10 -03:00
Gruntfile.js improving UI and wording for signing page 2014-04-21 12:17:15 -03:00
index.html nicknames 2014-05-01 09:58:56 -03:00
karma.conf.js added tests for angular services 2014-04-23 18:07:20 -03:00
package.json fix json 2014-04-30 11:07:44 -03:00
README.md readme updated 2014-05-01 16:37:31 -03:00

Build Status

Copay

Installation:

Copy config.template.js to config.js and edit to suit your needs. (Defaults to public PeerJS and Insight servers)

Then execute these commands:

npm install
bower install
grunt --target=dev shell
node app.js

To run on a different port:

PORT=3001 node app.js

To open up five different instances to test 3-of-5 multisig with yourself, then run this in 5 different terminals:

PORT=3001 node app.js
PORT=3002 node app.js
PORT=3003 node app.js
PORT=3004 node app.js
PORT=3005 node app.js

About Copay

General

Copay implements a multisig wallet using p2sh addresses. It support multiple wallet configurations, like 3-of-5 (3 required signatures from 5 participant peers) or 2-of-3. To generate addresses to receive coins, Copay needs the public keys of all the participat peers in the wallet. Those public keys, among the wallet configuration, are combined to generate a single address to receive a payment.

To unlock the payment, and spend the wallet's funds, the needed signatures need to be collected an put togheter in the transaction. Each peer manage her own private key, and that key is never transmited to other peers. Once a transaction proposal is created, the proposal is distributed among the peers and each peer can sign the transaction locally. Once the transaction is complete, the last signing peer will broadcast the transaction to the bitcoin network, using a public API for that (Insight API by default in Copay)..

Copay also implements BIP32 to generate new addresses for the peers. This mean that the actual piece of information shared between the peers is an extended public key, from which is possible to derive more public keys so the wallet can use them. Each peer holds for himself his extended private key, to be able to sign the incoming transaction proposals.

Serverless web

Copay software does not need an application server to run. All the software is implemented in client-side Javascript. For persistent storage, the client browser's localStorage is used. This information is stored encryped using the peer's password. Also it is possible (and recommended) to backup that information with using one of the options provided by Copay, like file downloading. Without a proper backup, all wallets funds can be lost if the browser's localStorage is deleted, or the browser installation deleted.

Peer communications

Copay use peer-to-peer (p2p) networking to comunicate the parties. Parties exchange transaction proposals, public keys, nicknames and some wallet options. As mentioned above, private keys are no sent to the network.

webRTC is the used protocol. A p2p facilitator server is needed to allow the peers to find each other. Copay uses the open-sourced peerjs server implementation. Wallet participants can use a public peerjs server or install their own. Once the peers find each other, a true p2p connection is established and there is no flow of information to the server, only between the peers.

webRTC uses DTLS to secure communications between the peers, and each peer use a self-signed certificate. On top of that, Copay peers authenticate theyself by 2 factors: An identity key and a network key. The identity key is a ECDSA public key derived from the

wallet is created, the pubkey of the creator and a random 'network key' is created. This two parameters need to be securely shared between the peers, when setting up the wallet.