/** * @param TransactionInterface $tx * @param ScriptInterface $scriptPubKey * @param int $nInputToSign * @return bool */ public function verify(TransactionInterface $tx, ScriptInterface $scriptPubKey, $nInputToSign) { $error = 0; return (bool) bitcoinconsensus_verify_script($scriptPubKey->getBinary(), $tx->getBinary(), $nInputToSign, $this->flags->getFlags(), $error); }