Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

btc-script

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

btc-script - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

4

CHANGELOG.md

@@ -0,1 +1,5 @@

0.1.8 / 2014-04-10
-----------------
* ASM support
0.1.7 / 2014-04-09

@@ -2,0 +6,0 @@ -----------------

@@ -535,2 +535,56 @@ var Opcode = require('btc-opcode');

return false
}
}
Script.prototype.toASM = function(truncate, maxEl) {
if (truncate === null) {
truncate = true;
}
if ('undefined' === typeof maxEl) {
maxEl = 20;
}
var type = this.getOutType()
var s = '';
for (var i = 0, l = this.chunks.length; i < l; i++) {
var chunk = this.chunks[i];
if (i > 0) {
s += ' ';
}
if (Array.isArray(chunk)) {
if (truncate === true) {
var maxLen = chunk.length
} else {
var maxLen = 100
}
s += new Buffer(chunk.splice(0, maxLen)).toString('hex');
if (truncate) {
s += '...'
}
} else {
if (type === 'multisig') {
switch (chunk) {
case 80:
s += 'OP_0'
break
case 81:
s += 'OP_1'
break
default:
s += Opcode.reverseMap[chunk]
}
} else {
s += Opcode.reverseMap[chunk];
}
}
if (maxEl && i > maxEl) {
s += ' ...';
break;
}
}
return s;
};

4

package.json
{
"name": "btc-script",
"version": "0.1.7",
"version": "0.1.8",
"description": "Script support for Bitcoin.",

@@ -29,2 +29,2 @@ "keywords": [

}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc