c-kzg-4844/bindings/csharp/ckzg.h

27 lines
1.2 KiB
C
Raw Normal View History

2022-11-03 13:08:17 +00:00
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include "c_kzg_4844.h"
#ifdef _WIN32
2022-11-03 13:08:17 +00:00
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT
2022-11-03 13:08:17 +00:00
#endif
DLLEXPORT KZGSettings* load_trusted_setup_wrap(const char* file);
DLLEXPORT void free_trusted_setup_wrap(KZGSettings *s);
DLLEXPORT C_KZG_RET blob_to_kzg_commitment(KZGCommitment *out, const Blob *blob, const KZGSettings *s);
2022-11-03 13:08:17 +00:00
DLLEXPORT C_KZG_RET compute_kzg_proof(KZGProof *proof_out, Bytes32 *y_out, const Blob *blob, const Bytes32 *z_bytes, const KZGSettings *s);
2022-11-03 13:08:17 +00:00
DLLEXPORT C_KZG_RET compute_blob_kzg_proof(KZGProof *out, const Blob *blob, const Bytes48 *commitment, const KZGSettings *s);
2022-11-03 13:08:17 +00:00
2023-02-21 15:57:25 +00:00
DLLEXPORT C_KZG_RET verify_kzg_proof(bool *result, const Bytes48 *commitments_bytes, const Bytes32 *z_bytes, const Bytes32 *y_bytes, const Bytes48 *proof_bytes, const KZGSettings *s);
DLLEXPORT C_KZG_RET verify_blob_kzg_proof(bool *result, const Blob *blob, const Bytes48 *commitment_bytes, const Bytes48 *proof_bytes, const KZGSettings *s);
DLLEXPORT C_KZG_RET verify_blob_kzg_proof_batch(bool *result, const Blob *blobs, const Bytes48 *commitments_bytes, const Bytes48 *proofs_bytes, size_t count, const KZGSettings *s);