Bitcoin
Classes | Namespaces | Functions | Variables
bitcoinconsensus.cpp File Reference
#include <script/bitcoinconsensus.h>
#include <primitives/transaction.h>
#include <pubkey.h>
#include <script/interpreter.h>
#include <version.h>

Classes

class  anonymous_namespace{bitcoinconsensus.cpp}::TxInputStream
 
struct  anonymous_namespace{bitcoinconsensus.cpp}::ECCryptoClosure
 

Namespaces

 anonymous_namespace{bitcoinconsensus.cpp}
 

Functions

int anonymous_namespace{bitcoinconsensus.cpp}::set_error (bitcoinconsensus_error *ret, bitcoinconsensus_error serror)
 
static bool verify_flags (unsigned int flags)
 
static int verify_script (const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, CAmount amount, const unsigned char *txTo, unsigned int txToLen, unsigned int nIn, unsigned int flags, bitcoinconsensus_error *err)
 
int bitcoinconsensus_verify_script_with_amount (const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, int64_t amount, const unsigned char *txTo, unsigned int txToLen, unsigned int nIn, unsigned int flags, bitcoinconsensus_error *err)
 
int bitcoinconsensus_verify_script (const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, const unsigned char *txTo, unsigned int txToLen, unsigned int nIn, unsigned int flags, bitcoinconsensus_error *err)
 
unsigned int bitcoinconsensus_version ()
 

Variables

ECCryptoClosure anonymous_namespace{bitcoinconsensus.cpp}::instance_of_eccryptoclosure
 

Function Documentation

◆ bitcoinconsensus_verify_script()

int bitcoinconsensus_verify_script ( const unsigned char *  scriptPubKey,
unsigned int  scriptPubKeyLen,
const unsigned char *  txTo,
unsigned int  txToLen,
unsigned int  nIn,
unsigned int  flags,
bitcoinconsensus_error err 
)

Returns 1 if the input nIn of the serialized transaction pointed to by txTo correctly spends the scriptPubKey pointed to by scriptPubKey under the additional constraints specified by flags. If not nullptr, err will contain an error/success code for the operation

◆ bitcoinconsensus_verify_script_with_amount()

int bitcoinconsensus_verify_script_with_amount ( const unsigned char *  scriptPubKey,
unsigned int  scriptPubKeyLen,
int64_t  amount,
const unsigned char *  txTo,
unsigned int  txToLen,
unsigned int  nIn,
unsigned int  flags,
bitcoinconsensus_error err 
)

◆ bitcoinconsensus_version()

unsigned int bitcoinconsensus_version ( )

◆ verify_flags()

static bool verify_flags ( unsigned int  flags)
static

Check that all specified flags are part of the libconsensus interface.

◆ verify_script()

static int verify_script ( const unsigned char *  scriptPubKey,
unsigned int  scriptPubKeyLen,
CAmount  amount,
const unsigned char *  txTo,
unsigned int  txToLen,
unsigned int  nIn,
unsigned int  flags,
bitcoinconsensus_error err 
)
static