#pragma once
#ifdef __cplusplus
#include <cstddef>
#include <cstdint>
#else
#include <stddef.h>
#include <stdint.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct risc0_string risc0_string;
typedef struct risc0_prover risc0_prover;
typedef struct risc0_receipt risc0_receipt;
typedef struct {
risc0_string* msg;
} risc0_error;
const char* risc0_string_ptr(risc0_string* str);
void risc0_string_free(risc0_string* str);
void risc0_init();
risc0_prover* risc0_prover_new(risc0_error* err, const char* elf_path, const char* method_id_path);
void risc0_prover_free(risc0_error* err, risc0_prover* ptr);
void risc0_prover_add_input(risc0_error* err, risc0_prover* ptr, const uint8_t* buf, size_t len);
size_t risc0_prover_get_num_outputs(risc0_error* err, risc0_prover* ptr);
const void* risc0_prover_get_output(risc0_error* err, risc0_prover* ptr, size_t idx, size_t len);
risc0_receipt* risc0_prover_run(risc0_error* err, risc0_prover* ptr);
void risc0_receipt_verify(risc0_error* err, const char* method_id_path, const risc0_receipt* ptr);
const uint32_t* risc0_receipt_get_seal_buf(risc0_error* err, const risc0_receipt* ptr);
size_t risc0_receipt_get_seal_len(risc0_error* err, const risc0_receipt* ptr);
const void* risc0_receipt_get_journal_buf(risc0_error* err, const risc0_receipt* ptr);
size_t risc0_receipt_get_journal_len(risc0_error* err, const risc0_receipt* ptr);
void risc0_receipt_free(risc0_error* err, const risc0_receipt* ptr);
#ifdef __cplusplus
} #endif