mirror of https://github.com/BTCPrivate/copay.git
parent
e68435ca42
commit
ead34550d4
138
README.md
138
README.md
|
@ -1,8 +1,8 @@
|
||||||
# Copay
|
<img src="https://raw.githubusercontent.com/marianorod/copay-brand/master/copay-logo-full-negative.png" alt="Copay" width="300">
|
||||||
[![Build Status](https://secure.travis-ci.org/bitpay/copay.svg)](http://travis-ci.org/bitpay/copay)
|
|
||||||
[![Coverage Status](https://img.shields.io/coveralls/bitpay/copay.svg)](https://coveralls.io/r/bitpay/copay?branch=master)
|
|
||||||
[![Stories in Ready](https://badge.waffle.io/bitpay/copay.svg?label=ready&title=Ready)](https://waffle.io/bitpay/copay)
|
|
||||||
|
|
||||||
|
[![Build Status](https://secure.travis-ci.org/bitpay/copay.svg)](http://travis-ci.org/bitpay/copay)
|
||||||
|
[![Coverage Status](https://img.shields.io/coveralls/bitpay/copay.svg)](https://coveralls.io/r/bitpay/copay?branch=master)
|
||||||
|
[![Stories in Ready](https://badge.waffle.io/bitpay/copay.svg?label=in progress&title=In progress)](https://waffle.io/bitpay/copay)
|
||||||
|
|
||||||
Copay is a secure bitcoin wallet for friends and companies.
|
Copay is a secure bitcoin wallet for friends and companies.
|
||||||
Easy-to-use multisignature bitcoin wallet, bringing corporate-level security to ordinary people.
|
Easy-to-use multisignature bitcoin wallet, bringing corporate-level security to ordinary people.
|
||||||
|
@ -30,10 +30,11 @@ npm install -g grunt-cli
|
||||||
|
|
||||||
Build Copay:
|
Build Copay:
|
||||||
```
|
```
|
||||||
npm install
|
|
||||||
bower install
|
bower install
|
||||||
|
npm install
|
||||||
grunt
|
grunt
|
||||||
```
|
```
|
||||||
|
|
||||||
For production environments:
|
For production environments:
|
||||||
```
|
```
|
||||||
grunt prod
|
grunt prod
|
||||||
|
@ -46,44 +47,22 @@ npm start
|
||||||
|
|
||||||
Then visit localhost:3000 in your browser.
|
Then visit localhost:3000 in your browser.
|
||||||
|
|
||||||
|
|
||||||
## Running copay
|
|
||||||
|
|
||||||
To run on a different port:
|
|
||||||
```
|
|
||||||
PORT=3001 npm start
|
|
||||||
```
|
|
||||||
|
|
||||||
To open up five different instances to test 3-of-5 multisig with yourself, then run this in 5 different terminals:
|
|
||||||
```
|
|
||||||
PORT=3001 npm start
|
|
||||||
PORT=3002 npm start
|
|
||||||
PORT=3003 npm start
|
|
||||||
PORT=3004 npm start
|
|
||||||
PORT=3005 npm start
|
|
||||||
```
|
|
||||||
|
|
||||||
To open n different instances more easily, just run:
|
|
||||||
```
|
|
||||||
n=5
|
|
||||||
node launch.js $n &
|
|
||||||
```
|
|
||||||
|
|
||||||
To require Copay as a module for use within your application:
|
|
||||||
|
|
||||||
```js
|
|
||||||
require('copay').start(3000, function(location) {
|
|
||||||
console.log('Copay server running at: ' + location);
|
|
||||||
});
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
Open test/index.html in your browser to test models. Install and run karma
|
Open test/index.html in your browser to test models. Install and run karma
|
||||||
to test the services and controllers.
|
to test the services and controllers.
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install mocha
|
||||||
|
npm install karma-cli
|
||||||
|
```
|
||||||
|
|
||||||
|
Run all tests:
|
||||||
|
|
||||||
|
```
|
||||||
|
mocha
|
||||||
|
karma start
|
||||||
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
@ -92,8 +71,6 @@ See config.js for more info. This
|
||||||
configuration could be partially overidden with the options set at
|
configuration could be partially overidden with the options set at
|
||||||
the "Settings" tab.
|
the "Settings" tab.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### Building on Ubuntu 14.04, gyp, Python
|
### Building on Ubuntu 14.04, gyp, Python
|
||||||
|
@ -110,38 +87,12 @@ One solution is to use Copay with a Python version manager for 2.6.
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
|
|
||||||
## Android APK
|
|
||||||
|
|
||||||
System Requirements
|
|
||||||
|
|
||||||
* Download [Android SDK](http://developer.android.com/sdk/index.html)
|
|
||||||
* Download and install [Crosswalk 8](https://crosswalk-project.org/#documentation/getting_started) (Use Linux setup for OSX)
|
|
||||||
|
|
||||||
Add to your ~/.bash_profile or ~/.bashrc
|
|
||||||
|
|
||||||
```
|
|
||||||
export CROSSWALK="<path to Crosswalk directory>"
|
|
||||||
```
|
|
||||||
|
|
||||||
To build the APK run the script:
|
|
||||||
|
|
||||||
```
|
|
||||||
sh android/build.sh [-d]
|
|
||||||
```
|
|
||||||
- The -d flag will package the apk in debug mode, allowing [remote debugging chrome](https://developer.chrome.com/devtools/docs/remote-debugging)
|
|
||||||
- The APK file is in **android/Copay_VERSION_arm.apk**
|
|
||||||
|
|
||||||
To install the APK in your device run:
|
|
||||||
|
|
||||||
```
|
|
||||||
adb install -r Copay_VERSION_arm.apk
|
|
||||||
```
|
|
||||||
|
|
||||||
## Google Chrome Extension
|
## Google Chrome Extension
|
||||||
|
|
||||||
To build Copay's *Chrome Extension*, run:
|
To build Copay's *Chrome Extension*, run:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm run-script chrome
|
npm run-script chrome
|
||||||
```
|
```
|
||||||
|
|
||||||
- On sucess, the chrome extension is located at:
|
- On sucess, the chrome extension is located at:
|
||||||
|
@ -161,11 +112,10 @@ System Requirements
|
||||||
Run
|
Run
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm run-script firefox
|
npm run-script firefox
|
||||||
```
|
```
|
||||||
- On sucess, the firefox add-on is located at:
|
- On sucess, the firefox add-on is located at:
|
||||||
browser-extensions/firefox/copay.xpi
|
browser-extensions/firefox/copay.xpi
|
||||||
`
|
|
||||||
|
|
||||||
# QA - Bug Reporting
|
# QA - Bug Reporting
|
||||||
|
|
||||||
|
@ -194,23 +144,6 @@ Expected: The app should login to the home screen after clicking login and show
|
||||||
Platform: Android 4.3, Android 4.4, iOS
|
Platform: Android 4.3, Android 4.4, iOS
|
||||||
|
|
||||||
|
|
||||||
## Web App
|
|
||||||
|
|
||||||
The Web App is a clean version of Copay, only the neededs files (html, css, js)
|
|
||||||
for run Copay locally or in your own server.
|
|
||||||
|
|
||||||
In order to get the ZIP file of Copay, you just need to run:
|
|
||||||
```
|
|
||||||
$ sh webapp/build.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- The ZIP file is *webapp/download/copay.zip*
|
|
||||||
- The *webapp/copay-webapp* is the unzipped version
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# About Copay
|
# About Copay
|
||||||
|
|
||||||
General
|
General
|
||||||
|
@ -228,7 +161,7 @@ Each participant manages their own private key, and that private key is never tr
|
||||||
Once a transaction proposal is created, the proposal is distributed among the
|
Once a transaction proposal is created, the proposal is distributed among the
|
||||||
wallet participants for each participant to sign the transaction locally.
|
wallet participants for each participant to sign the transaction locally.
|
||||||
Once the transaction is signed, the last signing participant will broadcast the
|
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).
|
transaction to the Bitcoin network using a public API (defaults to the [Insight API](https://github.com/bitpay/insight-api)).
|
||||||
|
|
||||||
*Copay* also implements BIP32 to generate new addresses for the peers. The public key each participant contributes
|
*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
|
to the wallet is a BIP32 extended public key. As additional public keys are needed for wallet operations (to produce
|
||||||
|
@ -238,24 +171,12 @@ Private keys are used to sign transaction proposals to make a payment from the s
|
||||||
|
|
||||||
Addresses are generated using the procedure described on [https://github.com/maraoz/bips/blob/master/bip-NNNN.mediawiki].
|
Addresses are generated using the procedure described on [https://github.com/maraoz/bips/blob/master/bip-NNNN.mediawiki].
|
||||||
|
|
||||||
|
|
||||||
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. Locally stored data is
|
|
||||||
encrypted using a password provided by the local user. Data kept in browser local storage should be
|
|
||||||
backed up for safekeeping using one of the methods provided by *Copay*, such as downloading the data into a file.
|
|
||||||
Without a proper backup of the user's private key data, all funds stored in the
|
|
||||||
wallet may be lost or inaccessible if the browser's localStorage is deleted, the browser uninstalled,
|
|
||||||
the local hard disk fails, etc.
|
|
||||||
|
|
||||||
Security model
|
Security model
|
||||||
--------------
|
--------------
|
||||||
*Copay* peers encrypt and sign each message using
|
*Copay* peers encrypt and sign each message using
|
||||||
ECIES (a.k.a. asynchronous encryption) as decribed on
|
ECIES (a.k.a. asynchronous encryption) as decribed on
|
||||||
[http://en.wikipedia.org/wiki/Integrated_Encryption_Scheme].
|
[http://en.wikipedia.org/wiki/Integrated_Encryption_Scheme].
|
||||||
|
|
||||||
|
|
||||||
The *identity key* is a ECDSA public key derived from the participant's extended public
|
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
|
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.
|
should only be known by members of the WR.
|
||||||
|
@ -266,20 +187,3 @@ is named *peerId*.
|
||||||
Registering with a hash avoids disclosing the copayerId to parties outside of the WR.
|
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
|
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.
|
know the full copayerIds of all the other members of the WR.
|
||||||
|
|
||||||
Secret String
|
|
||||||
-------------
|
|
||||||
When a wallet is been created, a secret string is provided to invite new peers to the new wallet. This string
|
|
||||||
is the *peerId* of the wallet creator, and it is necessary for the other peers to find the wallet. Once
|
|
||||||
the other peers join, all public keys (*copayerId*s) are stored by each peer, so peers can find each other
|
|
||||||
with out sharing extra information.
|
|
||||||
|
|
||||||
For added security and to prevent Man-on-the-middle Attacks on the peerJS server, peers should check each other's IDs (*peerIDs*), during wallet creation. That information is shown on the setup screen.
|
|
||||||
|
|
||||||
|
|
||||||
Wallet backups
|
|
||||||
--------------
|
|
||||||
Wallet funds can be restored using an old backups, since new addresses are
|
|
||||||
scanned in the blockchain for transactions. The scan window is set to 20.
|
|
||||||
However, if address bookmarks were created after the backup, or new transaction proposal were created,
|
|
||||||
they will only be restored if one peer participating the wallet have them.
|
|
||||||
|
|
Loading…
Reference in New Issue