bitcoinjs-lib/src/templates/nulldata.ts

16 lines
340 B
TypeScript
Raw Normal View History

// OP_RETURN {data}
2018-06-25 16:25:12 +10:00
const bscript = require('../script')
const OPS = require('bitcoin-ops')
function check (script) {
const buffer = bscript.compile(script)
return buffer.length > 1 &&
buffer[0] === OPS.OP_RETURN
}
check.toJSON = function () { return 'null data output' }
2018-07-13 13:09:41 +10:00
module.exports = { output: { check: check } }
export {}