diff --git a/README.md b/README.md index 4ea6679..fab0052 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,8 @@ var myCoin = { "name": "Dogecoin", "symbol": "DOGE", "algorithm": "scrypt", + "nValue": 1024, //optional. Defaults to 1024 + "rValue": 1, //optional. Defaults to 1 "txMessages": false, //or true (not required, defaults to false) }; ``` diff --git a/lib/algoProperties.js b/lib/algoProperties.js index 810c77f..c610f96 100644 --- a/lib/algoProperties.js +++ b/lib/algoProperties.js @@ -14,13 +14,15 @@ var algos = module.exports = global.algos = { } } }, - scrypt: { + 'scrypt': { //Uncomment diff if you want to use hardcoded truncated diff //diff: '0000ffff00000000000000000000000000000000000000000000000000000000', multiplier: Math.pow(2, 16), - hash: function(){ - return function(){ - return multiHashing.scrypt.apply(this, arguments); + hash: function(coinConfig){ + var nValue = coinConfig.nValue || 1024; + var rValue = coinConfig.rValue || 1; + return function(data){ + return multiHashing.scrypt(data,nValue,rValue); } } }, @@ -159,4 +161,4 @@ for (var algo in algos){ else{ algos[algo].maxDiff = diff1; }*/ -} \ No newline at end of file +}