2
2
#define ACCELERATOR_APIS_H_
3
3
4
4
#include "accelerator/common_core.h"
5
+ #include "accelerator/errors.h"
5
6
#include "cclient/types/types.h"
6
7
#include "serializer/serializer.h"
7
8
@@ -28,11 +29,11 @@ extern "C" {
28
29
* @param[out] json_result Result containing an unused address in json format
29
30
*
30
31
* @return
31
- * - 0 on success
32
+ * - SC_OK on success
32
33
* - non-zero on error
33
34
*/
34
- int api_generate_address (const iota_client_service_t * const service ,
35
- char * * json_result );
35
+ status_t api_generate_address (const iota_client_service_t * const service ,
36
+ char * * json_result );
36
37
37
38
/**
38
39
* @brief Get trunk and branch transactions
@@ -44,11 +45,11 @@ int api_generate_address(const iota_client_service_t* const service,
44
45
* @param[out] json_result Result containing a tips pair in json format
45
46
*
46
47
* @return
47
- * - 0 on success
48
+ * - SC_OK on success
48
49
* - non-zero on error
49
50
*/
50
- int api_get_tips_pair (const iota_client_service_t * const service ,
51
- char * * json_result );
51
+ status_t api_get_tips_pair (const iota_client_service_t * const service ,
52
+ char * * json_result );
52
53
53
54
/**
54
55
* @brief Get list of all tips from IRI node.
@@ -60,11 +61,11 @@ int api_get_tips_pair(const iota_client_service_t* const service,
60
61
* @param[out] json_result Result containing list of all tips in json format
61
62
*
62
63
* @return
63
- * - 0 on success
64
+ * - SC_OK on success
64
65
* - non-zero on error
65
66
*/
66
- int api_get_tips (const iota_client_service_t * const service ,
67
- char * * json_result );
67
+ status_t api_get_tips (const iota_client_service_t * const service ,
68
+ char * * json_result );
68
69
69
70
/**
70
71
* @brief Send transfer to tangle.
@@ -78,11 +79,11 @@ int api_get_tips(const iota_client_service_t* const service,
78
79
* @param[out] json_result Result containing transaction objects in json format
79
80
*
80
81
* @return
81
- * - 0 on success
82
+ * - SC_OK on success
82
83
* - non-zero on error
83
84
*/
84
- int api_send_transfer (const iota_client_service_t * const service ,
85
- const char * const obj , char * * json_result );
85
+ status_t api_send_transfer (const iota_client_service_t * const service ,
86
+ const char * const obj , char * * json_result );
86
87
87
88
/**
88
89
* @brief Return transaction object with given transaction hash.
@@ -95,11 +96,11 @@ int api_send_transfer(const iota_client_service_t* const service,
95
96
* @param[out] json_result Result containing transaction objects in json format
96
97
*
97
98
* @return
98
- * - 0 on success
99
+ * - SC_OK on success
99
100
* - non-zero on error
100
101
*/
101
- int api_get_transaction_object (const iota_client_service_t * const service ,
102
- const char * const obj , char * * json_result );
102
+ status_t api_get_transaction_object (const iota_client_service_t * const service ,
103
+ const char * const obj , char * * json_result );
103
104
104
105
/**
105
106
* @brief Return list of transaction hash with given tag hash.
@@ -113,11 +114,12 @@ int api_get_transaction_object(const iota_client_service_t* const service,
113
114
* format
114
115
*
115
116
* @return
116
- * - 0 on success
117
+ * - SC_OK on success
117
118
* - non-zero on error
118
119
*/
119
- int api_find_transactions_by_tag (const iota_client_service_t * const service ,
120
- const char * const obj , char * * json_result );
120
+ status_t api_find_transactions_by_tag (
121
+ const iota_client_service_t * const service , const char * const obj ,
122
+ char * * json_result );
121
123
122
124
/**
123
125
* @brief Return list of transaction object with given tag hash.
@@ -131,11 +133,12 @@ int api_find_transactions_by_tag(const iota_client_service_t* const service,
131
133
* format
132
134
*
133
135
* @return
134
- * - 0 on success
136
+ * - SC_OK on success
135
137
* - non-zero on error
136
138
*/
137
- int api_find_transactions_obj_by_tag (const iota_client_service_t * const service ,
138
- const char * const obj , char * * json_result );
139
+ status_t api_find_transactions_obj_by_tag (
140
+ const iota_client_service_t * const service , const char * const obj ,
141
+ char * * json_result );
139
142
140
143
#ifdef __cplusplus
141
144
}
0 commit comments