From fb98a84339d70b59c9d67d67fe35a6211eb40545 Mon Sep 17 00:00:00 2001 From: Oded Leiba Date: Sun, 6 Nov 2016 14:31:13 +0200 Subject: [PATCH 1/7] Add files via upload --- README.md | 123 +++++++++++++++++++++++++++++++- package.json | 22 ++++++ paymentEncoder.js | 70 ++++++++++++++++++ test/test.js | 178 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 391 insertions(+), 2 deletions(-) create mode 100644 package.json create mode 100644 paymentEncoder.js create mode 100644 test/test.js diff --git a/README.md b/README.md index 138609c..e2f05b5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,121 @@ -# Burn-Payment-Encoder -Provides the encode/decode functions between a Colored Coins burn-transaction payment object to buffer +# Burn-Payment-Encoder +[![Build Status](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder.svg?branch=master)](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder) [![Coverage Status](https://coveralls.io/repos/Colored-Coins/Burn-Payment-Encoder/badge.svg?branch=master)](https://coveralls.io/r/Colored-Coins/Burn-Payment-Encoder?branch=master) [![npm version](https://badge.fury.io/js/cc-burn-payment-encoder.svg)](http://badge.fury.io/js/cc-burn-payment-encoder) [![npm version](http://slack.coloredcoins.org/badge.svg)](http://slack.coloredcoins.org) + +[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) + +Payment-Encoder provides the encode/decode functions between a Colored Coins burn-transaction payment Object to buffer + +### Installation + +```sh +$ npm install cc-burn-payment-encoder +``` + + +### Encode + +Params: + +- `paymentObject` - A standard Colored Coins payment object with the following properties: + +```js +{ + // Skip input after reading asset + skip: "Boolean" + + // Range or fixed value output (valid only if burn is false or undefined) + range: "Boolean" + + // percent or fixed amount + percent: "Boolean" + + // Output to send asset to - max value is 30 if range is false and 8191 if true (valid only if burn is false or undefined) + output: "Number" + + // Total amount of units to send + amount: "Number" + + // Should this payment be interpreted as an execution of "burn" (valid only if output value and range are undefined) + burn: "Boolean" +} + +``` + +Returns a new Buffer holding the encoded payment. + +##### Example: + +```js +var paymentEncode = require('cc-burn-payment-encoder') +var paymentObject = { + skip: false, + range: false, + percent: true, + output: 1, + amount: 321321321 +} + +var code = paymentEncode.encode(paymentObject) + +console.log(code) // Will print: +``` +Alternatively, you can encode a "burn" payment: +```js +var paymentObject = { + skip: false, + percent: false, + amount: 13, + burn: true +} + +var code = paymentEncode.encode(paymentObject) + +console.log(code) // Will print: +``` + +### Decode + +Params: + +- consume - takes a consumable buffer (You can use [buffer-consumer] like in the example to create one) + +Returns a Colored Coins payment Object + +##### Example: + +```js +var paymentEncode = require('cc-burn-payment-encoder') +var consumer = require('buffer-consumer') + +var decode = paymentEncode.decode(consumer(code)) +var codeBuffer = new Buffer([0x82,0x76,0x0e,0x1b,0x48]) + +console.log(paymentEncode.decode(consumer(codeBuffer))) +// Will print: +// { +// skip: false, +// range: false, +// percent: true, +// output: 1, +// amount: 321321321 +// } +``` + +### Testing + +In order to test you need to install [mocha] globaly on your machine + +```sh +$ cd /"module-path"/cc-burn-payment-Encoder +$ mocha +``` + + +License +---- + +MIT + + +[mocha]:https://www.npmjs.com/package/mocha +[buffer-consumer]:https://www.npmjs.com/package/buffer-consumer \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..822d7fb --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "cc-burn-payment-encoder", + "version": "1.0.0", + "description": "The encoding/decoding functions for the colored-coins burn payment object scheme", + "main": "paymentEncoder.js", + "scripts": { + "test": "mocha", + "coverage": "istanbul cover _mocha -- -R spec", + "coveralls": "cat ./coverage/lcov.info | coveralls" + }, + "keywords": [ + "colored coins", + "bitcoin", + "blockchain" + ], + "author": "oleiba", + "license": "MIT", + "dependencies": { + "cc-payment-encoder": "^1.0.0", + "clone": "^2.0.0" + } +} diff --git a/paymentEncoder.js b/paymentEncoder.js new file mode 100644 index 0000000..31720c4 --- /dev/null +++ b/paymentEncoder.js @@ -0,0 +1,70 @@ +var basePaymentEncoder = require('cc-payment-encoder') +var clone = require('clone') + +var BURN_OUTPUT = 0x1f + +var padLeadingZeros = function (hex, byteSize) { + return (hex.length === byteSize * 2) && hex || padLeadingZeros('0' + hex, byteSize) +} + +module.exports = { + // isBurn - is this payment as part of a burn transaction + encode: function (paymentObject) { + if (typeof paymentObject.output === 'undefined' && !paymentObject.burn) { + throw new Error('Needs output value or burn flag') + } + if (typeof paymentObject.output !== 'undefined' && paymentObject.burn) { + throw new Error('Received both burn and output') + } + if (typeof paymentObject.range !== 'undefined' && paymentObject.burn) { + throw new Error('Received both burn and range') + } + if (!paymentObject.range && paymentObject.output === BURN_OUTPUT) { + throw new Error('Received range and output values reserved to represent burn (to indicate burn use burn flag)') + } + + if (paymentObject.burn) { + paymentObject = clone(paymentObject) + paymentObject.output = BURN_OUTPUT + paymentObject.range = false + delete paymentObject.burn + } + + return basePaymentEncoder.encode(paymentObject) + }, + + // isBurn - is this payment as part of a burn transaction + decode: function (consume) { + var ans = basePaymentEncoder.decode(consume) + var burn = !ans.range && (ans.output === BURN_OUTPUT) + if (burn) { + ans.burn = true + delete ans.output + delete ans.range + } + return ans + }, + + encodeBulk: function (paymentsArray, isBurn) { + var payments = new Buffer(0) + var amountOfPayments = paymentsArray.length + for (var i = 0; i < amountOfPayments; i++) { + var payment = paymentsArray[i] + var paymentCode = this.encode(payment, isBurn) + payments = Buffer.concat([payments, paymentCode]) + } + return payments + }, + + decodeBulk: function (consume, paymentsArray, isBurn) { + paymentsArray = paymentsArray || [] + while (true) { + try { + paymentsArray.push(this.decode(consume, isBurn)) + this.decodeBulk(consume, paymentsArray) + } catch (e) { + return paymentsArray + } + } + } +} diff --git a/test/test.js b/test/test.js new file mode 100644 index 0000000..efebe07 --- /dev/null +++ b/test/test.js @@ -0,0 +1,178 @@ +var paymentEncode = require(__dirname + '/../paymentEncoder') +var assert = require('assert') + +var consumer = function (buff) { + var curr = 0 + return function consume (len) { + return buff.slice(curr, curr += len) + } +} + +describe('Payment Decode Encode', function () { + it('should return the right decoding', function (done) { + var testCase = [ + {skip: false, range: false, percent: true, output: 12, amount: 3213213}, + {skip: true, range: false, percent: false, output: 14, amount: 321321}, + {skip: false, range: false, percent: false, output: 2, amount: 321321}, + {skip: true, range: true, percent: false, output: 0, amount: 1000000}, + {skip: false, range: false, percent: true, output: 1, amount: 321321321}, + {skip: true, range: true, percent: false, output: 5, amount: 10000003321}, + {skip: false, range: false, percent: true, output: 20, amount: 100000021000}, + {skip: true, range: false, percent: false, output: 22, amount: 1000000210002}, + {skip: false, range: false, percent: true, output: 11, amount: 321}, + {skip: true, range: true, percent: true, output: 10, amount: 1}, + {skip: true, range: true, percent: true, output: 10, amount: 1323004030000} + ] + + for (var i = 0; i < testCase.length; i++) { + var code = paymentEncode.encode(testCase[i]) + var decode = paymentEncode.decode(consumer(code)) + assert.equal(testCase[i].skip, decode.skip) + assert.equal(testCase[i].range, decode.range) + assert.equal(testCase[i].percent, decode.percent) + assert.equal(testCase[i].output, decode.output) + assert.equal(testCase[i].amount, decode.amount) + } + done() + }) + + it('should return the right encoding for burn', function (done) { + var testCase1 = paymentEncode.encode({skip: false, percent: false, amount: 13, burn: true}) + var testCase2 = paymentEncode.encode({skip: true, percent: false, amount: 123, burn: true}) + var testCase3 = paymentEncode.encode({skip: false, percent: true, amount: 25, burn: true}) + var testCase4 = paymentEncode.encode({skip: true, percent: true, amount: 10, burn: true}) + + assert.deepEqual(testCase1, new Buffer([0x1f, 0x0d])) + assert.deepEqual(testCase2, new Buffer([0x9f, 0x27, 0xb0])) + assert.deepEqual(testCase3, new Buffer([0x3f, 0x19])) + assert.deepEqual(testCase4, new Buffer([0xbf, 0x0a])) + done() + }) + + it('should return the right decoding for burn', function (done) { + var testCases = [ + {skip: false, percent: false, amount: 3213213, burn: true}, + {skip: true, percent: false, amount: 3213213, burn: true}, + {skip: false, percent: true, amount: 50, burn: true}, + {skip: true, percent: true, amount: 13, burn: true} + ] + + for (var i = 0; i < testCases.length; i++) { + var code = paymentEncode.encode(testCases[i]) + var decode = paymentEncode.decode(consumer(code)) + assert.equal(testCases[i].skip, decode.skip) + assert.equal(testCases[i].percent, decode.percent) + assert.equal(testCases[i].burn, decode.burn) + assert.equal(testCases[i].amount, decode.amount) + } + done() + }) + + it('should return the right decoding for bulk operations', function (done) { + var testCase = [ + {skip: false, range: false, percent: true, output: 12, amount: 3213213}, + {skip: true, range: false, percent: false, output: 14, amount: 321321}, + {skip: false, range: false, percent: false, output: 2, amount: 321321}, + {skip: true, range: true, percent: false, output: 0, amount: 1000000}, + {skip: false, range: false, percent: true, output: 1, amount: 321321321}, + {skip: true, range: true, percent: false, output: 5, amount: 10000003321}, + {skip: false, range: false, percent: true, output: 20, amount: 100000021000}, + {skip: true, range: false, percent: false, output: 22, amount: 1000000210002}, + {skip: false, range: false, percent: true, output: 11, amount: 321}, + {skip: true, range: true, percent: true, output: 10, amount: 1}, + {skip: true, range: true, percent: true, output: 10, amount: 1323004030000} + ] + + var code = paymentEncode.encodeBulk(testCase) + var decode = paymentEncode.decodeBulk(consumer(code)) + + for (var i = 0; i < testCase.length; i++) { + assert.equal(testCase[i].skip, decode[i].skip) + assert.equal(testCase[i].range, decode[i].range) + assert.equal(testCase[i].percent, decode[i].percent) + assert.equal(testCase[i].output, decode[i].output) + assert.equal(testCase[i].amount, decode[i].amount) + } + done() + }) + + it('should throw output value out of bounds error', function (done) { + var testCases = [ + {skip: false, range: false, percent: true, output: 32, amount: 3213213}, + {skip: true, range: true, percent: false, output: 8192, amount: 321321} + ] + + for (var i = 0; i < testCases.length; i++) { + assert.throws(function () { + paymentEncode.encode(testCases[i]) + }, /Output value is out of bounds/ + , 'Should Throw Error') + } + done() + }) + + it('should throw output value out of bounds for burn case', function (done) { + var testCase = {skip: false, range: false, percent: false, output: 31, amount: 123192} + + assert.throws(function () { + paymentEncode.encode(testCase, true) + }, /Received range and output values reserved to represent burn/ + , 'Should Throw Error') + + done() + }) + + it('should throw output value negative error', function (done) { + var testCase = {skip: true, range: true, percent: false, output: -1, amount: 321321} + assert.throws(function () { + paymentEncode.encode(testCase) + }, /Output Can\'t be negative/ + , 'Should Throw Error') + done() + }) + + it('should throw no output error', function (done) { + var testCases = [ + {skip: true, range: true, percent: true, amount: 1323004030000}, + {skip: true, range: true, percent: true, amount: 1323004030000, burn: false} + ] + + for (var i = 0; i < testCases.length; i ++) { + assert.throws(function () { + paymentEncode.encode(testCases[i]) + }, /Needs output value/ + , 'Should Throw Error') + } + done() + }) + + it('should throw both burn and output value are specified', function (done) { + var testCase = {skip: true, percent: true, output: 12, amount: 1323004030000, burn: true} + + assert.throws(function () { + paymentEncode.encode(testCase) + }, /Received both burn and output/ + , 'Should Throw Error') + done() + }) + + it('should throw both burn and range are specified', function (done) { + var testCase = {skip: true, range: true, percent: true, amount: 1323004030000, burn: true} + + assert.throws(function () { + paymentEncode.encode(testCase) + }, /Received both burn and range/ + , 'Should Throw Error') + done() + }) + + it('should throw no amount error', function (done) { + var testCase = {skip: true, range: true, percent: true, output: 12} + assert.throws(function () { + paymentEncode.encode(testCase) + }, /Needs amount value/ + , 'Should Throw Error') + done() + }) + +}) From 3eda8aed504865d1f290002edf57d927f9fbc053 Mon Sep 17 00:00:00 2001 From: Oded Leiba Date: Sun, 6 Nov 2016 14:34:11 +0200 Subject: [PATCH 2/7] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e2f05b5..c02693c 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ $ npm install cc-burn-payment-encoder Params: -- `paymentObject` - A standard Colored Coins payment object with the following properties: +`paymentObject` - A standard Colored Coins payment object with the following properties: ```js { @@ -106,7 +106,7 @@ console.log(paymentEncode.decode(consumer(codeBuffer))) In order to test you need to install [mocha] globaly on your machine ```sh -$ cd /"module-path"/cc-burn-payment-Encoder +$ cd /"module-path"/cc-burn-payment-encoder $ mocha ``` @@ -118,4 +118,4 @@ MIT [mocha]:https://www.npmjs.com/package/mocha -[buffer-consumer]:https://www.npmjs.com/package/buffer-consumer \ No newline at end of file +[buffer-consumer]:https://www.npmjs.com/package/buffer-consumer From f3e6b51db7b5086d6e33a2bc7d1144059b45df65 Mon Sep 17 00:00:00 2001 From: Oded Leiba Date: Sun, 6 Nov 2016 17:49:16 +0200 Subject: [PATCH 3/7] fix .travis.yml --- .travis.yml | 13 +++++++++++++ README.md | 4 ++-- paymentEncoder.js | 4 ---- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e7fe6b3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,13 @@ +language: node_js +node_js: +- iojs +- '0.10' +- '0.12' +- '4.4.6' +before_script: +- npm install -g istanbul +- npm install -g mocha +- npm install -g coveralls +after_script: +- npm run coverage +- npm run coveralls \ No newline at end of file diff --git a/README.md b/README.md index c02693c..46a266f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Burn-Payment-Encoder -[![Build Status](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder.svg?branch=master)](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder) [![Coverage Status](https://coveralls.io/repos/Colored-Coins/Burn-Payment-Encoder/badge.svg?branch=master)](https://coveralls.io/r/Colored-Coins/Burn-Payment-Encoder?branch=master) [![npm version](https://badge.fury.io/js/cc-burn-payment-encoder.svg)](http://badge.fury.io/js/cc-burn-payment-encoder) [![npm version](http://slack.coloredcoins.org/badge.svg)](http://slack.coloredcoins.org) +[![Build Status](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder.svg?branch=COLU-948_burn)](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder) [![Coverage Status](https://coveralls.io/repos/Colored-Coins/Burn-Payment-Encoder/badge.svg?branch=COLU-948_burn)](https://coveralls.io/r/Colored-Coins/Burn-Payment-Encoder?branch=COLU-948_burn) [![npm version](https://badge.fury.io/js/cc-burn-payment-encoder.svg)](http://badge.fury.io/js/cc-burn-payment-encoder) [![npm version](http://slack.coloredcoins.org/badge.svg)](http://slack.coloredcoins.org) -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) +[![js-standard-style](https://cdn.rawgit.com/feross/standard/COLU-948_burn/badge.svg)](https://github.com/feross/standard) Payment-Encoder provides the encode/decode functions between a Colored Coins burn-transaction payment Object to buffer diff --git a/paymentEncoder.js b/paymentEncoder.js index 31720c4..6bcde3d 100644 --- a/paymentEncoder.js +++ b/paymentEncoder.js @@ -3,10 +3,6 @@ var clone = require('clone') var BURN_OUTPUT = 0x1f -var padLeadingZeros = function (hex, byteSize) { - return (hex.length === byteSize * 2) && hex || padLeadingZeros('0' + hex, byteSize) -} - module.exports = { // isBurn - is this payment as part of a burn transaction encode: function (paymentObject) { From c0b39cb75bab6491e2357d9d5cbc96cdada71d9b Mon Sep 17 00:00:00 2001 From: Oded Leiba Date: Sun, 6 Nov 2016 17:56:33 +0200 Subject: [PATCH 4/7] fix badges and linters --- README.md | 2 +- test/test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 46a266f..440efed 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Burn-Payment-Encoder [![Build Status](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder.svg?branch=COLU-948_burn)](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder) [![Coverage Status](https://coveralls.io/repos/Colored-Coins/Burn-Payment-Encoder/badge.svg?branch=COLU-948_burn)](https://coveralls.io/r/Colored-Coins/Burn-Payment-Encoder?branch=COLU-948_burn) [![npm version](https://badge.fury.io/js/cc-burn-payment-encoder.svg)](http://badge.fury.io/js/cc-burn-payment-encoder) [![npm version](http://slack.coloredcoins.org/badge.svg)](http://slack.coloredcoins.org) -[![js-standard-style](https://cdn.rawgit.com/feross/standard/COLU-948_burn/badge.svg)](https://github.com/feross/standard) +[![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) Payment-Encoder provides the encode/decode functions between a Colored Coins burn-transaction payment Object to buffer diff --git a/test/test.js b/test/test.js index efebe07..cf8c399 100644 --- a/test/test.js +++ b/test/test.js @@ -1,3 +1,4 @@ +/* eslint-env mocha */ var paymentEncode = require(__dirname + '/../paymentEncoder') var assert = require('assert') @@ -137,7 +138,7 @@ describe('Payment Decode Encode', function () { {skip: true, range: true, percent: true, amount: 1323004030000, burn: false} ] - for (var i = 0; i < testCases.length; i ++) { + for (var i = 0; i < testCases.length; i++) { assert.throws(function () { paymentEncode.encode(testCases[i]) }, /Needs output value/ @@ -174,5 +175,4 @@ describe('Payment Decode Encode', function () { , 'Should Throw Error') done() }) - }) From 9debaebcdcf74bc4df54748ddcdcb65897a1be32 Mon Sep 17 00:00:00 2001 From: Oded Leiba Date: Sun, 6 Nov 2016 18:00:06 +0200 Subject: [PATCH 5/7] coverage badge --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 440efed..42e6185 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Burn-Payment-Encoder -[![Build Status](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder.svg?branch=COLU-948_burn)](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder) [![Coverage Status](https://coveralls.io/repos/Colored-Coins/Burn-Payment-Encoder/badge.svg?branch=COLU-948_burn)](https://coveralls.io/r/Colored-Coins/Burn-Payment-Encoder?branch=COLU-948_burn) [![npm version](https://badge.fury.io/js/cc-burn-payment-encoder.svg)](http://badge.fury.io/js/cc-burn-payment-encoder) [![npm version](http://slack.coloredcoins.org/badge.svg)](http://slack.coloredcoins.org) +[![Build Status](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder.svg?branch=COLU-948_burn)](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder) +[![Coverage Status](https://coveralls.io/repos/github/Colored-Coins/Burn-Payment-Encoder/badge.svg?branch=COLU-948_burn)](https://coveralls.io/github/Colored-Coins/Burn-Payment-Encoder?branch=COLU-948_burn) +[![npm version](https://badge.fury.io/js/cc-burn-payment-encoder.svg)](http://badge.fury.io/js/cc-burn-payment-encoder) +[![npm version](http://slack.coloredcoins.org/badge.svg)](http://slack.coloredcoins.org) [![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) From b0698130d1897c384e43a3ffa40627c9cd749fab Mon Sep 17 00:00:00 2001 From: Oded Leiba Date: Sun, 6 Nov 2016 18:03:31 +0200 Subject: [PATCH 6/7] slack badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 42e6185..81fe2fb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder.svg?branch=COLU-948_burn)](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder) [![Coverage Status](https://coveralls.io/repos/github/Colored-Coins/Burn-Payment-Encoder/badge.svg?branch=COLU-948_burn)](https://coveralls.io/github/Colored-Coins/Burn-Payment-Encoder?branch=COLU-948_burn) [![npm version](https://badge.fury.io/js/cc-burn-payment-encoder.svg)](http://badge.fury.io/js/cc-burn-payment-encoder) -[![npm version](http://slack.coloredcoins.org/badge.svg)](http://slack.coloredcoins.org) +[![Slack Status](http://slack.coloredcoins.org/badge.svg)](http://slack.coloredcoins.org) [![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) From 70e0238a7a28755fdb43a1212d7a816cd6a8281c Mon Sep 17 00:00:00 2001 From: Oded Leiba Date: Tue, 8 Nov 2016 17:03:51 +0200 Subject: [PATCH 7/7] COLU-948_burn -> master --- README.md | 4 ++-- package.json | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 81fe2fb..789844b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Burn-Payment-Encoder -[![Build Status](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder.svg?branch=COLU-948_burn)](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder) -[![Coverage Status](https://coveralls.io/repos/github/Colored-Coins/Burn-Payment-Encoder/badge.svg?branch=COLU-948_burn)](https://coveralls.io/github/Colored-Coins/Burn-Payment-Encoder?branch=COLU-948_burn) +[![Build Status](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder.svg?branch=master)](https://travis-ci.org/Colored-Coins/Burn-Payment-Encoder) +[![Coverage Status](https://coveralls.io/repos/github/Colored-Coins/Burn-Payment-Encoder/badge.svg?branch=master)](https://coveralls.io/github/Colored-Coins/Burn-Payment-Encoder?branch=master) [![npm version](https://badge.fury.io/js/cc-burn-payment-encoder.svg)](http://badge.fury.io/js/cc-burn-payment-encoder) [![Slack Status](http://slack.coloredcoins.org/badge.svg)](http://slack.coloredcoins.org) diff --git a/package.json b/package.json index 822d7fb..d1748ae 100644 --- a/package.json +++ b/package.json @@ -18,5 +18,9 @@ "dependencies": { "cc-payment-encoder": "^1.0.0", "clone": "^2.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/Colored-Coins/Burn-Payment-Encoder.git" } }