2019-04-21 21:30:21 +09:00
|
|
|
'use strict';
|
|
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
2019-01-04 18:33:02 +09:00
|
|
|
// OP_RETURN {data}
|
2019-04-21 21:30:21 +09:00
|
|
|
const bscript = require('../script');
|
2019-01-04 18:33:02 +09:00
|
|
|
const OPS = bscript.OPS;
|
|
|
|
function check(script) {
|
2019-04-21 21:30:21 +09:00
|
|
|
const buffer = bscript.compile(script);
|
|
|
|
return buffer.length > 1 && buffer[0] === OPS.OP_RETURN;
|
2019-01-04 18:33:02 +09:00
|
|
|
}
|
|
|
|
exports.check = check;
|
2019-03-07 14:16:45 +09:00
|
|
|
check.toJSON = () => {
|
2019-04-21 21:30:21 +09:00
|
|
|
return 'null data output';
|
2019-03-03 23:31:17 +09:00
|
|
|
};
|
2019-01-04 18:33:02 +09:00
|
|
|
const output = { check };
|
|
|
|
exports.output = output;
|