Commit js, ts, and definitions in separate folders

This commit is contained in:
junderw 2019-01-04 18:33:02 +09:00
parent e7ac2b9a4e
commit bc28949056
No known key found for this signature in database
GPG key ID: B256185D3A971908
148 changed files with 3850 additions and 39 deletions
ts_src/templates

View file

@ -0,0 +1,17 @@
// OP_RETURN {data}
import * as bscript from '../script'
const OPS = bscript.OPS
export function check (script: Buffer | Array<number | Buffer>): boolean {
const buffer = bscript.compile(script)
return buffer.length > 1 &&
buffer[0] === OPS.OP_RETURN
}
check.toJSON = function () { return 'null data output' }
const output = { check }
export {
output
}