Skip to content

Commit 3e6852c

Browse files
committed
Updated prover.h.
1 parent 517e85d commit 3e6852c

File tree

13 files changed

+180
-85
lines changed

13 files changed

+180
-85
lines changed

Libs/Rapidsnark.xcframework/Info.plist

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,34 @@
1010
<key>HeadersPath</key>
1111
<string>Headers</string>
1212
<key>LibraryIdentifier</key>
13-
<string>ios-arm64_arm64e</string>
13+
<string>ios-arm64-simulator</string>
1414
<key>LibraryPath</key>
1515
<string>librapidsnarkmerged.a</string>
1616
<key>SupportedArchitectures</key>
1717
<array>
1818
<string>arm64</string>
19-
<string>arm64e</string>
2019
</array>
2120
<key>SupportedPlatform</key>
2221
<string>ios</string>
22+
<key>SupportedPlatformVariant</key>
23+
<string>simulator</string>
2324
</dict>
2425
<dict>
2526
<key>BinaryPath</key>
2627
<string>librapidsnarkmerged.a</string>
2728
<key>HeadersPath</key>
2829
<string>Headers</string>
2930
<key>LibraryIdentifier</key>
30-
<string>ios-arm64-simulator</string>
31+
<string>ios-arm64_arm64e</string>
3132
<key>LibraryPath</key>
3233
<string>librapidsnarkmerged.a</string>
3334
<key>SupportedArchitectures</key>
3435
<array>
3536
<string>arm64</string>
37+
<string>arm64e</string>
3638
</array>
3739
<key>SupportedPlatform</key>
3840
<string>ios</string>
39-
<key>SupportedPlatformVariant</key>
40-
<string>simulator</string>
4141
</dict>
4242
</array>
4343
<key>CFBundlePackageType</key>

Libs/Rapidsnark.xcframework/ios-arm64-simulator/Headers/prover.h

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,54 @@ extern "C" {
1313

1414
/**
1515
* Calculates buffer size to output public signals as json string
16-
* @returns buffer size in bytes or 0 in case of an error
16+
* @returns PROVER_OK in case of success, and the size of public buffer is written to public_size
1717
*/
18-
unsigned long CalcPublicBufferSize(const void *zkey_buffer, unsigned long zkey_size);
18+
int
19+
groth16_public_size_for_zkey_buf(const void *zkey_buffer, unsigned long zkey_size,
20+
size_t *public_size,
21+
char *error_msg, unsigned long error_msg_maxsize);
22+
23+
/**
24+
* groth16_public_size_for_zkey_file calculates minimum buffer size for
25+
* JSON-formatted public signals. The calculated buffer size is written
26+
* to the public_size variable.
27+
*
28+
* @return error code:
29+
* PROVER_OK (0) - in case of success
30+
* PROVER_ERROR - in case of an error, error_msg contains the error message
31+
*/
32+
int
33+
groth16_public_size_for_zkey_file(const char *zkey_fname,
34+
unsigned long *public_size,
35+
char *error_msg, unsigned long error_msg_maxsize);
1936

2037
/**
2138
* groth16_prover
2239
* @return error code:
2340
* PROVER_OK - in case of success
24-
* PROVER_ERROR - in case of an error
41+
* PPOVER_ERROR - in case of an error
2542
* PROVER_ERROR_SHORT_BUFFER - in case of a short buffer error, also updates proof_size and public_size with actual proof and public sizess
2643
*/
27-
int groth16_prover(const void *zkey_buffer, unsigned long zkey_size,
28-
const void *wtns_buffer, unsigned long wtns_size,
29-
char *proof_buffer, unsigned long *proof_size,
30-
char *public_buffer, unsigned long *public_size,
31-
char *error_msg, unsigned long error_msg_maxsize);
44+
int
45+
groth16_prover(const void *zkey_buffer, unsigned long zkey_size,
46+
const void *wtns_buffer, unsigned long wtns_size,
47+
char *proof_buffer, unsigned long *proof_size,
48+
char *public_buffer, unsigned long *public_size,
49+
char *error_msg, unsigned long error_msg_maxsize);
3250

3351
/**
34-
* groth16_prover_zkey_file
52+
* groth16_prover
3553
* @return error code:
3654
* PROVER_OK - in case of success
37-
* PROVER_ERROR - in case of an error
55+
* PPOVER_ERROR - in case of an error
3856
* PROVER_ERROR_SHORT_BUFFER - in case of a short buffer error, also updates proof_size and public_size with actual proof and public sizess
3957
*/
40-
int groth16_prover_zkey_file(const char *zkey_file_path,
41-
const void *wtns_buffer, unsigned long wtns_size,
42-
char *proof_buffer, unsigned long *proof_size,
43-
char *public_buffer, unsigned long *public_size,
44-
char *error_msg, unsigned long error_msg_maxsize);
58+
int
59+
groth16_prover_zkey_file(const char *zkey_file_path,
60+
const void *wtns_buffer, unsigned long wtns_size,
61+
char *proof_buffer, unsigned long *proof_size,
62+
char *public_buffer, unsigned long *public_size,
63+
char *error_msg, unsigned long error_msg_maxsize);
4564

4665
#ifdef __cplusplus
4766
}
0 Bytes
Binary file not shown.

