-
Notifications
You must be signed in to change notification settings - Fork 27
/
eip2537_header.h
31 lines (25 loc) · 1015 Bytes
/
eip2537_header.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
#ifndef eip2537_bindings_h
#define eip2537_bindings_h
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#define EIP2537_PREALLOCATE_FOR_ERROR_BYTES 256
#define EIP2537_PREALLOCATE_FOR_RESULT_BYTES 256
#define BLS12_G1ADD_OPERATION_RAW_VALUE 1
#define BLS12_G1MUL_OPERATION_RAW_VALUE 2
#define BLS12_G1MULTIEXP_OPERATION_RAW_VALUE 3
#define BLS12_G2ADD_OPERATION_RAW_VALUE 4
#define BLS12_G2MUL_OPERATION_RAW_VALUE 5
#define BLS12_G2MULTIEXP_OPERATION_RAW_VALUE 6
#define BLS12_PAIR_OPERATION_RAW_VALUE 7
#define BLS12_MAP_FP_TO_G1_OPERATION_RAW_VALUE 8
#define BLS12_MAP_FP2_TO_G2_OPERATION_RAW_VALUE 9
uint32_t eip2537_perform_operation(char op,
const char *i,
uint32_t i_len,
char *o,
uint32_t *o_len,
char *err,
uint32_t *char_len);
#endif /* eip2537_bindings_h */