Dash Core
0.12.2.1
P2P Digital Currency
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
#if defined(BUILD_BITCOIN_INTERNAL) && defined(HAVE_CONFIG_H)
10
#include "
config/dash-config.h
"
11
#if defined(_WIN32)
12
#if defined(DLL_EXPORT)
13
#if defined(HAVE_FUNC_ATTRIBUTE_DLLEXPORT)
14
#define EXPORT_SYMBOL __declspec(dllexport)
15
#else
16
#define EXPORT_SYMBOL
17
#endif
18
#endif
19
#elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY)
20
#define EXPORT_SYMBOL __attribute__ ((visibility ("default")))
21
#endif
22
#elif defined(MSC_VER) && !defined(STATIC_LIBBITCOINCONSENSUS)
23
#define EXPORT_SYMBOL __declspec(dllimport)
24
#endif
25
26
#ifndef EXPORT_SYMBOL
27
#define EXPORT_SYMBOL
28
#endif
29
30
#ifdef __cplusplus
31
extern
"C"
{
32
#endif
33
34
#define BITCOINCONSENSUS_API_VER 0
35
36
typedef
enum
dashconsensus_error_t
37
{
38
dashconsensus_ERR_OK
= 0,
39
dashconsensus_ERR_TX_INDEX
,
40
dashconsensus_ERR_TX_SIZE_MISMATCH
,
41
dashconsensus_ERR_TX_DESERIALIZE
,
42
}
dashconsensus_error
;
43
45
enum
46
{
47
dashconsensus_SCRIPT_FLAGS_VERIFY_NONE
= 0,
48
dashconsensus_SCRIPT_FLAGS_VERIFY_P2SH
= (1U << 0),
// evaluate P2SH (BIP16) subscripts
49
dashconsensus_SCRIPT_FLAGS_VERIFY_DERSIG
= (1U << 2),
// enforce strict DER (BIP66) compliance
50
dashconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY
= (1U << 9),
// enable CHECKLOCKTIMEVERIFY (BIP65)
51
};
52
57
EXPORT_SYMBOL
int
dashconsensus_verify_script
(
const
unsigned
char
*scriptPubKey,
unsigned
int
scriptPubKeyLen,
58
const
unsigned
char
*txTo ,
unsigned
int
txToLen,
59
unsigned
int
nIn,
unsigned
int
flags
,
dashconsensus_error
*
err
);
60
61
EXPORT_SYMBOL
unsigned
int
dashconsensus_version
();
62
63
#ifdef __cplusplus
64
}
// extern "C"
65
#endif
66
67
#undef EXPORT_SYMBOL
68
69
#endif // BITCOIN_BITCOINCONSENSUS_H
dashconsensus_ERR_TX_DESERIALIZE
Definition:
dashconsensus.h:41
flags
int flags
Definition:
dash-tx.cpp:326
dashconsensus_SCRIPT_FLAGS_VERIFY_DERSIG
Definition:
dashconsensus.h:49
dashconsensus_SCRIPT_FLAGS_VERIFY_NONE
Definition:
dashconsensus.h:47
dashconsensus_error_t
dashconsensus_error_t
Definition:
dashconsensus.h:36
dashconsensus_ERR_OK
Definition:
dashconsensus.h:38
dashconsensus_verify_script
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)
Definition:
dashconsensus.cpp:72
extract_strings_qt.err
err
Definition:
extract_strings_qt.py:56
dashconsensus_SCRIPT_FLAGS_VERIFY_P2SH
Definition:
dashconsensus.h:48
dashconsensus_version
EXPORT_SYMBOL unsigned int dashconsensus_version()
Definition:
dashconsensus.cpp:94
dashconsensus_ERR_TX_SIZE_MISMATCH
Definition:
dashconsensus.h:40
dash-config.h
dashconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY
Definition:
dashconsensus.h:50
dashconsensus_error
enum dashconsensus_error_t dashconsensus_error
dashconsensus_ERR_TX_INDEX
Definition:
dashconsensus.h:39
EXPORT_SYMBOL
#define EXPORT_SYMBOL
Definition:
dashconsensus.h:27
src
script
dashconsensus.h
Generated on Thu Dec 14 2017 13:15:08 for Dash Core by
1.8.14