Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

dashconsensus.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2015 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_BITCOINCONSENSUS_H
7 #define BITCOIN_BITCOINCONSENSUS_H
8 
9 #include <stdint.h>
10 
11 #if defined(BUILD_BITCOIN_INTERNAL) && defined(HAVE_CONFIG_H)
12 #include <config/dash-config.h>
13  #if defined(_WIN32)
14  #if defined(DLL_EXPORT)
15  #if defined(HAVE_FUNC_ATTRIBUTE_DLLEXPORT)
16  #define EXPORT_SYMBOL __declspec(dllexport)
17  #else
18  #define EXPORT_SYMBOL
19  #endif
20  #endif
21  #elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY)
22  #define EXPORT_SYMBOL __attribute__ ((visibility ("default")))
23  #endif
24 #elif defined(MSC_VER) && !defined(STATIC_LIBBITCOINCONSENSUS)
25  #define EXPORT_SYMBOL __declspec(dllimport)
26 #endif
27 
28 #ifndef EXPORT_SYMBOL
29  #define EXPORT_SYMBOL
30 #endif
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 #define BITCOINCONSENSUS_API_VER 0
37 
39 {
46 
48 enum
49 {
51  dashconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), // evaluate P2SH (BIP16) subscripts
52  dashconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), // enforce strict DER (BIP66) compliance
53  dashconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY = (1U << 4), // enforce NULLDUMMY (BIP147)
54  dashconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9), // enable CHECKLOCKTIMEVERIFY (BIP65)
55  dashconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY = (1U << 10), // enable CHECKSEQUENCEVERIFY (BIP112)
59 };
60 
65 EXPORT_SYMBOL int dashconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
66  const unsigned char *txTo , unsigned int txToLen,
67  unsigned int nIn, unsigned int flags, dashconsensus_error* err);
68 
70 
71 #ifdef __cplusplus
72 } // extern "C"
73 #endif
74 
75 #undef EXPORT_SYMBOL
76 
77 #endif // BITCOIN_BITCOINCONSENSUS_H
int flags
Definition: dash-tx.cpp:462
dashconsensus_error_t
Definition: dashconsensus.h:38
EXPORT_SYMBOL int dashconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, const unsigned char *txTo, unsigned int txToLen, unsigned int nIn, unsigned int flags, dashconsensus_error *err)
Returns 1 if the input nIn of the serialized transaction pointed to by txTo correctly spends the scri...
EXPORT_SYMBOL unsigned int dashconsensus_version()
enum dashconsensus_error_t dashconsensus_error
#define EXPORT_SYMBOL
Definition: dashconsensus.h:29
Released under the MIT license