Fabcoin Core  0.16.2
P2P Digital Currency
Macros | Typedefs | Enumerations | Functions
fabcoinconsensus.h File Reference
#include <stdint.h>
Include dependency graph for fabcoinconsensus.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 FABCOINCONSENSUS_API_VER   1
 

Typedefs

typedef enum fabcoinconsensus_error_t fabcoinconsensus_error
 

Enumerations

enum  fabcoinconsensus_error_t {
  fabcoinconsensus_ERR_OK = 0, fabcoinconsensus_ERR_TX_INDEX, fabcoinconsensus_ERR_TX_SIZE_MISMATCH, fabcoinconsensus_ERR_TX_DESERIALIZE,
  fabcoinconsensus_ERR_AMOUNT_REQUIRED, fabcoinconsensus_ERR_INVALID_FLAGS
}
 
enum  {
  fabcoinconsensus_SCRIPT_FLAGS_VERIFY_NONE = 0, fabcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), fabcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), fabcoinconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY = (1U << 4),
  fabcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9), fabcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY = (1U << 10), fabcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS = (1U << 11), fabcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL
}
 Script verification flags. More...
 

Functions

EXPORT_SYMBOL int fabcoinconsensus_verify_script (const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, const unsigned char *txTo, unsigned int txToLen, unsigned int nIn, unsigned int flags, fabcoinconsensus_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 int fabcoinconsensus_verify_script_with_amount (const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, int64_t amount, const unsigned char *txTo, unsigned int txToLen, unsigned int nIn, unsigned int flags, fabcoinconsensus_error *err)
 
EXPORT_SYMBOL unsigned int fabcoinconsensus_version ()
 

Macro Definition Documentation

#define EXPORT_SYMBOL

Definition at line 29 of file fabcoinconsensus.h.

#define FABCOINCONSENSUS_API_VER   1

Definition at line 36 of file fabcoinconsensus.h.

Typedef Documentation

Enumeration Type Documentation

anonymous enum

Script verification flags.

Enumerator
fabcoinconsensus_SCRIPT_FLAGS_VERIFY_NONE 
fabcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH 
fabcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG 
fabcoinconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY 
fabcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY 
fabcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY 
fabcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS 
fabcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL 

Definition at line 49 of file fabcoinconsensus.h.

Enumerator
fabcoinconsensus_ERR_OK 
fabcoinconsensus_ERR_TX_INDEX 
fabcoinconsensus_ERR_TX_SIZE_MISMATCH 
fabcoinconsensus_ERR_TX_DESERIALIZE 
fabcoinconsensus_ERR_AMOUNT_REQUIRED 
fabcoinconsensus_ERR_INVALID_FLAGS 

Definition at line 38 of file fabcoinconsensus.h.

Function Documentation

EXPORT_SYMBOL int fabcoinconsensus_verify_script ( const unsigned char *  scriptPubKey,
unsigned int  scriptPubKeyLen,
const unsigned char *  txTo,
unsigned int  txToLen,
unsigned int  nIn,
unsigned int  flags,
fabcoinconsensus_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 113 of file fabcoinconsensus.cpp.

EXPORT_SYMBOL int fabcoinconsensus_verify_script_with_amount ( const unsigned char *  scriptPubKey,
unsigned int  scriptPubKeyLen,
int64_t  amount,
const unsigned char *  txTo,
unsigned int  txToLen,
unsigned int  nIn,
unsigned int  flags,
fabcoinconsensus_error err 
)

Definition at line 104 of file fabcoinconsensus.cpp.

EXPORT_SYMBOL unsigned int fabcoinconsensus_version ( )

Definition at line 125 of file fabcoinconsensus.cpp.