Libs/Rapidsnark.xcframework/ios-arm64_arm64e/Headers/prover.h

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,54 @@ extern "C" {
1313

1414
/**
1515
* Calculates buffer size to output public signals as json string
16-
* @returns buffer size in bytes or 0 in case of an error
16+
* @returns PROVER_OK in case of success, and the size of public buffer is written to public_size
1717
*/
18-
unsigned long CalcPublicBufferSize(const void *zkey_buffer, unsigned long zkey_size);
18+
int
19+
groth16_public_size_for_zkey_buf(const void *zkey_buffer, unsigned long zkey_size,
20+
size_t *public_size,
21+
char *error_msg, unsigned long error_msg_maxsize);
22+
23+
/**
24+
* groth16_public_size_for_zkey_file calculates minimum buffer size for
25+
* JSON-formatted public signals. The calculated buffer size is written
26+
* to the public_size variable.
27+
*
28+
* @return error code:
29+
* PROVER_OK (0) - in case of success
30+
* PROVER_ERROR - in case of an error, error_msg contains the error message
31+
*/
32+
int
33+
groth16_public_size_for_zkey_file(const char *zkey_fname,
34+
unsigned long *public_size,
35+
char *error_msg, unsigned long error_msg_maxsize);
1936

2037
/**
2138
* groth16_prover
2239
* @return error code:
2340
* PROVER_OK - in case of success
24-
* PROVER_ERROR - in case of an error
41+
* PPOVER_ERROR - in case of an error
2542
* PROVER_ERROR_SHORT_BUFFER - in case of a short buffer error, also updates proof_size and public_size with actual proof and public sizess
2643
*/
27-
int groth16_prover(const void *zkey_buffer, unsigned long zkey_size,
28-
const void *wtns_buffer, unsigned long wtns_size,
29-
char *proof_buffer, unsigned long *proof_size,
30-
char *public_buffer, unsigned long *public_size,
31-
char *error_msg, unsigned long error_msg_maxsize);
44+
int
45+
groth16_prover(const void *zkey_buffer, unsigned long zkey_size,
46+
const void *wtns_buffer, unsigned long wtns_size,
47+
char *proof_buffer, unsigned long *proof_size,
48+
char *public_buffer, unsigned long *public_size,
49+
char *error_msg, unsigned long error_msg_maxsize);
3250

3351
/**
34-
* groth16_prover_zkey_file
52+
* groth16_prover
3553
* @return error code:
3654
* PROVER_OK - in case of success
37-
* PROVER_ERROR - in case of an error
55+
* PPOVER_ERROR - in case of an error
3856
* PROVER_ERROR_SHORT_BUFFER - in case of a short buffer error, also updates proof_size and public_size with actual proof and public sizess
3957
*/
40-
int groth16_prover_zkey_file(const char *zkey_file_path,
41-
const void *wtns_buffer, unsigned long wtns_size,
42-
char *proof_buffer, unsigned long *proof_size,
43-
char *public_buffer, unsigned long *public_size,
44-
char *error_msg, unsigned long error_msg_maxsize);
58+
int
59+
groth16_prover_zkey_file(const char *zkey_file_path,
60+
const void *wtns_buffer, unsigned long wtns_size,
61+
char *proof_buffer, unsigned long *proof_size,
62+
char *public_buffer, unsigned long *public_size,
63+
char *error_msg, unsigned long error_msg_maxsize);
4564

4665
#ifdef __cplusplus
4766
}
0 Bytes
Binary file not shown.

