1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
// WARNING: This file has automatically been generated
// Code generated by https://git.io/c-for-go. DO NOT EDIT.
package generated
/*
#cgo LDFLAGS: -L${SRCDIR}/..
#cgo pkg-config: ${SRCDIR}/../filcrypto.pc
#include "../filcrypto.h"
#include <stdlib.h>
#include "cgo_helpers.h"
*/
import "C"
import (
"runtime"
"unsafe"
)
// FilAggregate function as declared in filecoin-ffi/filcrypto.h:349
func FilAggregate(flattenedSignaturesPtr []byte, flattenedSignaturesLen uint) *FilAggregateResponse {
cflattenedSignaturesPtr, cflattenedSignaturesPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedSignaturesPtr)))
cflattenedSignaturesLen, cflattenedSignaturesLenAllocMap := (C.size_t)(flattenedSignaturesLen), cgoAllocsUnknown
__ret := C.fil_aggregate(cflattenedSignaturesPtr, cflattenedSignaturesLen)
runtime.KeepAlive(cflattenedSignaturesLenAllocMap)
runtime.KeepAlive(cflattenedSignaturesPtrAllocMap)
__v := NewFilAggregateResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilAggregateSealProofs function as declared in filecoin-ffi/filcrypto.h:352
func FilAggregateSealProofs(registeredProof FilRegisteredSealProof, registeredAggregation FilRegisteredAggregationProof, commRsPtr []Fil32ByteArray, commRsLen uint, seedsPtr []Fil32ByteArray, seedsLen uint, sealCommitResponsesPtr []FilSealCommitPhase2Response, sealCommitResponsesLen uint) *FilAggregateProof {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
cregisteredAggregation, cregisteredAggregationAllocMap := (C.fil_RegisteredAggregationProof)(registeredAggregation), cgoAllocsUnknown
ccommRsPtr, ccommRsPtrAllocMap := unpackArgSFil32ByteArray(commRsPtr)
ccommRsLen, ccommRsLenAllocMap := (C.size_t)(commRsLen), cgoAllocsUnknown
cseedsPtr, cseedsPtrAllocMap := unpackArgSFil32ByteArray(seedsPtr)
cseedsLen, cseedsLenAllocMap := (C.size_t)(seedsLen), cgoAllocsUnknown
csealCommitResponsesPtr, csealCommitResponsesPtrAllocMap := unpackArgSFilSealCommitPhase2Response(sealCommitResponsesPtr)
csealCommitResponsesLen, csealCommitResponsesLenAllocMap := (C.size_t)(sealCommitResponsesLen), cgoAllocsUnknown
__ret := C.fil_aggregate_seal_proofs(cregisteredProof, cregisteredAggregation, ccommRsPtr, ccommRsLen, cseedsPtr, cseedsLen, csealCommitResponsesPtr, csealCommitResponsesLen)
runtime.KeepAlive(csealCommitResponsesLenAllocMap)
packSFilSealCommitPhase2Response(sealCommitResponsesPtr, csealCommitResponsesPtr)
runtime.KeepAlive(csealCommitResponsesPtrAllocMap)
runtime.KeepAlive(cseedsLenAllocMap)
packSFil32ByteArray(seedsPtr, cseedsPtr)
runtime.KeepAlive(cseedsPtrAllocMap)
runtime.KeepAlive(ccommRsLenAllocMap)
packSFil32ByteArray(commRsPtr, ccommRsPtr)
runtime.KeepAlive(ccommRsPtrAllocMap)
runtime.KeepAlive(cregisteredAggregationAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilAggregateProofRef(unsafe.Pointer(__ret))
return __v
}
// FilClearCache function as declared in filecoin-ffi/filcrypto.h:361
func FilClearCache(sectorSize uint64, cacheDirPath string) *FilClearCacheResponse {
csectorSize, csectorSizeAllocMap := (C.uint64_t)(sectorSize), cgoAllocsUnknown
cacheDirPath = safeString(cacheDirPath)
ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath)
__ret := C.fil_clear_cache(csectorSize, ccacheDirPath)
runtime.KeepAlive(cacheDirPath)
runtime.KeepAlive(ccacheDirPathAllocMap)
runtime.KeepAlive(csectorSizeAllocMap)
__v := NewFilClearCacheResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilCreateZeroSignature function as declared in filecoin-ffi/filcrypto.h:368
func FilCreateZeroSignature() *FilZeroSignatureResponse {
__ret := C.fil_create_zero_signature()
__v := NewFilZeroSignatureResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilDestroyAggregateProof function as declared in filecoin-ffi/filcrypto.h:374
func FilDestroyAggregateProof(ptr *FilAggregateProof) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_aggregate_proof(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyAggregateResponse function as declared in filecoin-ffi/filcrypto.h:376
func FilDestroyAggregateResponse(ptr *FilAggregateResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_aggregate_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyClearCacheResponse function as declared in filecoin-ffi/filcrypto.h:378
func FilDestroyClearCacheResponse(ptr *FilClearCacheResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_clear_cache_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyFauxrepResponse function as declared in filecoin-ffi/filcrypto.h:380
func FilDestroyFauxrepResponse(ptr *FilFauxRepResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_fauxrep_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyFinalizeTicketResponse function as declared in filecoin-ffi/filcrypto.h:382
func FilDestroyFinalizeTicketResponse(ptr *FilFinalizeTicketResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_finalize_ticket_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyGenerateDataCommitmentResponse function as declared in filecoin-ffi/filcrypto.h:384
func FilDestroyGenerateDataCommitmentResponse(ptr *FilGenerateDataCommitmentResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_generate_data_commitment_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyGenerateFallbackSectorChallengesResponse function as declared in filecoin-ffi/filcrypto.h:386
func FilDestroyGenerateFallbackSectorChallengesResponse(ptr *FilGenerateFallbackSectorChallengesResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_generate_fallback_sector_challenges_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyGeneratePieceCommitmentResponse function as declared in filecoin-ffi/filcrypto.h:388
func FilDestroyGeneratePieceCommitmentResponse(ptr *FilGeneratePieceCommitmentResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_generate_piece_commitment_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyGenerateSingleVanillaProofResponse function as declared in filecoin-ffi/filcrypto.h:390
func FilDestroyGenerateSingleVanillaProofResponse(ptr *FilGenerateSingleVanillaProofResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_generate_single_vanilla_proof_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyGenerateWindowPostResponse function as declared in filecoin-ffi/filcrypto.h:392
func FilDestroyGenerateWindowPostResponse(ptr *FilGenerateWindowPoStResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_generate_window_post_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyGenerateWinningPostResponse function as declared in filecoin-ffi/filcrypto.h:394
func FilDestroyGenerateWinningPostResponse(ptr *FilGenerateWinningPoStResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_generate_winning_post_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyGenerateWinningPostSectorChallenge function as declared in filecoin-ffi/filcrypto.h:396
func FilDestroyGenerateWinningPostSectorChallenge(ptr *FilGenerateWinningPoStSectorChallenge) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_generate_winning_post_sector_challenge(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyGpuDeviceResponse function as declared in filecoin-ffi/filcrypto.h:398
func FilDestroyGpuDeviceResponse(ptr *FilGpuDeviceResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_gpu_device_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyHashResponse function as declared in filecoin-ffi/filcrypto.h:400
func FilDestroyHashResponse(ptr *FilHashResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_hash_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyInitLogFdResponse function as declared in filecoin-ffi/filcrypto.h:402
func FilDestroyInitLogFdResponse(ptr *FilInitLogFdResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_init_log_fd_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyPrivateKeyGenerateResponse function as declared in filecoin-ffi/filcrypto.h:404
func FilDestroyPrivateKeyGenerateResponse(ptr *FilPrivateKeyGenerateResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_private_key_generate_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyPrivateKeyPublicKeyResponse function as declared in filecoin-ffi/filcrypto.h:406
func FilDestroyPrivateKeyPublicKeyResponse(ptr *FilPrivateKeyPublicKeyResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_private_key_public_key_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyPrivateKeySignResponse function as declared in filecoin-ffi/filcrypto.h:408
func FilDestroyPrivateKeySignResponse(ptr *FilPrivateKeySignResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_private_key_sign_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroySealCommitPhase1Response function as declared in filecoin-ffi/filcrypto.h:410
func FilDestroySealCommitPhase1Response(ptr *FilSealCommitPhase1Response) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_seal_commit_phase1_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroySealCommitPhase2Response function as declared in filecoin-ffi/filcrypto.h:412
func FilDestroySealCommitPhase2Response(ptr *FilSealCommitPhase2Response) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_seal_commit_phase2_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroySealPreCommitPhase1Response function as declared in filecoin-ffi/filcrypto.h:414
func FilDestroySealPreCommitPhase1Response(ptr *FilSealPreCommitPhase1Response) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_seal_pre_commit_phase1_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroySealPreCommitPhase2Response function as declared in filecoin-ffi/filcrypto.h:416
func FilDestroySealPreCommitPhase2Response(ptr *FilSealPreCommitPhase2Response) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_seal_pre_commit_phase2_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyStringResponse function as declared in filecoin-ffi/filcrypto.h:418
func FilDestroyStringResponse(ptr *FilStringResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_string_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyUnsealRangeResponse function as declared in filecoin-ffi/filcrypto.h:420
func FilDestroyUnsealRangeResponse(ptr *FilUnsealRangeResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_unseal_range_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyVerifyAggregateSealResponse function as declared in filecoin-ffi/filcrypto.h:426
func FilDestroyVerifyAggregateSealResponse(ptr *FilVerifyAggregateSealProofResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_verify_aggregate_seal_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyVerifySealResponse function as declared in filecoin-ffi/filcrypto.h:432
func FilDestroyVerifySealResponse(ptr *FilVerifySealResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_verify_seal_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyVerifyWindowPostResponse function as declared in filecoin-ffi/filcrypto.h:434
func FilDestroyVerifyWindowPostResponse(ptr *FilVerifyWindowPoStResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_verify_window_post_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyVerifyWinningPostResponse function as declared in filecoin-ffi/filcrypto.h:440
func FilDestroyVerifyWinningPostResponse(ptr *FilVerifyWinningPoStResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_verify_winning_post_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyWriteWithAlignmentResponse function as declared in filecoin-ffi/filcrypto.h:442
func FilDestroyWriteWithAlignmentResponse(ptr *FilWriteWithAlignmentResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_write_with_alignment_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyWriteWithoutAlignmentResponse function as declared in filecoin-ffi/filcrypto.h:444
func FilDestroyWriteWithoutAlignmentResponse(ptr *FilWriteWithoutAlignmentResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_write_without_alignment_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDestroyZeroSignatureResponse function as declared in filecoin-ffi/filcrypto.h:446
func FilDestroyZeroSignatureResponse(ptr *FilZeroSignatureResponse) {
cptr, cptrAllocMap := ptr.PassRef()
C.fil_destroy_zero_signature_response(cptr)
runtime.KeepAlive(cptrAllocMap)
}
// FilDropSignature function as declared in filecoin-ffi/filcrypto.h:451
func FilDropSignature(sig []byte) {
csig, csigAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&sig)))
C.fil_drop_signature(csig)
runtime.KeepAlive(csigAllocMap)
}
// FilFauxrep function as declared in filecoin-ffi/filcrypto.h:453
func FilFauxrep(registeredProof FilRegisteredSealProof, cacheDirPath string, sealedSectorPath string) *FilFauxRepResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
cacheDirPath = safeString(cacheDirPath)
ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath)
sealedSectorPath = safeString(sealedSectorPath)
csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath)
__ret := C.fil_fauxrep(cregisteredProof, ccacheDirPath, csealedSectorPath)
runtime.KeepAlive(sealedSectorPath)
runtime.KeepAlive(csealedSectorPathAllocMap)
runtime.KeepAlive(cacheDirPath)
runtime.KeepAlive(ccacheDirPathAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilFauxRepResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilFauxrep2 function as declared in filecoin-ffi/filcrypto.h:457
func FilFauxrep2(registeredProof FilRegisteredSealProof, cacheDirPath string, existingPAuxPath string) *FilFauxRepResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
cacheDirPath = safeString(cacheDirPath)
ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath)
existingPAuxPath = safeString(existingPAuxPath)
cexistingPAuxPath, cexistingPAuxPathAllocMap := unpackPCharString(existingPAuxPath)
__ret := C.fil_fauxrep2(cregisteredProof, ccacheDirPath, cexistingPAuxPath)
runtime.KeepAlive(existingPAuxPath)
runtime.KeepAlive(cexistingPAuxPathAllocMap)
runtime.KeepAlive(cacheDirPath)
runtime.KeepAlive(ccacheDirPathAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilFauxRepResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGenerateDataCommitment function as declared in filecoin-ffi/filcrypto.h:464
func FilGenerateDataCommitment(registeredProof FilRegisteredSealProof, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilGenerateDataCommitmentResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr)
cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown
__ret := C.fil_generate_data_commitment(cregisteredProof, cpiecesPtr, cpiecesLen)
runtime.KeepAlive(cpiecesLenAllocMap)
packSFilPublicPieceInfo(piecesPtr, cpiecesPtr)
runtime.KeepAlive(cpiecesPtrAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilGenerateDataCommitmentResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGenerateFallbackSectorChallenges function as declared in filecoin-ffi/filcrypto.h:472
func FilGenerateFallbackSectorChallenges(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, sectorIdsPtr []uint64, sectorIdsLen uint, proverId Fil32ByteArray) *FilGenerateFallbackSectorChallengesResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown
crandomness, crandomnessAllocMap := randomness.PassValue()
csectorIdsPtr, csectorIdsPtrAllocMap := copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(§orIdsPtr)))
csectorIdsLen, csectorIdsLenAllocMap := (C.size_t)(sectorIdsLen), cgoAllocsUnknown
cproverId, cproverIdAllocMap := proverId.PassValue()
__ret := C.fil_generate_fallback_sector_challenges(cregisteredProof, crandomness, csectorIdsPtr, csectorIdsLen, cproverId)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(csectorIdsLenAllocMap)
runtime.KeepAlive(csectorIdsPtrAllocMap)
runtime.KeepAlive(crandomnessAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilGenerateFallbackSectorChallengesResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGeneratePieceCommitment function as declared in filecoin-ffi/filcrypto.h:482
func FilGeneratePieceCommitment(registeredProof FilRegisteredSealProof, pieceFdRaw int32, unpaddedPieceSize uint64) *FilGeneratePieceCommitmentResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
cpieceFdRaw, cpieceFdRawAllocMap := (C.int)(pieceFdRaw), cgoAllocsUnknown
cunpaddedPieceSize, cunpaddedPieceSizeAllocMap := (C.uint64_t)(unpaddedPieceSize), cgoAllocsUnknown
__ret := C.fil_generate_piece_commitment(cregisteredProof, cpieceFdRaw, cunpaddedPieceSize)
runtime.KeepAlive(cunpaddedPieceSizeAllocMap)
runtime.KeepAlive(cpieceFdRawAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilGeneratePieceCommitmentResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGenerateSingleVanillaProof function as declared in filecoin-ffi/filcrypto.h:490
func FilGenerateSingleVanillaProof(replica FilPrivateReplicaInfo, challengesPtr []uint64, challengesLen uint) *FilGenerateSingleVanillaProofResponse {
creplica, creplicaAllocMap := replica.PassValue()
cchallengesPtr, cchallengesPtrAllocMap := copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&challengesPtr)))
cchallengesLen, cchallengesLenAllocMap := (C.size_t)(challengesLen), cgoAllocsUnknown
__ret := C.fil_generate_single_vanilla_proof(creplica, cchallengesPtr, cchallengesLen)
runtime.KeepAlive(cchallengesLenAllocMap)
runtime.KeepAlive(cchallengesPtrAllocMap)
runtime.KeepAlive(creplicaAllocMap)
__v := NewFilGenerateSingleVanillaProofResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGenerateWindowPost function as declared in filecoin-ffi/filcrypto.h:498
func FilGenerateWindowPost(randomness Fil32ByteArray, replicasPtr []FilPrivateReplicaInfo, replicasLen uint, proverId Fil32ByteArray) *FilGenerateWindowPoStResponse {
crandomness, crandomnessAllocMap := randomness.PassValue()
creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPrivateReplicaInfo(replicasPtr)
creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown
cproverId, cproverIdAllocMap := proverId.PassValue()
__ret := C.fil_generate_window_post(crandomness, creplicasPtr, creplicasLen, cproverId)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(creplicasLenAllocMap)
packSFilPrivateReplicaInfo(replicasPtr, creplicasPtr)
runtime.KeepAlive(creplicasPtrAllocMap)
runtime.KeepAlive(crandomnessAllocMap)
__v := NewFilGenerateWindowPoStResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGenerateWindowPost function as declared in filecoin-ffi/filcrypto.h:498
func FilAggregateWindowPoStProofs(registeredAggregation FilRegisteredAggregationProof, randomnessesPtr []Fil32ByteArray, randomnessesLen uint, proofsPtr []FilPoStProof, proofsLen uint, sectorCount uint) *FilAggregateProof {
cregisteredAggregation, cregisteredAggregationAllocMap := (C.fil_RegisteredAggregationProof)(registeredAggregation), cgoAllocsUnknown
crandomnessesPtr, crandomnessesPtrAllocMap := unpackArgSFil32ByteArray(randomnessesPtr)
crandomnessesLen, crandomnessesLenAllocMap := (C.size_t)(randomnessesLen), cgoAllocsUnknown
cproofsPtr, cproofsPtrAllocMap := unpackArgSFilPoStProof(proofsPtr)
cproofsLen, cproofsLenAllocMap := (C.size_t)(proofsLen), cgoAllocsUnknown
csectorCount, csectorcountAllocMap := (C.size_t)(sectorCount), cgoAllocsUnknown
__ret := C.fil_aggregate_window_post_proofs(cregisteredAggregation, crandomnessesPtr, crandomnessesLen, cproofsPtr, cproofsLen, csectorCount)
runtime.KeepAlive(csectorcountAllocMap)
runtime.KeepAlive(cproofsLenAllocMap)
packSFilPoStProof(proofsPtr, cproofsPtr)
runtime.KeepAlive(cproofsPtrAllocMap)
runtime.KeepAlive(crandomnessesLenAllocMap)
packSFil32ByteArray(randomnessesPtr, crandomnessesPtr)
runtime.KeepAlive(crandomnessesPtrAllocMap)
runtime.KeepAlive(cregisteredAggregationAllocMap)
__v := NewFilAggregateProofRef(unsafe.Pointer(__ret))
return __v
}
// FilGenerateWindowPostWithVanilla function as declared in filecoin-ffi/filcrypto.h:507
func FilGenerateWindowPostWithVanilla(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, proverId Fil32ByteArray, vanillaProofsPtr []FilVanillaProof, vanillaProofsLen uint) *FilGenerateWindowPoStResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown
crandomness, crandomnessAllocMap := randomness.PassValue()
cproverId, cproverIdAllocMap := proverId.PassValue()
cvanillaProofsPtr, cvanillaProofsPtrAllocMap := unpackArgSFilVanillaProof(vanillaProofsPtr)
cvanillaProofsLen, cvanillaProofsLenAllocMap := (C.size_t)(vanillaProofsLen), cgoAllocsUnknown
__ret := C.fil_generate_window_post_with_vanilla(cregisteredProof, crandomness, cproverId, cvanillaProofsPtr, cvanillaProofsLen)
runtime.KeepAlive(cvanillaProofsLenAllocMap)
packSFilVanillaProof(vanillaProofsPtr, cvanillaProofsPtr)
runtime.KeepAlive(cvanillaProofsPtrAllocMap)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(crandomnessAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilGenerateWindowPoStResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGenerateWinningPost function as declared in filecoin-ffi/filcrypto.h:517
func FilGenerateWinningPost(randomness Fil32ByteArray, replicasPtr []FilPrivateReplicaInfo, replicasLen uint, proverId Fil32ByteArray) *FilGenerateWinningPoStResponse {
crandomness, crandomnessAllocMap := randomness.PassValue()
creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPrivateReplicaInfo(replicasPtr)
creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown
cproverId, cproverIdAllocMap := proverId.PassValue()
__ret := C.fil_generate_winning_post(crandomness, creplicasPtr, creplicasLen, cproverId)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(creplicasLenAllocMap)
packSFilPrivateReplicaInfo(replicasPtr, creplicasPtr)
runtime.KeepAlive(creplicasPtrAllocMap)
runtime.KeepAlive(crandomnessAllocMap)
__v := NewFilGenerateWinningPoStResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGenerateWinningPostSectorChallenge function as declared in filecoin-ffi/filcrypto.h:526
func FilGenerateWinningPostSectorChallenge(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, sectorSetLen uint64, proverId Fil32ByteArray) *FilGenerateWinningPoStSectorChallenge {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown
crandomness, crandomnessAllocMap := randomness.PassValue()
csectorSetLen, csectorSetLenAllocMap := (C.uint64_t)(sectorSetLen), cgoAllocsUnknown
cproverId, cproverIdAllocMap := proverId.PassValue()
__ret := C.fil_generate_winning_post_sector_challenge(cregisteredProof, crandomness, csectorSetLen, cproverId)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(csectorSetLenAllocMap)
runtime.KeepAlive(crandomnessAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilGenerateWinningPoStSectorChallengeRef(unsafe.Pointer(__ret))
return __v
}
// FilGenerateWinningPostWithVanilla function as declared in filecoin-ffi/filcrypto.h:535
func FilGenerateWinningPostWithVanilla(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, proverId Fil32ByteArray, vanillaProofsPtr []FilVanillaProof, vanillaProofsLen uint) *FilGenerateWinningPoStResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown
crandomness, crandomnessAllocMap := randomness.PassValue()
cproverId, cproverIdAllocMap := proverId.PassValue()
cvanillaProofsPtr, cvanillaProofsPtrAllocMap := unpackArgSFilVanillaProof(vanillaProofsPtr)
cvanillaProofsLen, cvanillaProofsLenAllocMap := (C.size_t)(vanillaProofsLen), cgoAllocsUnknown
__ret := C.fil_generate_winning_post_with_vanilla(cregisteredProof, crandomness, cproverId, cvanillaProofsPtr, cvanillaProofsLen)
runtime.KeepAlive(cvanillaProofsLenAllocMap)
packSFilVanillaProof(vanillaProofsPtr, cvanillaProofsPtr)
runtime.KeepAlive(cvanillaProofsPtrAllocMap)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(crandomnessAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilGenerateWinningPoStResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGetGpuDevices function as declared in filecoin-ffi/filcrypto.h:544
func FilGetGpuDevices() *FilGpuDeviceResponse {
__ret := C.fil_get_gpu_devices()
__v := NewFilGpuDeviceResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGetMaxUserBytesPerStagedSector function as declared in filecoin-ffi/filcrypto.h:550
func FilGetMaxUserBytesPerStagedSector(registeredProof FilRegisteredSealProof) uint64 {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
__ret := C.fil_get_max_user_bytes_per_staged_sector(cregisteredProof)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := (uint64)(__ret)
return __v
}
// FilGetPostCircuitIdentifier function as declared in filecoin-ffi/filcrypto.h:556
func FilGetPostCircuitIdentifier(registeredProof FilRegisteredPoStProof) *FilStringResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown
__ret := C.fil_get_post_circuit_identifier(cregisteredProof)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilStringResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGetPostParamsCid function as declared in filecoin-ffi/filcrypto.h:562
func FilGetPostParamsCid(registeredProof FilRegisteredPoStProof) *FilStringResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown
__ret := C.fil_get_post_params_cid(cregisteredProof)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilStringResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGetPostParamsPath function as declared in filecoin-ffi/filcrypto.h:569
func FilGetPostParamsPath(registeredProof FilRegisteredPoStProof) *FilStringResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown
__ret := C.fil_get_post_params_path(cregisteredProof)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilStringResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGetPostVerifyingKeyCid function as declared in filecoin-ffi/filcrypto.h:575
func FilGetPostVerifyingKeyCid(registeredProof FilRegisteredPoStProof) *FilStringResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown
__ret := C.fil_get_post_verifying_key_cid(cregisteredProof)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilStringResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGetPostVerifyingKeyPath function as declared in filecoin-ffi/filcrypto.h:582
func FilGetPostVerifyingKeyPath(registeredProof FilRegisteredPoStProof) *FilStringResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown
__ret := C.fil_get_post_verifying_key_path(cregisteredProof)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilStringResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGetPostVersion function as declared in filecoin-ffi/filcrypto.h:588
func FilGetPostVersion(registeredProof FilRegisteredPoStProof) *FilStringResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown
__ret := C.fil_get_post_version(cregisteredProof)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilStringResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGetSealCircuitIdentifier function as declared in filecoin-ffi/filcrypto.h:594
func FilGetSealCircuitIdentifier(registeredProof FilRegisteredSealProof) *FilStringResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
__ret := C.fil_get_seal_circuit_identifier(cregisteredProof)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilStringResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGetSealParamsCid function as declared in filecoin-ffi/filcrypto.h:600
func FilGetSealParamsCid(registeredProof FilRegisteredSealProof) *FilStringResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
__ret := C.fil_get_seal_params_cid(cregisteredProof)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilStringResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGetSealParamsPath function as declared in filecoin-ffi/filcrypto.h:607
func FilGetSealParamsPath(registeredProof FilRegisteredSealProof) *FilStringResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
__ret := C.fil_get_seal_params_path(cregisteredProof)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilStringResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGetSealVerifyingKeyCid function as declared in filecoin-ffi/filcrypto.h:613
func FilGetSealVerifyingKeyCid(registeredProof FilRegisteredSealProof) *FilStringResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
__ret := C.fil_get_seal_verifying_key_cid(cregisteredProof)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilStringResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGetSealVerifyingKeyPath function as declared in filecoin-ffi/filcrypto.h:620
func FilGetSealVerifyingKeyPath(registeredProof FilRegisteredSealProof) *FilStringResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
__ret := C.fil_get_seal_verifying_key_path(cregisteredProof)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilStringResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilGetSealVersion function as declared in filecoin-ffi/filcrypto.h:626
func FilGetSealVersion(registeredProof FilRegisteredSealProof) *FilStringResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
__ret := C.fil_get_seal_version(cregisteredProof)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilStringResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilHash function as declared in filecoin-ffi/filcrypto.h:636
func FilHash(messagePtr []byte, messageLen uint) *FilHashResponse {
cmessagePtr, cmessagePtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&messagePtr)))
cmessageLen, cmessageLenAllocMap := (C.size_t)(messageLen), cgoAllocsUnknown
__ret := C.fil_hash(cmessagePtr, cmessageLen)
runtime.KeepAlive(cmessageLenAllocMap)
runtime.KeepAlive(cmessagePtrAllocMap)
__v := NewFilHashResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilHashVerify function as declared in filecoin-ffi/filcrypto.h:650
func FilHashVerify(signaturePtr []byte, flattenedMessagesPtr []byte, flattenedMessagesLen uint, messageSizesPtr []uint, messageSizesLen uint, flattenedPublicKeysPtr []byte, flattenedPublicKeysLen uint) int32 {
csignaturePtr, csignaturePtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&signaturePtr)))
cflattenedMessagesPtr, cflattenedMessagesPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedMessagesPtr)))
cflattenedMessagesLen, cflattenedMessagesLenAllocMap := (C.size_t)(flattenedMessagesLen), cgoAllocsUnknown
cmessageSizesPtr, cmessageSizesPtrAllocMap := copyPSizeTBytes((*sliceHeader)(unsafe.Pointer(&messageSizesPtr)))
cmessageSizesLen, cmessageSizesLenAllocMap := (C.size_t)(messageSizesLen), cgoAllocsUnknown
cflattenedPublicKeysPtr, cflattenedPublicKeysPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedPublicKeysPtr)))
cflattenedPublicKeysLen, cflattenedPublicKeysLenAllocMap := (C.size_t)(flattenedPublicKeysLen), cgoAllocsUnknown
__ret := C.fil_hash_verify(csignaturePtr, cflattenedMessagesPtr, cflattenedMessagesLen, cmessageSizesPtr, cmessageSizesLen, cflattenedPublicKeysPtr, cflattenedPublicKeysLen)
runtime.KeepAlive(cflattenedPublicKeysLenAllocMap)
runtime.KeepAlive(cflattenedPublicKeysPtrAllocMap)
runtime.KeepAlive(cmessageSizesLenAllocMap)
runtime.KeepAlive(cmessageSizesPtrAllocMap)
runtime.KeepAlive(cflattenedMessagesLenAllocMap)
runtime.KeepAlive(cflattenedMessagesPtrAllocMap)
runtime.KeepAlive(csignaturePtrAllocMap)
__v := (int32)(__ret)
return __v
}
// FilInitLogFd function as declared in filecoin-ffi/filcrypto.h:667
func FilInitLogFd(logFd int32) *FilInitLogFdResponse {
clogFd, clogFdAllocMap := (C.int)(logFd), cgoAllocsUnknown
__ret := C.fil_init_log_fd(clogFd)
runtime.KeepAlive(clogFdAllocMap)
__v := NewFilInitLogFdResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilPrivateKeyGenerate function as declared in filecoin-ffi/filcrypto.h:672
func FilPrivateKeyGenerate() *FilPrivateKeyGenerateResponse {
__ret := C.fil_private_key_generate()
__v := NewFilPrivateKeyGenerateResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilPrivateKeyGenerateWithSeed function as declared in filecoin-ffi/filcrypto.h:685
func FilPrivateKeyGenerateWithSeed(rawSeed Fil32ByteArray) *FilPrivateKeyGenerateResponse {
crawSeed, crawSeedAllocMap := rawSeed.PassValue()
__ret := C.fil_private_key_generate_with_seed(crawSeed)
runtime.KeepAlive(crawSeedAllocMap)
__v := NewFilPrivateKeyGenerateResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilPrivateKeyPublicKey function as declared in filecoin-ffi/filcrypto.h:696
func FilPrivateKeyPublicKey(rawPrivateKeyPtr []byte) *FilPrivateKeyPublicKeyResponse {
crawPrivateKeyPtr, crawPrivateKeyPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&rawPrivateKeyPtr)))
__ret := C.fil_private_key_public_key(crawPrivateKeyPtr)
runtime.KeepAlive(crawPrivateKeyPtrAllocMap)
__v := NewFilPrivateKeyPublicKeyResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilPrivateKeySign function as declared in filecoin-ffi/filcrypto.h:709
func FilPrivateKeySign(rawPrivateKeyPtr []byte, messagePtr []byte, messageLen uint) *FilPrivateKeySignResponse {
crawPrivateKeyPtr, crawPrivateKeyPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&rawPrivateKeyPtr)))
cmessagePtr, cmessagePtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&messagePtr)))
cmessageLen, cmessageLenAllocMap := (C.size_t)(messageLen), cgoAllocsUnknown
__ret := C.fil_private_key_sign(crawPrivateKeyPtr, cmessagePtr, cmessageLen)
runtime.KeepAlive(cmessageLenAllocMap)
runtime.KeepAlive(cmessagePtrAllocMap)
runtime.KeepAlive(crawPrivateKeyPtrAllocMap)
__v := NewFilPrivateKeySignResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilSealCommitPhase1 function as declared in filecoin-ffi/filcrypto.h:717
func FilSealCommitPhase1(registeredProof FilRegisteredSealProof, commR Fil32ByteArray, commD Fil32ByteArray, cacheDirPath string, replicaPath string, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, seed Fil32ByteArray, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilSealCommitPhase1Response {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
ccommR, ccommRAllocMap := commR.PassValue()
ccommD, ccommDAllocMap := commD.PassValue()
cacheDirPath = safeString(cacheDirPath)
ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath)
replicaPath = safeString(replicaPath)
creplicaPath, creplicaPathAllocMap := unpackPCharString(replicaPath)
csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown
cproverId, cproverIdAllocMap := proverId.PassValue()
cticket, cticketAllocMap := ticket.PassValue()
cseed, cseedAllocMap := seed.PassValue()
cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr)
cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown
__ret := C.fil_seal_commit_phase1(cregisteredProof, ccommR, ccommD, ccacheDirPath, creplicaPath, csectorId, cproverId, cticket, cseed, cpiecesPtr, cpiecesLen)
runtime.KeepAlive(cpiecesLenAllocMap)
packSFilPublicPieceInfo(piecesPtr, cpiecesPtr)
runtime.KeepAlive(cpiecesPtrAllocMap)
runtime.KeepAlive(cseedAllocMap)
runtime.KeepAlive(cticketAllocMap)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(csectorIdAllocMap)
runtime.KeepAlive(replicaPath)
runtime.KeepAlive(creplicaPathAllocMap)
runtime.KeepAlive(cacheDirPath)
runtime.KeepAlive(ccacheDirPathAllocMap)
runtime.KeepAlive(ccommDAllocMap)
runtime.KeepAlive(ccommRAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilSealCommitPhase1ResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilSealCommitPhase2 function as declared in filecoin-ffi/filcrypto.h:729
func FilSealCommitPhase2(sealCommitPhase1OutputPtr []byte, sealCommitPhase1OutputLen uint, sectorId uint64, proverId Fil32ByteArray) *FilSealCommitPhase2Response {
csealCommitPhase1OutputPtr, csealCommitPhase1OutputPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&sealCommitPhase1OutputPtr)))
csealCommitPhase1OutputLen, csealCommitPhase1OutputLenAllocMap := (C.size_t)(sealCommitPhase1OutputLen), cgoAllocsUnknown
csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown
cproverId, cproverIdAllocMap := proverId.PassValue()
__ret := C.fil_seal_commit_phase2(csealCommitPhase1OutputPtr, csealCommitPhase1OutputLen, csectorId, cproverId)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(csectorIdAllocMap)
runtime.KeepAlive(csealCommitPhase1OutputLenAllocMap)
runtime.KeepAlive(csealCommitPhase1OutputPtrAllocMap)
__v := NewFilSealCommitPhase2ResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilSealPreCommitPhase1 function as declared in filecoin-ffi/filcrypto.h:738
func FilSealPreCommitPhase1(registeredProof FilRegisteredSealProof, cacheDirPath string, stagedSectorPath string, sealedSectorPath string, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilSealPreCommitPhase1Response {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
cacheDirPath = safeString(cacheDirPath)
ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath)
stagedSectorPath = safeString(stagedSectorPath)
cstagedSectorPath, cstagedSectorPathAllocMap := unpackPCharString(stagedSectorPath)
sealedSectorPath = safeString(sealedSectorPath)
csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath)
csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown
cproverId, cproverIdAllocMap := proverId.PassValue()
cticket, cticketAllocMap := ticket.PassValue()
cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr)
cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown
__ret := C.fil_seal_pre_commit_phase1(cregisteredProof, ccacheDirPath, cstagedSectorPath, csealedSectorPath, csectorId, cproverId, cticket, cpiecesPtr, cpiecesLen)
runtime.KeepAlive(cpiecesLenAllocMap)
packSFilPublicPieceInfo(piecesPtr, cpiecesPtr)
runtime.KeepAlive(cpiecesPtrAllocMap)
runtime.KeepAlive(cticketAllocMap)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(csectorIdAllocMap)
runtime.KeepAlive(sealedSectorPath)
runtime.KeepAlive(csealedSectorPathAllocMap)
runtime.KeepAlive(stagedSectorPath)
runtime.KeepAlive(cstagedSectorPathAllocMap)
runtime.KeepAlive(cacheDirPath)
runtime.KeepAlive(ccacheDirPathAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilSealPreCommitPhase1ResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilSealPreCommitPhase2 function as declared in filecoin-ffi/filcrypto.h:752
func FilSealPreCommitPhase2(sealPreCommitPhase1OutputPtr []byte, sealPreCommitPhase1OutputLen uint, cacheDirPath string, sealedSectorPath string) *FilSealPreCommitPhase2Response {
csealPreCommitPhase1OutputPtr, csealPreCommitPhase1OutputPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&sealPreCommitPhase1OutputPtr)))
csealPreCommitPhase1OutputLen, csealPreCommitPhase1OutputLenAllocMap := (C.size_t)(sealPreCommitPhase1OutputLen), cgoAllocsUnknown
cacheDirPath = safeString(cacheDirPath)
ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath)
sealedSectorPath = safeString(sealedSectorPath)
csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath)
__ret := C.fil_seal_pre_commit_phase2(csealPreCommitPhase1OutputPtr, csealPreCommitPhase1OutputLen, ccacheDirPath, csealedSectorPath)
runtime.KeepAlive(sealedSectorPath)
runtime.KeepAlive(csealedSectorPathAllocMap)
runtime.KeepAlive(cacheDirPath)
runtime.KeepAlive(ccacheDirPathAllocMap)
runtime.KeepAlive(csealPreCommitPhase1OutputLenAllocMap)
runtime.KeepAlive(csealPreCommitPhase1OutputPtrAllocMap)
__v := NewFilSealPreCommitPhase2ResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilUnsealRange function as declared in filecoin-ffi/filcrypto.h:760
func FilUnsealRange(registeredProof FilRegisteredSealProof, cacheDirPath string, sealedSectorFdRaw int32, unsealOutputFdRaw int32, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, commD Fil32ByteArray, unpaddedByteIndex uint64, unpaddedBytesAmount uint64) *FilUnsealRangeResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
cacheDirPath = safeString(cacheDirPath)
ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath)
csealedSectorFdRaw, csealedSectorFdRawAllocMap := (C.int)(sealedSectorFdRaw), cgoAllocsUnknown
cunsealOutputFdRaw, cunsealOutputFdRawAllocMap := (C.int)(unsealOutputFdRaw), cgoAllocsUnknown
csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown
cproverId, cproverIdAllocMap := proverId.PassValue()
cticket, cticketAllocMap := ticket.PassValue()
ccommD, ccommDAllocMap := commD.PassValue()
cunpaddedByteIndex, cunpaddedByteIndexAllocMap := (C.uint64_t)(unpaddedByteIndex), cgoAllocsUnknown
cunpaddedBytesAmount, cunpaddedBytesAmountAllocMap := (C.uint64_t)(unpaddedBytesAmount), cgoAllocsUnknown
__ret := C.fil_unseal_range(cregisteredProof, ccacheDirPath, csealedSectorFdRaw, cunsealOutputFdRaw, csectorId, cproverId, cticket, ccommD, cunpaddedByteIndex, cunpaddedBytesAmount)
runtime.KeepAlive(cunpaddedBytesAmountAllocMap)
runtime.KeepAlive(cunpaddedByteIndexAllocMap)
runtime.KeepAlive(ccommDAllocMap)
runtime.KeepAlive(cticketAllocMap)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(csectorIdAllocMap)
runtime.KeepAlive(cunsealOutputFdRawAllocMap)
runtime.KeepAlive(csealedSectorFdRawAllocMap)
runtime.KeepAlive(cacheDirPath)
runtime.KeepAlive(ccacheDirPathAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilUnsealRangeResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilVerify function as declared in filecoin-ffi/filcrypto.h:782
func FilVerify(signaturePtr []byte, flattenedDigestsPtr []byte, flattenedDigestsLen uint, flattenedPublicKeysPtr []byte, flattenedPublicKeysLen uint) int32 {
csignaturePtr, csignaturePtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&signaturePtr)))
cflattenedDigestsPtr, cflattenedDigestsPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedDigestsPtr)))
cflattenedDigestsLen, cflattenedDigestsLenAllocMap := (C.size_t)(flattenedDigestsLen), cgoAllocsUnknown
cflattenedPublicKeysPtr, cflattenedPublicKeysPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&flattenedPublicKeysPtr)))
cflattenedPublicKeysLen, cflattenedPublicKeysLenAllocMap := (C.size_t)(flattenedPublicKeysLen), cgoAllocsUnknown
__ret := C.fil_verify(csignaturePtr, cflattenedDigestsPtr, cflattenedDigestsLen, cflattenedPublicKeysPtr, cflattenedPublicKeysLen)
runtime.KeepAlive(cflattenedPublicKeysLenAllocMap)
runtime.KeepAlive(cflattenedPublicKeysPtrAllocMap)
runtime.KeepAlive(cflattenedDigestsLenAllocMap)
runtime.KeepAlive(cflattenedDigestsPtrAllocMap)
runtime.KeepAlive(csignaturePtrAllocMap)
__v := (int32)(__ret)
return __v
}
// FilVerifyAggregateSealProof function as declared in filecoin-ffi/filcrypto.h:792
func FilVerifyAggregateSealProof(registeredProof FilRegisteredSealProof, registeredAggregation FilRegisteredAggregationProof, proverId Fil32ByteArray, proofPtr []byte, proofLen uint, commitInputsPtr []FilAggregationInputs, commitInputsLen uint) *FilVerifyAggregateSealProofResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
cregisteredAggregation, cregisteredAggregationAllocMap := (C.fil_RegisteredAggregationProof)(registeredAggregation), cgoAllocsUnknown
cproverId, cproverIdAllocMap := proverId.PassValue()
cproofPtr, cproofPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&proofPtr)))
cproofLen, cproofLenAllocMap := (C.size_t)(proofLen), cgoAllocsUnknown
ccommitInputsPtr, ccommitInputsPtrAllocMap := unpackArgSFilAggregationInputs(commitInputsPtr)
ccommitInputsLen, ccommitInputsLenAllocMap := (C.size_t)(commitInputsLen), cgoAllocsUnknown
__ret := C.fil_verify_aggregate_seal_proof(cregisteredProof, cregisteredAggregation, cproverId, cproofPtr, cproofLen, ccommitInputsPtr, ccommitInputsLen)
runtime.KeepAlive(ccommitInputsLenAllocMap)
packSFilAggregationInputs(commitInputsPtr, ccommitInputsPtr)
runtime.KeepAlive(ccommitInputsPtrAllocMap)
runtime.KeepAlive(cproofLenAllocMap)
runtime.KeepAlive(cproofPtrAllocMap)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(cregisteredAggregationAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilVerifyAggregateSealProofResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilVerifySeal function as declared in filecoin-ffi/filcrypto.h:804
func FilVerifySeal(registeredProof FilRegisteredSealProof, commR Fil32ByteArray, commD Fil32ByteArray, proverId Fil32ByteArray, ticket Fil32ByteArray, seed Fil32ByteArray, sectorId uint64, proofPtr []byte, proofLen uint) *FilVerifySealResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
ccommR, ccommRAllocMap := commR.PassValue()
ccommD, ccommDAllocMap := commD.PassValue()
cproverId, cproverIdAllocMap := proverId.PassValue()
cticket, cticketAllocMap := ticket.PassValue()
cseed, cseedAllocMap := seed.PassValue()
csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown
cproofPtr, cproofPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&proofPtr)))
cproofLen, cproofLenAllocMap := (C.size_t)(proofLen), cgoAllocsUnknown
__ret := C.fil_verify_seal(cregisteredProof, ccommR, ccommD, cproverId, cticket, cseed, csectorId, cproofPtr, cproofLen)
runtime.KeepAlive(cproofLenAllocMap)
runtime.KeepAlive(cproofPtrAllocMap)
runtime.KeepAlive(csectorIdAllocMap)
runtime.KeepAlive(cseedAllocMap)
runtime.KeepAlive(cticketAllocMap)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(ccommDAllocMap)
runtime.KeepAlive(ccommRAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilVerifySealResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilVerifyWindowPost function as declared in filecoin-ffi/filcrypto.h:817
func FilVerifyWindowPoSt(randomness Fil32ByteArray, replicasPtr []FilPublicReplicaInfo, replicasLen uint, proofsPtr []FilPoStProof, proofsLen uint, proverId Fil32ByteArray) *FilVerifyWindowPoStResponse {
crandomness, crandomnessAllocMap := randomness.PassValue()
creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPublicReplicaInfo(replicasPtr)
creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown
cproofsPtr, cproofsPtrAllocMap := unpackArgSFilPoStProof(proofsPtr)
cproofsLen, cproofsLenAllocMap := (C.size_t)(proofsLen), cgoAllocsUnknown
cproverId, cproverIdAllocMap := proverId.PassValue()
__ret := C.fil_verify_window_post(crandomness, creplicasPtr, creplicasLen, cproofsPtr, cproofsLen, cproverId)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(cproofsLenAllocMap)
packSFilPoStProof(proofsPtr, cproofsPtr)
runtime.KeepAlive(cproofsPtrAllocMap)
runtime.KeepAlive(creplicasLenAllocMap)
packSFilPublicReplicaInfo(replicasPtr, creplicasPtr)
runtime.KeepAlive(creplicasPtrAllocMap)
runtime.KeepAlive(crandomnessAllocMap)
__v := NewFilVerifyWindowPoStResponseRef(unsafe.Pointer(__ret))
return __v
}
func FilVerifyAggregateWindowPoStProofs(registeredProof FilRegisteredPoStProof, registeredAggregation FilRegisteredAggregationProof, proverId Fil32ByteArray, proofPtr []byte, proofLen uint, randomnessesPtr []Fil32ByteArray, randomnessesLen uint, replicasPtr []FilPublicReplicaInfo, arrPtr []uint, arrLen uint) *FilVerifyAggregateSealProofResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown
cregisteredAggregation, cregisteredAggregationAllocMap := (C.fil_RegisteredAggregationProof)(registeredAggregation), cgoAllocsUnknown
cproverId, cproverIdAllocMap := proverId.PassValue()
cproofPtr, cproofPtrAllocMap := copyPUint8TBytes((*sliceHeader)(unsafe.Pointer(&proofPtr)))
cproofLen, cproofLenAllocMap := (C.size_t)(proofLen), cgoAllocsUnknown
crandomnessesPtr, crandomnessesPtrAllocMap := unpackArgSFil32ByteArray(randomnessesPtr)
crandomnessesLen, crandomnessesLenAllocMap := (C.size_t)(randomnessesLen), cgoAllocsUnknown
creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPublicReplicaInfo(replicasPtr)
carrPtr, carrPtrAlocMap := copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&arrPtr)))
carrLen, carrLenAlocMap := (C.size_t)(arrLen), cgoAllocsUnknown
__ret := C.fil_verify_aggregate_window_post_proofs(cregisteredProof, cregisteredAggregation, cproverId, cproofPtr, cproofLen, crandomnessesPtr, crandomnessesLen, creplicasPtr, carrPtr, carrLen)
runtime.KeepAlive(carrLenAlocMap)
runtime.KeepAlive(carrPtrAlocMap)
packSFilPublicReplicaInfo(replicasPtr, creplicasPtr)
runtime.KeepAlive(creplicasPtrAllocMap)
runtime.KeepAlive(crandomnessesLenAllocMap)
packSFil32ByteArray(randomnessesPtr, crandomnessesPtr)
runtime.KeepAlive(crandomnessesPtrAllocMap)
runtime.KeepAlive(cproofLenAllocMap)
runtime.KeepAlive(cproofPtrAllocMap)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(cregisteredAggregationAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilVerifyAggregateSealProofResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilVerifyWinningPost function as declared in filecoin-ffi/filcrypto.h:827
func FilVerifyWinningPost(randomness Fil32ByteArray, replicasPtr []FilPublicReplicaInfo, replicasLen uint, proofsPtr []FilPoStProof, proofsLen uint, proverId Fil32ByteArray) *FilVerifyWinningPoStResponse {
crandomness, crandomnessAllocMap := randomness.PassValue()
creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPublicReplicaInfo(replicasPtr)
creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown
cproofsPtr, cproofsPtrAllocMap := unpackArgSFilPoStProof(proofsPtr)
cproofsLen, cproofsLenAllocMap := (C.size_t)(proofsLen), cgoAllocsUnknown
cproverId, cproverIdAllocMap := proverId.PassValue()
__ret := C.fil_verify_winning_post(crandomness, creplicasPtr, creplicasLen, cproofsPtr, cproofsLen, cproverId)
runtime.KeepAlive(cproverIdAllocMap)
runtime.KeepAlive(cproofsLenAllocMap)
packSFilPoStProof(proofsPtr, cproofsPtr)
runtime.KeepAlive(cproofsPtrAllocMap)
runtime.KeepAlive(creplicasLenAllocMap)
packSFilPublicReplicaInfo(replicasPtr, creplicasPtr)
runtime.KeepAlive(creplicasPtrAllocMap)
runtime.KeepAlive(crandomnessAllocMap)
__v := NewFilVerifyWinningPoStResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilWriteWithAlignment function as declared in filecoin-ffi/filcrypto.h:838
func FilWriteWithAlignment(registeredProof FilRegisteredSealProof, srcFd int32, srcSize uint64, dstFd int32, existingPieceSizesPtr []uint64, existingPieceSizesLen uint) *FilWriteWithAlignmentResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
csrcFd, csrcFdAllocMap := (C.int)(srcFd), cgoAllocsUnknown
csrcSize, csrcSizeAllocMap := (C.uint64_t)(srcSize), cgoAllocsUnknown
cdstFd, cdstFdAllocMap := (C.int)(dstFd), cgoAllocsUnknown
cexistingPieceSizesPtr, cexistingPieceSizesPtrAllocMap := copyPUint64TBytes((*sliceHeader)(unsafe.Pointer(&existingPieceSizesPtr)))
cexistingPieceSizesLen, cexistingPieceSizesLenAllocMap := (C.size_t)(existingPieceSizesLen), cgoAllocsUnknown
__ret := C.fil_write_with_alignment(cregisteredProof, csrcFd, csrcSize, cdstFd, cexistingPieceSizesPtr, cexistingPieceSizesLen)
runtime.KeepAlive(cexistingPieceSizesLenAllocMap)
runtime.KeepAlive(cexistingPieceSizesPtrAllocMap)
runtime.KeepAlive(cdstFdAllocMap)
runtime.KeepAlive(csrcSizeAllocMap)
runtime.KeepAlive(csrcFdAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilWriteWithAlignmentResponseRef(unsafe.Pointer(__ret))
return __v
}
// FilWriteWithoutAlignment function as declared in filecoin-ffi/filcrypto.h:849
func FilWriteWithoutAlignment(registeredProof FilRegisteredSealProof, srcFd int32, srcSize uint64, dstFd int32) *FilWriteWithoutAlignmentResponse {
cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown
csrcFd, csrcFdAllocMap := (C.int)(srcFd), cgoAllocsUnknown
csrcSize, csrcSizeAllocMap := (C.uint64_t)(srcSize), cgoAllocsUnknown
cdstFd, cdstFdAllocMap := (C.int)(dstFd), cgoAllocsUnknown
__ret := C.fil_write_without_alignment(cregisteredProof, csrcFd, csrcSize, cdstFd)
runtime.KeepAlive(cdstFdAllocMap)
runtime.KeepAlive(csrcSizeAllocMap)
runtime.KeepAlive(csrcFdAllocMap)
runtime.KeepAlive(cregisteredProofAllocMap)
__v := NewFilWriteWithoutAlignmentResponseRef(unsafe.Pointer(__ret))
return __v
}