templates: rm unused nulldata code
This commit is contained in:
parent
de90fea0ac
commit
5481bde49c
1 changed files with 1 additions and 21 deletions
|
@ -1,8 +1,6 @@
|
||||||
// OP_RETURN {data}
|
// OP_RETURN {data}
|
||||||
|
|
||||||
const bscript = require('../script')
|
const bscript = require('../script')
|
||||||
const types = require('../types')
|
|
||||||
const typeforce = require('typeforce')
|
|
||||||
const OPS = require('bitcoin-ops')
|
const OPS = require('bitcoin-ops')
|
||||||
|
|
||||||
function check (script) {
|
function check (script) {
|
||||||
|
@ -13,22 +11,4 @@ function check (script) {
|
||||||
}
|
}
|
||||||
check.toJSON = function () { return 'null data output' }
|
check.toJSON = function () { return 'null data output' }
|
||||||
|
|
||||||
function encode (data) {
|
module.exports = { output: { check: check } }
|
||||||
typeforce([types.Buffer], data)
|
|
||||||
|
|
||||||
return bscript.compile([OPS.OP_RETURN].concat(data))
|
|
||||||
}
|
|
||||||
|
|
||||||
function decode (buffer) {
|
|
||||||
typeforce(check, buffer)
|
|
||||||
|
|
||||||
return bscript.decompile(buffer).slice(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
output: {
|
|
||||||
check: check,
|
|
||||||
decode: decode,
|
|
||||||
encode: encode
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue