Copay addon with support for Colored Coins.
This addon requires extra features from Copay and BWS to be supported. Some of these features aren't pulled yet in Copay and BWS master branches, so you have to use custom Copay and BWS. For your convenience you can use prepared Copay version from here and skip steps 1 to 6 (except BWS part of step 1)
-
Install Copay and BWS from the following code trees:
Copay: https://github.com/troggy/copay/tree/wip
git clone -b wip https://github.com/troggy/copay && cd copay && bower i && npm i && cd -
Bitcore Wallet Service: https://github.com/troggy/bitcore-wallet-service/tree/wip
git clone -b wip https://github.com/troggy/bitcore-wallet-service && cd bitcore-wallet-service && npm install && cd -
-
In Copay instance folder execute the following. This will install addon and it's dependencies:
bower install colored-coins-copay-addon && cd bower_components/colored-coins-copay-addon && npm i && cd -
-
Add
copayAddon.coloredCoins
module as dependency ofcopayApp.addons
module (incopay/src/js/app.js
):angular.module('copayApp.addons', ['copayAddon.coloredCoins']);
-
Set up your Copay to use local BWS. In
copay/src/js/services/configService.js
:Change
// Bitcore wallet service URL bws: { url: 'https://bws.bitpay.com/bws/api', },
to
// Bitcore wallet service URL bws: { url: 'http://localhost:3232/bws/api', },
-
Update Copay's Gruntfile (
copay/Grunfile.js
).Add the following under
concat.angular.src
:'bower_components/colored-coins-copay-addon/dist/copayColoredCoins.js', 'bower_components/colored-coins-copay-addon/config.js'
And under
concat.foundation.src
:'bower_components/colored-coins-copay-addon/css/assets.css'
-
If you are installing this addon on public Copay (in other words, not for development purposes), change
bower_components/colored-coins-copay-addon/config.js
so that it has your copay's host name instead oflocalhost
. You need to have ports 8000, 8100, 8200 to be open for incoming connections for that host. -
Addon uses S3 bucket to store uploaded asset icons. Configuration:
- Configure AWS profile. It should have
PutObject
permission on you bucket. - Change profile, bucket and region names in
bower_components/colored-coins-copay-addon/Procfile
- Configure AWS profile. It should have
-
Rebuild Copay:
grunt
-
Run services
For development: run with foreman:
foreman start -f bower_components/colored-coins-copay-addon/Procfile
In production: export to Upstart
-
Start bitcore-wallet-service. In
bitcore-wallet-service
folder:npm start
-
Start Copay. In
copay
folder:npm start