You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
367 B
18 lines
367 B
8 years ago
|
// OP_RETURN {data}
|
||
6 years ago
|
import * as bscript from '../script'
|
||
6 years ago
|
const OPS = bscript.OPS
|
||
8 years ago
|
|
||
6 years ago
|
export function check (script: Buffer | Array<number | Buffer>): boolean {
|
||
7 years ago
|
const buffer = bscript.compile(script)
|
||
8 years ago
|
|
||
|
return buffer.length > 1 &&
|
||
|
buffer[0] === OPS.OP_RETURN
|
||
|
}
|
||
8 years ago
|
check.toJSON = function () { return 'null data output' }
|
||
8 years ago
|
|
||
6 years ago
|
const output = { check }
|
||
|
|
||
|
export {
|
||
|
output
|
||
|
}
|