6#ifndef BITCOIN_SCRIPT_BITCOINCONSENSUS_H
7#define BITCOIN_SCRIPT_BITCOINCONSENSUS_H
11#if defined(BUILD_BITCOIN_INTERNAL) && defined(HAVE_CONFIG_H)
12#include <config/bitcoin-config.h>
14#if defined(DLL_EXPORT)
15#if defined(HAVE_FUNC_ATTRIBUTE_DLLEXPORT)
16#define EXPORT_SYMBOL __declspec(dllexport)
21#elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY)
22#define EXPORT_SYMBOL __attribute__((visibility("default")))
24#elif defined(MSC_VER) && !defined(STATIC_LIBBITCOINCONSENSUS)
25#define EXPORT_SYMBOL __declspec(dllimport)
36#define BITCOINCONSENSUS_API_VER 1
enum bitcoinconsensus_error_t bitcoinconsensus_error
EXPORT_SYMBOL unsigned int bitcoinconsensus_version()
@ bitcoinconsensus_SCRIPT_ENABLE_SIGHASH_FORKID
@ bitcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL
@ bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NONE
@ bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY
@ bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH
@ bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG
@ bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS_DEPRECATED
@ bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY
EXPORT_SYMBOL int bitcoinconsensus_verify_script_with_amount(const uint8_t *scriptPubKey, unsigned int scriptPubKeyLen, int64_t amount, const uint8_t *txTo, unsigned int txToLen, unsigned int nIn, unsigned int flags, bitcoinconsensus_error *err)
@ bitcoinconsensus_ERR_OK
@ bitcoinconsensus_ERR_TX_DESERIALIZE
@ bitcoinconsensus_ERR_AMOUNT_REQUIRED
@ bitcoinconsensus_ERR_TX_INDEX
@ bitcoinconsensus_ERR_INVALID_FLAGS
@ bitcoinconsensus_ERR_TX_SIZE_MISMATCH
EXPORT_SYMBOL int bitcoinconsensus_verify_script(const uint8_t *scriptPubKey, unsigned int scriptPubKeyLen, const uint8_t *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 scri...
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...