Commit js, ts, and definitions in separate folders
This commit is contained in:
parent
e7ac2b9a4e
commit
bc28949056
148 changed files with 3850 additions and 39 deletions
ts_src/templates
17
ts_src/templates/nulldata.ts
Normal file
17
ts_src/templates/nulldata.ts
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue