|
|
@ -8,11 +8,6 @@ var Util = require('../util'); |
|
|
|
var Script = require('./Script'); |
|
|
|
var Key = require('./Key'); |
|
|
|
|
|
|
|
var SIGHASH_ALL = 1; |
|
|
|
var SIGHASH_NONE = 2; |
|
|
|
var SIGHASH_SINGLE = 3; |
|
|
|
var SIGHASH_ANYONECANPAY = 80; |
|
|
|
|
|
|
|
var intToBufferSM = Util.intToBufferSM |
|
|
|
var bufferSMToInt = Util.bufferSMToInt; |
|
|
|
|
|
|
@ -22,6 +17,11 @@ function ScriptInterpreter(opts) { |
|
|
|
this.disableUnsafeOpcodes = true; |
|
|
|
}; |
|
|
|
|
|
|
|
var SIGHASH_ALL = ScriptInterpreter.SIGHASH_ALL = 1; |
|
|
|
var SIGHASH_NONE = ScriptInterpreter.SIGHASH_NONE = 2; |
|
|
|
var SIGHASH_SINGLE = ScriptInterpreter.SIGHASH_SINGLE = 3; |
|
|
|
var SIGHASH_ANYONECANPAY = ScriptInterpreter.SIGHASH_ANYONECANPAY = 0x80; |
|
|
|
|
|
|
|
ScriptInterpreter.prototype.eval = function eval(script, tx, inIndex, hashType, callback) { |
|
|
|
if ("function" !== typeof callback) { |
|
|
|
throw new Error("ScriptInterpreter.eval() requires a callback"); |
|
|
|