forked from matja/bitcoin-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
result.h
35 lines (30 loc) · 942 Bytes
/
result.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef BITCOIN_INCLUDE_RESULT_H
#define BITCOIN_INCLUDE_RESULT_H
/** @file result.h
* @brief Definitions of different return values from Bitcoin functions.
*
* @author Matthew Anger
*/
/** All possible return values for bitcoin functions */
typedef enum BitcoinResult {
BITCOIN_SUCCESS,
BITCOIN_ERROR, /* general error */
BITCOIN_ERROR_NOT_IMPLEMENTED,
BITCOIN_ERROR_PRIVATE_KEY_INVALID_FORMAT,
BITCOIN_ERROR_PUBLIC_KEY_INVALID_FORMAT,
BITCOIN_ERROR_OUTPUT_BUFFER_TOO_SMALL,
BITCOIN_ERROR_CHECKSUM_FAILURE,
BITCOIN_ERROR_INVALID_FORMAT,
BITCOIN_ERROR_IMPOSSIBLE_CONVERSION,
BITCOIN_ERROR_FILE,
BITCOIN_ERROR_LIBRARY_FAILURE,
BITCOIN_ERROR_END_OF_FILE
} BitcoinResult;
/** @brief Return the text message corresponding to a BitcoinResult.
*
* @param[in] result BitcoinResult returned from a previous function.
*
* @return Pointer to text message.
*/
const char *Bitcoin_ResultString(BitcoinResult result);
#endif