xcframework/Rapidsnark.xcframework/Info.plist

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,34 @@
1010
<key>HeadersPath</key>
1111
<string>Headers</string>
1212
<key>LibraryIdentifier</key>
13-
<string>ios-arm64_arm64e</string>
13+
<string>ios-arm64-simulator</string>
1414
<key>LibraryPath</key>
1515
<string>librapidsnarkmerged.a</string>
1616
<key>SupportedArchitectures</key>
1717
<array>
1818
<string>arm64</string>
19-
<string>arm64e</string>
2019
</array>
2120
<key>SupportedPlatform</key>
2221
<string>ios</string>
22+
<key>SupportedPlatformVariant</key>
23+
<string>simulator</string>
2324
</dict>
2425
<dict>
2526
<key>BinaryPath</key>
2627
<string>librapidsnarkmerged.a</string>
2728
<key>HeadersPath</key>
2829
<string>Headers</string>
2930
<key>LibraryIdentifier</key>
30-
<string>ios-arm64-simulator</string>
31+
<string>ios-arm64_arm64e</string>
3132
<key>LibraryPath</key>
3233
<string>librapidsnarkmerged.a</string>
3334
<key>SupportedArchitectures</key>
3435
<array>
3536
<string>arm64</string>
37+
<string>arm64e</string>
3638
</array>
3739
<key>SupportedPlatform</key>
3840
<string>ios</string>
39-
<key>SupportedPlatformVariant</key>
40-
<string>simulator</string>
4141
</dict>
4242
</array>
4343
<key>CFBundlePackageType</key>

xcframework/Rapidsnark.xcframework/ios-arm64-simulator/Headers/prover.h

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,54 @@ extern "C" {
1313

1414
/**
1515
* Calculates buffer size to output public signals as json string
16-
* @returns buffer size in bytes or 0 in case of an error
16+
* @returns PROVER_OK in case of success, and the size of public buffer is written to public_size
1717
*/
18-
unsigned long CalcPublicBufferSize(const void *zkey_buffer, unsigned long zkey_size);
18+
int
19+
groth16_public_size_for_zkey_buf(const void *zkey_buffer, unsigned long zkey_size,
20+
size_t *public_size,
21+
char *error_msg, unsigned long error_msg_maxsize);
22+
23+
/**
24+
* groth16_public_size_for_zkey_file calculates minimum buffer size for
25+
* JSON-formatted public signals. The calculated buffer size is written
26+
* to the public_size variable.
27+
*
28+
* @return error code:
29+
* PROVER_OK (0) - in case of success
30+
* PROVER_ERROR - in case of an error, error_msg contains the error message
31+
*/
32+
int
33+
groth16_public_size_for_zkey_file(const char *zkey_fname,
34+
unsigned long *public_size,
35+
char *error_msg, unsigned long error_msg_maxsize);
1936

2037
/**
2138
* groth16_prover
2239
* @return error code:
2340
* PROVER_OK - in case of success
24-
* PROVER_ERROR - in case of an error
41+
* PPOVER_ERROR - in case of an error
2542
* PROVER_ERROR_SHORT_BUFFER - in case of a short buffer error, also updates proof_size and public_size with actual proof and public sizess
2643
*/
27-
int groth16_prover(const void *zkey_buffer, unsigned long zkey_size,
28-
const void *wtns_buffer, unsigned long wtns_size,
29-
char *proof_buffer, unsigned long *proof_size,
30-
char *public_buffer, unsigned long *public_size,
31-
char *error_msg, unsigned long error_msg_maxsize);
44+
int
45+
groth16_prover(const void *zkey_buffer, unsigned long zkey_size,
46+
const void *wtns_buffer, unsigned long wtns_size,
47+
char *proof_buffer, unsigned long *proof_size,
48+
char *public_buffer, unsigned long *public_size,
49+
char *error_msg, unsigned long error_msg_maxsize);
3250

3351
/**
34-
* groth16_prover_zkey_file
52+
* groth16_prover
3553
* @return error code:
3654
* PROVER_OK - in case of success
37-
* PROVER_ERROR - in case of an error
55+
* PPOVER_ERROR - in case of an error
3856
* PROVER_ERROR_SHORT_BUFFER - in case of a short buffer error, also updates proof_size and public_size with actual proof and public sizess
3957
*/
40-
int groth16_prover_zkey_file(const char *zkey_file_path,
41-
const void *wtns_buffer, unsigned long wtns_size,
42-
char *proof_buffer, unsigned long *proof_size,
43-
char *public_buffer, unsigned long *public_size,
44-
char *error_msg, unsigned long error_msg_maxsize);
58+
int
59+
groth16_prover_zkey_file(const char *zkey_file_path,
60+
const void *wtns_buffer, unsigned long wtns_size,
61+
char *proof_buffer, unsigned long *proof_size,
62+
char *public_buffer, unsigned long *public_size,
63+
char *error_msg, unsigned long error_msg_maxsize);
4564

4665
#ifdef __cplusplus
4766
}
0 Bytes
Binary file not shown.

