c-kzg-4844/min-bindings/C#/ckzg.c

22 lines
524 B
C
Raw Normal View History

2022-10-04 18:45:12 +00:00
#include <inttypes.h>
#include <stdio.h>
2022-10-04 21:40:18 +00:00
#include <stdlib.h>
2022-10-04 18:45:12 +00:00
#include "c_kzg_4844.h"
uint64_t hello(uint64_t a) {
printf("Hello World! %lu\n", a);
return 42;
}
2022-10-04 21:40:18 +00:00
BLSFieldElement* bytes_to_bls_field_wrap(const uint8_t bytes[]) {
BLSFieldElement* out = (BLSFieldElement*)malloc(sizeof(BLSFieldElement));
bytes_to_bls_field(out, bytes);
return out;
}
uint64_t* uint64s_from_bls_field(BLSFieldElement *fr) {
uint64_t *r = (uint64_t*)calloc(4, sizeof(uint64_t));
uint64s_from_BLSFieldElement(r, fr);
return r;
}