Transaction: move all constants to top
This commit is contained in:
parent
40f0c91162
commit
1f2becbb45
1 changed files with 4 additions and 5 deletions
|
@ -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.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue