Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

dashconsensus.h File Reference
#include <stdint.h>
+ Include dependency graph for dashconsensus.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EXPORT_SYMBOL
 
#define BITCOINCONSENSUS_API_VER   0
 

Typedefs

typedef enum dashconsensus_error_t dashconsensus_error
 

Enumerations

enum  dashconsensus_error_t {
  dashconsensus_ERR_OK = 0, dashconsensus_ERR_TX_INDEX, dashconsensus_ERR_TX_SIZE_MISMATCH, dashconsensus_ERR_TX_DESERIALIZE,
  dashconsensus_ERR_INVALID_FLAGS
}
 
enum  {
  dashconsensus_SCRIPT_FLAGS_VERIFY_NONE = 0, dashconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), dashconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), dashconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY = (1U << 4),
  dashconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9), dashconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY = (1U << 10), dashconsensus_SCRIPT_FLAGS_VERIFY_ALL
}
 Script verification flags. More...
 

Functions

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 scriptPubKey pointed to by scriptPubKey under the additional constraints specified by flags. More...
 
EXPORT_SYMBOL unsigned int dashconsensus_version ()
 

Macro Definition Documentation

◆ BITCOINCONSENSUS_API_VER

#define BITCOINCONSENSUS_API_VER   0

Definition at line 36 of file dashconsensus.h.

Referenced by dashconsensus_version().

◆ EXPORT_SYMBOL

#define EXPORT_SYMBOL

Definition at line 29 of file dashconsensus.h.

Typedef Documentation

◆ dashconsensus_error

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Script verification flags.

Enumerator
dashconsensus_SCRIPT_FLAGS_VERIFY_NONE 
dashconsensus_SCRIPT_FLAGS_VERIFY_P2SH 
dashconsensus_SCRIPT_FLAGS_VERIFY_DERSIG 
dashconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY 
dashconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY 
dashconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY 
dashconsensus_SCRIPT_FLAGS_VERIFY_ALL 

Definition at line 48 of file dashconsensus.h.

◆ dashconsensus_error_t

Enumerator
dashconsensus_ERR_OK 
dashconsensus_ERR_TX_INDEX 
dashconsensus_ERR_TX_SIZE_MISMATCH 
dashconsensus_ERR_TX_DESERIALIZE 
dashconsensus_ERR_INVALID_FLAGS 

Definition at line 38 of file dashconsensus.h.

Function Documentation

◆ 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 
)

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

Definition at line 79 of file dashconsensus.cpp.

References dashconsensus_ERR_INVALID_FLAGS, dashconsensus_ERR_OK, dashconsensus_ERR_TX_DESERIALIZE, dashconsensus_ERR_TX_INDEX, dashconsensus_ERR_TX_SIZE_MISMATCH, deserialize, flags, GetSerializeSize(), PROTOCOL_VERSION, SER_NETWORK, verify_flags(), VerifyScript(), and CTransaction::vin.

◆ dashconsensus_version()

EXPORT_SYMBOL unsigned int dashconsensus_version ( )

Definition at line 105 of file dashconsensus.cpp.

References BITCOINCONSENSUS_API_VER.

Released under the MIT license