forked from matja/bitcoin-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresult.h
More file actions
42 lines (36 loc) · 1022 Bytes
/
result.h
File metadata and controls
42 lines (36 loc) · 1022 Bytes
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
35
36
37
38
39
40
41
42
#ifndef BITCOIN_INCLUDE_RESULT_H
#define BITCOIN_INCLUDE_RESULT_H
#ifdef __cplusplus
extern "C" {
#endif
/** @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);
#ifdef __cplusplus
}
#endif
#endif