#pragma once
#include "common/bytes.h"
#include "common/ec.h"
#include "common/fr.h"
#include "eip4844/blob.h"
#include "setup/settings.h"
typedef Bytes48 KZGCommitment;
typedef Bytes48 KZGProof;
#ifdef __cplusplus
extern "C" {
#endif
C_KZG_RET blob_to_kzg_commitment(KZGCommitment *out, const Blob *blob, const KZGSettings *s);
C_KZG_RET compute_kzg_proof(
KZGProof *proof_out,
Bytes32 *y_out,
const Blob *blob,
const Bytes32 *z_bytes,
const KZGSettings *s
);
C_KZG_RET compute_blob_kzg_proof(
KZGProof *out, const Blob *blob, const Bytes48 *commitment_bytes, const KZGSettings *s
);
C_KZG_RET verify_kzg_proof(
bool *ok,
const Bytes48 *commitment_bytes,
const Bytes32 *z_bytes,
const Bytes32 *y_bytes,
const Bytes48 *proof_bytes,
const KZGSettings *s
);
C_KZG_RET verify_blob_kzg_proof(
bool *ok,
const Blob *blob,
const Bytes48 *commitment_bytes,
const Bytes48 *proof_bytes,
const KZGSettings *s
);
C_KZG_RET verify_blob_kzg_proof_batch(
bool *ok,
const Blob *blobs,
const Bytes48 *commitments_bytes,
const Bytes48 *proofs_bytes,
uint64_t n,
const KZGSettings *s
);
void compute_challenge(fr_t *eval_challenge_out, const Blob *blob, const g1_t *commitment);
#ifdef __cplusplus
}
#endif