Raven Core  3.0.0
P2P Digital Currency
Macros | Typedefs | Enumerations | Functions
ravenconsensus.h File Reference
#include <stdint.h>
Include dependency graph for ravenconsensus.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 RAVENCONSENSUS_API_VER   1
 

Typedefs

typedef enum ravenconsensus_error_t ravenconsensus_error
 

Enumerations

enum  ravenconsensus_error_t {
  ravenconsensus_ERR_OK = 0, ravenconsensus_ERR_TX_INDEX, ravenconsensus_ERR_TX_SIZE_MISMATCH, ravenconsensus_ERR_TX_DESERIALIZE,
  ravenconsensus_ERR_AMOUNT_REQUIRED, ravenconsensus_ERR_INVALID_FLAGS
}
 
enum  {
  ravenconsensus_SCRIPT_FLAGS_VERIFY_NONE = 0, ravenconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), ravenconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), ravenconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY = (1U << 4),
  ravenconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9), ravenconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY = (1U << 10), ravenconsensus_SCRIPT_FLAGS_VERIFY_WITNESS = (1U << 11), ravenconsensus_SCRIPT_FLAGS_VERIFY_ALL
}
 Script verification flags. More...
 

Functions

EXPORT_SYMBOL int ravenconsensus_verify_script (const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, const unsigned char *txTo, unsigned int txToLen, unsigned int nIn, unsigned int flags, ravenconsensus_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 ravenconsensus_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, ravenconsensus_error *err)
 
EXPORT_SYMBOL unsigned int ravenconsensus_version ()
 

Macro Definition Documentation

◆ EXPORT_SYMBOL

#define EXPORT_SYMBOL

Definition at line 30 of file ravenconsensus.h.

◆ RAVENCONSENSUS_API_VER

#define RAVENCONSENSUS_API_VER   1

Definition at line 37 of file ravenconsensus.h.

Typedef Documentation

◆ ravenconsensus_error

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Script verification flags.

Enumerator
ravenconsensus_SCRIPT_FLAGS_VERIFY_NONE 
ravenconsensus_SCRIPT_FLAGS_VERIFY_P2SH 
ravenconsensus_SCRIPT_FLAGS_VERIFY_DERSIG 
ravenconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY 
ravenconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY 
ravenconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY 
ravenconsensus_SCRIPT_FLAGS_VERIFY_WITNESS 
ravenconsensus_SCRIPT_FLAGS_VERIFY_ALL 

Definition at line 50 of file ravenconsensus.h.

◆ ravenconsensus_error_t

Enumerator
ravenconsensus_ERR_OK 
ravenconsensus_ERR_TX_INDEX 
ravenconsensus_ERR_TX_SIZE_MISMATCH 
ravenconsensus_ERR_TX_DESERIALIZE 
ravenconsensus_ERR_AMOUNT_REQUIRED 
ravenconsensus_ERR_INVALID_FLAGS 

Definition at line 39 of file ravenconsensus.h.

Function Documentation

◆ ravenconsensus_verify_script()

EXPORT_SYMBOL int ravenconsensus_verify_script ( const unsigned char *  scriptPubKey,
unsigned int  scriptPubKeyLen,
const unsigned char *  txTo,
unsigned int  txToLen,
unsigned int  nIn,
unsigned int  flags,
ravenconsensus_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 114 of file ravenconsensus.cpp.

◆ ravenconsensus_verify_script_with_amount()

EXPORT_SYMBOL int ravenconsensus_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,
ravenconsensus_error err 
)

Definition at line 105 of file ravenconsensus.cpp.

◆ ravenconsensus_version()

EXPORT_SYMBOL unsigned int ravenconsensus_version ( )

Definition at line 126 of file ravenconsensus.cpp.