|
@ -1,15 +1,14 @@ |
|
|
// <scriptSig> {serialized scriptPubKey script}
|
|
|
// <scriptSig> {serialized scriptPubKey script}
|
|
|
|
|
|
|
|
|
const bscript = require('../../script') |
|
|
import * as bscript from '../../script' |
|
|
const types = require('../../types') |
|
|
|
|
|
const typeforce = require('typeforce') |
|
|
const typeforce = require('typeforce') |
|
|
|
|
|
|
|
|
const p2ms = require('../multisig/') |
|
|
import * as p2ms from '../multisig' |
|
|
const p2pk = require('../pubkey/') |
|
|
import * as p2pk from '../pubkey' |
|
|
const p2pkh = require('../pubkeyhash/') |
|
|
import * as p2pkh from '../pubkeyhash' |
|
|
|
|
|
|
|
|
function check (chunks, allowIncomplete) { |
|
|
export function check (chunks: Array<Buffer>, allowIncomplete?: boolean): boolean { |
|
|
typeforce(types.Array, chunks) |
|
|
typeforce(typeforce.Array, chunks) |
|
|
if (chunks.length < 1) return false |
|
|
if (chunks.length < 1) return false |
|
|
|
|
|
|
|
|
const witnessScript = chunks[chunks.length - 1] |
|
|
const witnessScript = chunks[chunks.length - 1] |
|
@ -35,6 +34,3 @@ function check (chunks, allowIncomplete) { |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
check.toJSON = function () { return 'witnessScriptHash input' } |
|
|
check.toJSON = function () { return 'witnessScriptHash input' } |
|
|
|
|
|
|
|
|
module.exports = { check } |
|
|
|
|
|
export {} |
|
|
|
|
|