Transaction: move all constants to top

This commit is contained in:
Daniel Cousens 2014-05-19 08:49:41 +10:00
parent 40f0c91162
commit 1f2becbb45

View file

@ -12,6 +12,10 @@ var ECKey = require('./eckey')
var Script = require('./script') var Script = require('./script')
var DEFAULT_SEQUENCE = 0xffffffff var DEFAULT_SEQUENCE = 0xffffffff
var SIGHASH_ALL = 0x01
var SIGHASH_NONE = 0x02
var SIGHASH_SINGLE = 0x03
var SIGHASH_ANYONECANPAY = 0x80
function Transaction(doc) { function Transaction(doc) {
if (!(this instanceof Transaction)) { return new Transaction(doc) } if (!(this instanceof Transaction)) { return new Transaction(doc) }
@ -179,11 +183,6 @@ Transaction.prototype.toHex = function() {
return this.toBuffer().toString('hex') return this.toBuffer().toString('hex')
} }
var SIGHASH_ALL = 0x01
var SIGHASH_NONE = 0x02
var SIGHASH_SINGLE = 0x03
var SIGHASH_ANYONECANPAY = 0x80
/** /**
* Hash transaction for signing a specific input. * Hash transaction for signing a specific input.
* *