troggy / Colored-coins-add-on-for-Copay

Copay Bitcoin wallet addon with support for Colored Coins.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Copay addon with support for Colored Coins.

Installation

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)

  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 -
    
  2. 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 -
    
  3. Add copayAddon.coloredCoins module as dependency of copayApp.addons module (in copay/src/js/app.js):

    angular.module('copayApp.addons', ['copayAddon.coloredCoins']);
    
  4. 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',
    },
    
  5. 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'
    
  6. 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 of localhost. You need to have ports 8000, 8100, 8200 to be open for incoming connections for that host.

  7. 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
  8. Rebuild Copay:

    grunt
    
  9. Run services

    For development: run with foreman:

    foreman start -f bower_components/colored-coins-copay-addon/Procfile
    

    In production: export to Upstart

  10. Start bitcore-wallet-service. In bitcore-wallet-service folder:

    npm start
    
  11. Start Copay. In copay folder:

    npm start
    

About

Copay Bitcoin wallet addon with support for Colored Coins.


Languages

Language:JavaScript 81.3%Language:HTML 18.7%