Changeset View
Changeset View
Standalone View
Standalone View
src/script/bitcoinconsensus.h
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_BITCOINCONSENSUS_H | #ifndef BITCOIN_BITCOINCONSENSUS_H | ||||
#define BITCOIN_BITCOINCONSENSUS_H | #define BITCOIN_BITCOINCONSENSUS_H | ||||
#include <cstdint> | #include <cstdint> | ||||
#include "amount.h" | |||||
#if defined(BUILD_BITCOIN_INTERNAL) && defined(HAVE_CONFIG_H) | #if defined(BUILD_BITCOIN_INTERNAL) && defined(HAVE_CONFIG_H) | ||||
#include "config/bitcoin-config.h" | #include "config/bitcoin-config.h" | ||||
#if defined(_WIN32) | #if defined(_WIN32) | ||||
#if defined(DLL_EXPORT) | #if defined(DLL_EXPORT) | ||||
#if defined(HAVE_FUNC_ATTRIBUTE_DLLEXPORT) | #if defined(HAVE_FUNC_ATTRIBUTE_DLLEXPORT) | ||||
#define EXPORT_SYMBOL __declspec(dllexport) | #define EXPORT_SYMBOL __declspec(dllexport) | ||||
#else | #else | ||||
#define EXPORT_SYMBOL | #define EXPORT_SYMBOL | ||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
/// additional constraints specified by flags. | /// additional constraints specified by flags. | ||||
/// If not nullptr, err will contain an error/success code for the operation | /// If not nullptr, err will contain an error/success code for the operation | ||||
EXPORT_SYMBOL int bitcoinconsensus_verify_script( | EXPORT_SYMBOL int bitcoinconsensus_verify_script( | ||||
const uint8_t *scriptPubKey, unsigned int scriptPubKeyLen, | const uint8_t *scriptPubKey, unsigned int scriptPubKeyLen, | ||||
const uint8_t *txTo, unsigned int txToLen, unsigned int nIn, | const uint8_t *txTo, unsigned int txToLen, unsigned int nIn, | ||||
unsigned int flags, bitcoinconsensus_error *err); | unsigned int flags, bitcoinconsensus_error *err); | ||||
EXPORT_SYMBOL int bitcoinconsensus_verify_script_with_amount( | EXPORT_SYMBOL int bitcoinconsensus_verify_script_with_amount( | ||||
const uint8_t *scriptPubKey, unsigned int scriptPubKeyLen, int64_t amount, | const uint8_t *scriptPubKey, unsigned int scriptPubKeyLen, CAmount amount, | ||||
const uint8_t *txTo, unsigned int txToLen, unsigned int nIn, | const uint8_t *txTo, unsigned int txToLen, unsigned int nIn, | ||||
unsigned int flags, bitcoinconsensus_error *err); | unsigned int flags, bitcoinconsensus_error *err); | ||||
EXPORT_SYMBOL unsigned int bitcoinconsensus_version(); | EXPORT_SYMBOL unsigned int bitcoinconsensus_version(); | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} // extern "C" | } // extern "C" | ||||
#endif | #endif | ||||
#undef EXPORT_SYMBOL | #undef EXPORT_SYMBOL | ||||
#endif // BITCOIN_BITCOINCONSENSUS_H | #endif // BITCOIN_BITCOINCONSENSUS_H |