|
|
@ -1,20 +1,20 @@ |
|
|
|
'use strict'; |
|
|
|
|
|
|
|
|
|
|
|
var Address = require('./address'); |
|
|
|
var BufferReader = require('./encoding/bufferreader'); |
|
|
|
var BufferWriter = require('./encoding/bufferwriter'); |
|
|
|
var Hash = require('./crypto/hash'); |
|
|
|
var Opcode = require('./opcode'); |
|
|
|
var PublicKey = require('./publickey'); |
|
|
|
var Signature = require('./crypto/signature'); |
|
|
|
|
|
|
|
var $ = require('./util/preconditions'); |
|
|
|
var Address = require('../address'); |
|
|
|
var BufferReader = require('../encoding/bufferreader'); |
|
|
|
var BufferWriter = require('../encoding/bufferwriter'); |
|
|
|
var Hash = require('../crypto/hash'); |
|
|
|
var Opcode = require('../opcode'); |
|
|
|
var PublicKey = require('../publickey'); |
|
|
|
var Signature = require('../crypto/signature'); |
|
|
|
|
|
|
|
var $ = require('../util/preconditions'); |
|
|
|
var _ = require('lodash'); |
|
|
|
var errors = require('./errors'); |
|
|
|
var errors = require('../errors'); |
|
|
|
var buffer = require('buffer'); |
|
|
|
var BufferUtil = require('./util/buffer'); |
|
|
|
var jsUtil = require('./util/js'); |
|
|
|
var BufferUtil = require('../util/buffer'); |
|
|
|
var JSUtil = require('../util/js'); |
|
|
|
|
|
|
|
/** |
|
|
|
* A bitcoin transaction script. Each transaction's inputs and outputs |
|
|
@ -127,7 +127,7 @@ Script.prototype.toBuffer = function() { |
|
|
|
}; |
|
|
|
|
|
|
|
Script.fromString = function(str) { |
|
|
|
if (jsUtil.isHexa(str) || str.length === 0) { |
|
|
|
if (JSUtil.isHexa(str) || str.length === 0) { |
|
|
|
return new Script(new buffer.Buffer(str, 'hex')); |
|
|
|
} |
|
|
|
var script = new Script(); |