MCPcopy Create free account
hub / github.com/PolyhedraZK/ExpanderCompilerCollection / ProveCircuitFile

Function ProveCircuitFile

ecgo/rust/wrapper/wrapper.go:223–233  ·  view source on GitHub ↗
(circuitFilename string, witness []byte, configId uint64)

Source from the content-addressed store, hash-verified

221}
222
223func ProveCircuitFile(circuitFilename string, witness []byte, configId uint64) []byte {
224 initCompilePtr()
225 bytesFn := []byte(circuitFilename)
226 cf := C.ByteArray{data: (*C.uint8_t)(C.CBytes(bytesFn)), length: C.uint64_t(len(bytesFn))}
227 defer C.free(unsafe.Pointer(cf.data))
228 wi := C.ByteArray{data: (*C.uint8_t)(C.CBytes(witness)), length: C.uint64_t(len(witness))}
229 defer C.free(unsafe.Pointer(wi.data))
230 proof := C.prove_circuit_file(proveCircuitFilePtr, cf, wi, C.uint64_t(configId))
231 defer C.free(unsafe.Pointer(proof.data))
232 return goBytes(proof.data, proof.length)
233}
234
235func VerifyCircuitFile(circuitFilename string, witness []byte, proof []byte, configId uint64) bool {
236 initCompilePtr()

Callers 1

ProveFileFunction · 0.92

Calls 2

initCompilePtrFunction · 0.85
goBytesFunction · 0.85

Tested by

no test coverage detected