xcframework/Rapidsnark.xcframework/ios-arm64_arm64e/Headers/prover.h

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,54 @@ extern "C" {
1313

1414
/**
1515
* Calculates buffer size to output public signals as json string
16-
* @returns buffer size in bytes or 0 in case of an error
16+
* @returns PROVER_OK in case of success, and the size of public buffer is written to public_size
1717
*/
18-
unsigned long CalcPublicBufferSize(const void *zkey_buffer, unsigned long zkey_size);
18+
int
19+
groth16_public_size_for_zkey_buf(const void *zkey_buffer, unsigned long zkey_size,
20+
size_t *public_size,
21+
char *error_msg, unsigned long error_msg_maxsize);
22+
23+
/**
24+
* groth16_public_size_for_zkey_file calculates minimum buffer size for
25+
* JSON-formatted public signals. The calculated buffer size is written
26+
* to the public_size variable.
27+
*
28+
* @return error code:
29+
* PROVER_OK (0) - in case of success
30+
* PROVER_ERROR - in case of an error, error_msg contains the error message
31+
*/
32+
int
33+
groth16_public_size_for_zkey_file(const char *zkey_fname,
34+
unsigned long *public_size,
35+
char *error_msg, unsigned long error_msg_maxsize);
1936

2037
/**
2138
* groth16_prover
2239
* @return error code:
2340
* PROVER_OK - in case of success
24-
* PROVER_ERROR - in case of an error
41+
* PPOVER_ERROR - in case of an error
2542
* PROVER_ERROR_SHORT_BUFFER - in case of a short buffer error, also updates proof_size and public_size with actual proof and public sizess
2643
*/
27-
int groth16_prover(const void *zkey_buffer, unsigned long zkey_size,
28-
const void *wtns_buffer, unsigned long wtns_size,
29-
char *proof_buffer, unsigned long *proof_size,
30-
char *public_buffer, unsigned long *public_size,
31-
char *error_msg, unsigned long error_msg_maxsize);
44+
int
45+
groth16_prover(const void *zkey_buffer, unsigned long zkey_size,
46+
const void *wtns_buffer, unsigned long wtns_size,
47+
char *proof_buffer, unsigned long *proof_size,
48+
char *public_buffer, unsigned long *public_size,
49+
char *error_msg, unsigned long error_msg_maxsize);
3250

3351
/**
34-
* groth16_prover_zkey_file
52+
* groth16_prover
3553
* @return error code:
3654
* PROVER_OK - in case of success
37-
* PROVER_ERROR - in case of an error
55+
* PPOVER_ERROR - in case of an error
3856
* PROVER_ERROR_SHORT_BUFFER - in case of a short buffer error, also updates proof_size and public_size with actual proof and public sizess
3957
*/
40-
int groth16_prover_zkey_file(const char *zkey_file_path,
41-
const void *wtns_buffer, unsigned long wtns_size,
42-
char *proof_buffer, unsigned long *proof_size,
43-
char *public_buffer, unsigned long *public_size,
44-
char *error_msg, unsigned long error_msg_maxsize);
58+
int
59+
groth16_prover_zkey_file(const char *zkey_file_path,
60+
const void *wtns_buffer, unsigned long wtns_size,
61+
char *proof_buffer, unsigned long *proof_size,
62+
char *public_buffer, unsigned long *public_size,
63+
char *error_msg, unsigned long error_msg_maxsize);
4564

4665
#ifdef __cplusplus
4766
}
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)