@@ -26,8 +26,6 @@ const bitcore = require('bitcore-lib-cash') | ||
| Message.prototype.createMessage = function () { | ||
| const lhs = Buffer.alloc(4, 0); | ||
| const rhs = Buffer.alloc(4, 0); | ||
| ScriptNumber.encode(this.blockHeight).copy(lhs); | ||
| ScriptNumber.encode(this.threshold).copy(rhs); | ||
| console.log('decoded price', ScriptNumber.decode(rhs, 4, false)) | ||
| console.log('decoded threshold', ScriptNumber.decode(lhs, 4, false)) | ||
| const lhs = ScriptNumber.encode(this.blockHeight) | ||
| const rhs = ScriptNumber.encode(this.threshold) | ||
| // console.log('encoded blockheight', ScriptNumber.encode(this.blockHeight)) | ||
| // console.log('encoded threshold', ScriptNumber.encode(this.threshold)) | ||
| return Buffer.concat([lhs, rhs]); | ||
@@ -34,0 +32,0 @@ } |
@@ -42,3 +42,3 @@ const bitcore = require('bitcore-lib-cash') | ||
| outScript.add('OP_DUP') | ||
| outScript.add('OP_4') | ||
| outScript.add('OP_3') | ||
| outScript.add('OP_SPLIT') | ||
@@ -49,4 +49,3 @@ outScript.add('OP_SWAP') | ||
| const threshBuf = Buffer.alloc(4, 0); | ||
| ScriptNumber.encode(this.threshold).copy(threshBuf); | ||
| const threshBuf = ScriptNumber.encode(this.threshold); | ||
| outScript.add(threshBuf) | ||
@@ -53,0 +52,0 @@ |
+1
-1
| { | ||
| "name": "jeton-lib", | ||
| "version": "1.6.1", | ||
| "version": "1.6.3", | ||
| "description": "Extension of bitcore-lib-cash for advanced Bitcoin Cash transaction types", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+1
-1
@@ -19,3 +19,3 @@ # Jeton Lib | ||
| "dependencies": { | ||
| "jeton-lib": "^1.5.0", | ||
| "jeton-lib": "^1.6.2", | ||
| ... | ||
@@ -22,0 +22,0 @@ } |
36669
-0.26%859
-0.35%