@ -1,5 +1,4 @@
var Opcode = {
var ops = {
map: {
// push value
OP_0 : 0,
OP_FALSE : 0,
@ -136,12 +135,16 @@ var Opcode = {
OP_PUBKEYHASH : 253,
OP_PUBKEY : 254,
OP_INVALIDOPCODE : 255
},
reverseMap: []
}
for(var i in Opcode.map) {
var reverse = []
Opcode.reverseMap[Opcode.map[i]] = i
for (var op in ops) {
var code = ops[code]
reverse[code] = op
module.exports = Opcode
module.exports = {
map: ops,
reverseMap: reverse