/
anchor.pb.go
1539 lines (1379 loc) · 59.7 KB
/
anchor.pb.go
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
994
995
996
997
998
999
1000
//
// ProvenDB
// Copyright (C) 2020 Southbank Software Ltd.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// Anchor Service continuously anchors hashes to blockchains, which is similar
// to what Chainpoint does, but with much better performance and flexibility. It
// supports multiple anchor types and proof formats. Digital signing can be also
// done at the Merkle root level
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.15.6
// source: github.com/SouthbankSoftware/provendb-apis/anchor/anchor.proto
package anchor
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Type represents an anchor type. Please refer to this
// [list](https://docs.proofable.io/concepts/anchor_types.html) for all
// available anchor types
type Anchor_Type int32
const (
// [Ethereum](https://ethereum.org/) Rinkeby Testnet
Anchor_ETH Anchor_Type = 0
// Ethereum Mainnet. [Ethereum](https://ethereum.org/) is the second-largest
// cryptocurrency
Anchor_ETH_MAINNET Anchor_Type = 3
// [Elastos](https://www.elastos.org/), which employs a "main
// chain-sidechain architecture"
Anchor_ETH_ELASTOS Anchor_Type = 4
// [GoChain](https://gochain.io/), which is scalable, low cost and energy
// efficient
Anchor_ETH_GOCHAIN Anchor_Type = 9
// [Bitcoin](https://bitcoin.org/) Testnet
Anchor_BTC Anchor_Type = 1
// Bitcoin Mainnet. [Bitcoin](https://bitcoin.org/) is the largest
// cryptocurrency
Anchor_BTC_MAINNET Anchor_Type = 5
// [Chainpoint](https://chainpoint.org/)
Anchor_CHP Anchor_Type = 2
// Hedera Testnet
Anchor_HEDERA Anchor_Type = 6
// Hedera Mainnet. [Hedera](https://www.hedera.com/) is a DAG based
// blockchain that provides much better TPS than tranditional blockchains
Anchor_HEDERA_MAINNET Anchor_Type = 7
// [Hyperledger Fabric](https://www.hyperledger.org/use/fabric), which is a
// modular blockchain framework for private enterprises
Anchor_HYPERLEDGER Anchor_Type = 8
)
// Enum value maps for Anchor_Type.
var (
Anchor_Type_name = map[int32]string{
0: "ETH",
3: "ETH_MAINNET",
4: "ETH_ELASTOS",
9: "ETH_GOCHAIN",
1: "BTC",
5: "BTC_MAINNET",
2: "CHP",
6: "HEDERA",
7: "HEDERA_MAINNET",
8: "HYPERLEDGER",
}
Anchor_Type_value = map[string]int32{
"ETH": 0,
"ETH_MAINNET": 3,
"ETH_ELASTOS": 4,
"ETH_GOCHAIN": 9,
"BTC": 1,
"BTC_MAINNET": 5,
"CHP": 2,
"HEDERA": 6,
"HEDERA_MAINNET": 7,
"HYPERLEDGER": 8,
}
)
func (x Anchor_Type) Enum() *Anchor_Type {
p := new(Anchor_Type)
*p = x
return p
}
func (x Anchor_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Anchor_Type) Descriptor() protoreflect.EnumDescriptor {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_enumTypes[0].Descriptor()
}
func (Anchor_Type) Type() protoreflect.EnumType {
return &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_enumTypes[0]
}
func (x Anchor_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Anchor_Type.Descriptor instead.
func (Anchor_Type) EnumDescriptor() ([]byte, []int) {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_rawDescGZIP(), []int{0, 0}
}
// Status represents an anchor's status
type Anchor_Status int32
const (
// Error means the anchor has an error
Anchor_ERROR Anchor_Status = 0
// STOPPED means the anchor is stopped
Anchor_STOPPED Anchor_Status = 1
// RUNNING means the anchor is running
Anchor_RUNNING Anchor_Status = 2
)
// Enum value maps for Anchor_Status.
var (
Anchor_Status_name = map[int32]string{
0: "ERROR",
1: "STOPPED",
2: "RUNNING",
}
Anchor_Status_value = map[string]int32{
"ERROR": 0,
"STOPPED": 1,
"RUNNING": 2,
}
)
func (x Anchor_Status) Enum() *Anchor_Status {
p := new(Anchor_Status)
*p = x
return p
}
func (x Anchor_Status) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Anchor_Status) Descriptor() protoreflect.EnumDescriptor {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_enumTypes[1].Descriptor()
}
func (Anchor_Status) Type() protoreflect.EnumType {
return &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_enumTypes[1]
}
func (x Anchor_Status) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Anchor_Status.Descriptor instead.
func (Anchor_Status) EnumDescriptor() ([]byte, []int) {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_rawDescGZIP(), []int{0, 1}
}
// Status represents a batch's status
type Batch_Status int32
const (
// ERROR means the batch has an error. FLOW: * -> ERROR
Batch_ERROR Batch_Status = 0
// BATCHING means the batch is batching for more hashes. FLOW: created_at ->
// BATCHING -> flushed_at
Batch_BATCHING Batch_Status = 1
// QUEUING means the batch is queuing to be processed. FLOW: flushed_at ->
// QUEUING -> started_at
Batch_QUEUING Batch_Status = 2
// PROCESSING means the batch is constructing merkle roots and submitting
// hashes. FLOW: started_at -> PROCESSING -> submitted_at
Batch_PROCESSING Batch_Status = 3
// PENDING means the batch's root hash is pending to be confirmed. FLOW:
// submitted_at -> PENDING -> finalized_at
Batch_PENDING Batch_Status = 4
// CONFIRMED means the batch's root hash is confirmed by the anchor's
// blockchain. FLOW: finalized_at -> CONFIRMED
Batch_CONFIRMED Batch_Status = 5
)
// Enum value maps for Batch_Status.
var (
Batch_Status_name = map[int32]string{
0: "ERROR",
1: "BATCHING",
2: "QUEUING",
3: "PROCESSING",
4: "PENDING",
5: "CONFIRMED",
}
Batch_Status_value = map[string]int32{
"ERROR": 0,
"BATCHING": 1,
"QUEUING": 2,
"PROCESSING": 3,
"PENDING": 4,
"CONFIRMED": 5,
}
)
func (x Batch_Status) Enum() *Batch_Status {
p := new(Batch_Status)
*p = x
return p
}
func (x Batch_Status) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Batch_Status) Descriptor() protoreflect.EnumDescriptor {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_enumTypes[2].Descriptor()
}
func (Batch_Status) Type() protoreflect.EnumType {
return &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_enumTypes[2]
}
func (x Batch_Status) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Batch_Status.Descriptor instead.
func (Batch_Status) EnumDescriptor() ([]byte, []int) {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_rawDescGZIP(), []int{1, 0}
}
// Format represents a proof format
type Proof_Format int32
const (
// CHP_PATH means Chainpoint Path format, which is the format used by
// Chainpoint
Proof_CHP_PATH Proof_Format = 0
// ETH_TRIE means Ethereum Trie format
Proof_ETH_TRIE Proof_Format = 1
// CHP_PATH_SIGNED means signed Chainpoint Path format
Proof_CHP_PATH_SIGNED Proof_Format = 2
// ETH_TRIE_SIGNED means signed Ethereum Trie format
Proof_ETH_TRIE_SIGNED Proof_Format = 3
)
// Enum value maps for Proof_Format.
var (
Proof_Format_name = map[int32]string{
0: "CHP_PATH",
1: "ETH_TRIE",
2: "CHP_PATH_SIGNED",
3: "ETH_TRIE_SIGNED",
}
Proof_Format_value = map[string]int32{
"CHP_PATH": 0,
"ETH_TRIE": 1,
"CHP_PATH_SIGNED": 2,
"ETH_TRIE_SIGNED": 3,
}
)
func (x Proof_Format) Enum() *Proof_Format {
p := new(Proof_Format)
*p = x
return p
}
func (x Proof_Format) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Proof_Format) Descriptor() protoreflect.EnumDescriptor {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_enumTypes[3].Descriptor()
}
func (Proof_Format) Type() protoreflect.EnumType {
return &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_enumTypes[3]
}
func (x Proof_Format) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Proof_Format.Descriptor instead.
func (Proof_Format) EnumDescriptor() ([]byte, []int) {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_rawDescGZIP(), []int{2, 0}
}
// Anchor represents an anchor of a blockchain, through which a hash can be
// anchored to that blockchain
type Anchor struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Type is the anchor type
Type Anchor_Type `protobuf:"varint,1,opt,name=type,proto3,enum=anchor.Anchor_Type" json:"type,omitempty"`
// Status is the anchor status
Status Anchor_Status `protobuf:"varint,2,opt,name=status,proto3,enum=anchor.Anchor_Status" json:"status,omitempty"`
// Error is the error message when the anchor status is ERROR
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
// SupportedFormats are the supported proof formats of the anchor
SupportedFormats []Proof_Format `protobuf:"varint,4,rep,packed,name=supported_formats,json=supportedFormats,proto3,enum=anchor.Proof_Format" json:"supported_formats,omitempty"`
}
func (x *Anchor) Reset() {
*x = Anchor{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Anchor) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Anchor) ProtoMessage() {}
func (x *Anchor) ProtoReflect() protoreflect.Message {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Anchor.ProtoReflect.Descriptor instead.
func (*Anchor) Descriptor() ([]byte, []int) {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_rawDescGZIP(), []int{0}
}
func (x *Anchor) GetType() Anchor_Type {
if x != nil {
return x.Type
}
return Anchor_ETH
}
func (x *Anchor) GetStatus() Anchor_Status {
if x != nil {
return x.Status
}
return Anchor_ERROR
}
func (x *Anchor) GetError() string {
if x != nil {
return x.Error
}
return ""
}
func (x *Anchor) GetSupportedFormats() []Proof_Format {
if x != nil {
return x.SupportedFormats
}
return nil
}
// Batch represents a batch of hashes. When hash stream comes in, Anchor Service
// will try to process them in batches, just like blockchain processes
// transactions in blocks. This makes utilization of expensive resources, such
// as making Bitcoin transaction, more economic. Each batch's root hash will be
// embedded in a transaction made to the blockchain
type Batch struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Id is the batch ID
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// AnchorType is the batch's anchor type
AnchorType Anchor_Type `protobuf:"varint,2,opt,name=anchor_type,json=anchorType,proto3,enum=anchor.Anchor_Type" json:"anchor_type,omitempty"`
// ProofFormat is the batch's proof format, which determines how the merkle
// tree is constructed for the batch.
ProofFormat Proof_Format `protobuf:"varint,3,opt,name=proof_format,json=proofFormat,proto3,enum=anchor.Proof_Format" json:"proof_format,omitempty"`
// Status is the batch status. FLOW: created_at -> BATCHING -> flushed_at ->
// QUEUING -> started_at -> PROCESSING -> submitted_at -> PENDING ->
// finalized_at -> CONFIRMED / ERROR; * -> ERROR; if a batch has not yet
// reached PENDING and its anchor has restarted, the batch will be put back to
// QUEUING
Status Batch_Status `protobuf:"varint,4,opt,name=status,proto3,enum=anchor.Batch_Status" json:"status,omitempty"`
// Error is the error message when status is ERROR
Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
// Size is the number of hashes contained in the batch
Size int64 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"`
// CreateAt is the batch's created at timestamp. FLOW: created_at -> BATCHING
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// FlushedAt is the batch's flushed at timestamp. FLOW: BATCHING -> flushed_at
// -> QUEUING
FlushedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=flushed_at,json=flushedAt,proto3" json:"flushed_at,omitempty"`
// StartedAt is the batch's started at timestamp. FLOW: QUEUING -> started_at
// -> PROCESSING
StartedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
// SubmittedAt is the batch's submitted at timestamp. FLOW: PROCESSING ->
// submitted_at -> PENDING
SubmittedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=submitted_at,json=submittedAt,proto3" json:"submitted_at,omitempty"`
// FinalizedAt is the batch's finalized at timestamp. FLOW: * -> finalized_at
// -> CONFIRMED / ERROR. NOTE: this is not the real block confirmed time, use
// the timestamp in the batch data instead
FinalizedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=finalized_at,json=finalizedAt,proto3" json:"finalized_at,omitempty"`
// Hash is the batch's root hash
Hash string `protobuf:"bytes,12,opt,name=hash,proto3" json:"hash,omitempty"`
// Data is the batch data in JSON
Data string `protobuf:"bytes,13,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *Batch) Reset() {
*x = Batch{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Batch) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Batch) ProtoMessage() {}
func (x *Batch) ProtoReflect() protoreflect.Message {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Batch.ProtoReflect.Descriptor instead.
func (*Batch) Descriptor() ([]byte, []int) {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_rawDescGZIP(), []int{1}
}
func (x *Batch) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Batch) GetAnchorType() Anchor_Type {
if x != nil {
return x.AnchorType
}
return Anchor_ETH
}
func (x *Batch) GetProofFormat() Proof_Format {
if x != nil {
return x.ProofFormat
}
return Proof_CHP_PATH
}
func (x *Batch) GetStatus() Batch_Status {
if x != nil {
return x.Status
}
return Batch_ERROR
}
func (x *Batch) GetError() string {
if x != nil {
return x.Error
}
return ""
}
func (x *Batch) GetSize() int64 {
if x != nil {
return x.Size
}
return 0
}
func (x *Batch) GetCreatedAt() *timestamppb.Timestamp {
if x != nil {
return x.CreatedAt
}
return nil
}
func (x *Batch) GetFlushedAt() *timestamppb.Timestamp {
if x != nil {
return x.FlushedAt
}
return nil
}
func (x *Batch) GetStartedAt() *timestamppb.Timestamp {
if x != nil {
return x.StartedAt
}
return nil
}
func (x *Batch) GetSubmittedAt() *timestamppb.Timestamp {
if x != nil {
return x.SubmittedAt
}
return nil
}
func (x *Batch) GetFinalizedAt() *timestamppb.Timestamp {
if x != nil {
return x.FinalizedAt
}
return nil
}
func (x *Batch) GetHash() string {
if x != nil {
return x.Hash
}
return ""
}
func (x *Batch) GetData() string {
if x != nil {
return x.Data
}
return ""
}
// Proof represents a blockchain proof of a hash, which is a Merkle path from
// the hash to the root hash of the proof's batch
type Proof struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Hash is the hash the proof is proving for
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
// BatchId is the proof's batch ID
BatchId string `protobuf:"bytes,2,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
// AnchorType is the proof's anchor type
AnchorType Anchor_Type `protobuf:"varint,3,opt,name=anchor_type,json=anchorType,proto3,enum=anchor.Anchor_Type" json:"anchor_type,omitempty"`
// BatchStatus is the proof's batch status
BatchStatus Batch_Status `protobuf:"varint,4,opt,name=batch_status,json=batchStatus,proto3,enum=anchor.Batch_Status" json:"batch_status,omitempty"`
// Format is the proof format
Format Proof_Format `protobuf:"varint,5,opt,name=format,proto3,enum=anchor.Proof_Format" json:"format,omitempty"`
// Data is the proof data in base64
Data string `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
// Batch is the proof's batch detail
Batch *Batch `protobuf:"bytes,7,opt,name=batch,proto3" json:"batch,omitempty"`
}
func (x *Proof) Reset() {
*x = Proof{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Proof) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Proof) ProtoMessage() {}
func (x *Proof) ProtoReflect() protoreflect.Message {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Proof.ProtoReflect.Descriptor instead.
func (*Proof) Descriptor() ([]byte, []int) {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_rawDescGZIP(), []int{2}
}
func (x *Proof) GetHash() string {
if x != nil {
return x.Hash
}
return ""
}
func (x *Proof) GetBatchId() string {
if x != nil {
return x.BatchId
}
return ""
}
func (x *Proof) GetAnchorType() Anchor_Type {
if x != nil {
return x.AnchorType
}
return Anchor_ETH
}
func (x *Proof) GetBatchStatus() Batch_Status {
if x != nil {
return x.BatchStatus
}
return Batch_ERROR
}
func (x *Proof) GetFormat() Proof_Format {
if x != nil {
return x.Format
}
return Proof_CHP_PATH
}
func (x *Proof) GetData() string {
if x != nil {
return x.Data
}
return ""
}
func (x *Proof) GetBatch() *Batch {
if x != nil {
return x.Batch
}
return nil
}
// AnchorRequest represents a request to get information for the given anchor
// type
type AnchorRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Type is the anchor type
Type Anchor_Type `protobuf:"varint,1,opt,name=type,proto3,enum=anchor.Anchor_Type" json:"type,omitempty"`
}
func (x *AnchorRequest) Reset() {
*x = AnchorRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AnchorRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AnchorRequest) ProtoMessage() {}
func (x *AnchorRequest) ProtoReflect() protoreflect.Message {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AnchorRequest.ProtoReflect.Descriptor instead.
func (*AnchorRequest) Descriptor() ([]byte, []int) {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_rawDescGZIP(), []int{3}
}
func (x *AnchorRequest) GetType() Anchor_Type {
if x != nil {
return x.Type
}
return Anchor_ETH
}
// ProofRequest represents a proof request
type ProofRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Hash is the hash the proof is proving for
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
// BatchId is the proof's batch ID
BatchId string `protobuf:"bytes,2,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
// AnchorType is the proof's anchor type
AnchorType Anchor_Type `protobuf:"varint,3,opt,name=anchor_type,json=anchorType,proto3,enum=anchor.Anchor_Type" json:"anchor_type,omitempty"`
// WithBatch indicates whether to include the proof's batch detail
WithBatch bool `protobuf:"varint,4,opt,name=with_batch,json=withBatch,proto3" json:"with_batch,omitempty"`
}
func (x *ProofRequest) Reset() {
*x = ProofRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProofRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProofRequest) ProtoMessage() {}
func (x *ProofRequest) ProtoReflect() protoreflect.Message {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProofRequest.ProtoReflect.Descriptor instead.
func (*ProofRequest) Descriptor() ([]byte, []int) {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_rawDescGZIP(), []int{4}
}
func (x *ProofRequest) GetHash() string {
if x != nil {
return x.Hash
}
return ""
}
func (x *ProofRequest) GetBatchId() string {
if x != nil {
return x.BatchId
}
return ""
}
func (x *ProofRequest) GetAnchorType() Anchor_Type {
if x != nil {
return x.AnchorType
}
return Anchor_ETH
}
func (x *ProofRequest) GetWithBatch() bool {
if x != nil {
return x.WithBatch
}
return false
}
// SubmitProofRequest represents a submit proof request
type SubmitProofRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Hash is the hash to be submitted
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
// AnchorType is the anchor type to be used
AnchorType Anchor_Type `protobuf:"varint,2,opt,name=anchor_type,json=anchorType,proto3,enum=anchor.Anchor_Type" json:"anchor_type,omitempty"`
// Format is the proof format to be used
Format Proof_Format `protobuf:"varint,3,opt,name=format,proto3,enum=anchor.Proof_Format" json:"format,omitempty"`
// SkipBatching indicates whether to skip batching and submit a proof for the
// hash directly
SkipBatching bool `protobuf:"varint,4,opt,name=skip_batching,json=skipBatching,proto3" json:"skip_batching,omitempty"`
// WithBatch indicates whether to include the batch detail in the reply
WithBatch bool `protobuf:"varint,5,opt,name=with_batch,json=withBatch,proto3" json:"with_batch,omitempty"`
}
func (x *SubmitProofRequest) Reset() {
*x = SubmitProofRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SubmitProofRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SubmitProofRequest) ProtoMessage() {}
func (x *SubmitProofRequest) ProtoReflect() protoreflect.Message {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SubmitProofRequest.ProtoReflect.Descriptor instead.
func (*SubmitProofRequest) Descriptor() ([]byte, []int) {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_rawDescGZIP(), []int{5}
}
func (x *SubmitProofRequest) GetHash() string {
if x != nil {
return x.Hash
}
return ""
}
func (x *SubmitProofRequest) GetAnchorType() Anchor_Type {
if x != nil {
return x.AnchorType
}
return Anchor_ETH
}
func (x *SubmitProofRequest) GetFormat() Proof_Format {
if x != nil {
return x.Format
}
return Proof_CHP_PATH
}
func (x *SubmitProofRequest) GetSkipBatching() bool {
if x != nil {
return x.SkipBatching
}
return false
}
func (x *SubmitProofRequest) GetWithBatch() bool {
if x != nil {
return x.WithBatch
}
return false
}
// VerifyProofRequest represents a verify proof request
type VerifyProofRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// AnchorType is the proof's anchor type
AnchorType Anchor_Type `protobuf:"varint,1,opt,name=anchor_type,json=anchorType,proto3,enum=anchor.Anchor_Type" json:"anchor_type,omitempty"`
// Format is the proof format. If skipping the signature checking is desired,
// please use the corresponding non-signed format, eg. use CHP_PATH instead of
// CHP_PATH_SIGNED in request
Format Proof_Format `protobuf:"varint,2,opt,name=format,proto3,enum=anchor.Proof_Format" json:"format,omitempty"`
// Data is the proof data in base64
Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *VerifyProofRequest) Reset() {
*x = VerifyProofRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VerifyProofRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VerifyProofRequest) ProtoMessage() {}
func (x *VerifyProofRequest) ProtoReflect() protoreflect.Message {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VerifyProofRequest.ProtoReflect.Descriptor instead.
func (*VerifyProofRequest) Descriptor() ([]byte, []int) {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_rawDescGZIP(), []int{6}
}
func (x *VerifyProofRequest) GetAnchorType() Anchor_Type {
if x != nil {
return x.AnchorType
}
return Anchor_ETH
}
func (x *VerifyProofRequest) GetFormat() Proof_Format {
if x != nil {
return x.Format
}
return Proof_CHP_PATH
}
func (x *VerifyProofRequest) GetData() string {
if x != nil {
return x.Data
}
return ""
}
// VerifyProofReply represents a verify proof reply
type VerifyProofReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Verified indicates whether the proof is verified
Verified bool `protobuf:"varint,1,opt,name=verified,proto3" json:"verified,omitempty"`
// Erorr is the error message when the proof is falsified
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
// ProvenHash is the hash the proof is proving for
ProvenHash string `protobuf:"bytes,3,opt,name=provenHash,proto3" json:"provenHash,omitempty"`
}
func (x *VerifyProofReply) Reset() {
*x = VerifyProofReply{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VerifyProofReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VerifyProofReply) ProtoMessage() {}
func (x *VerifyProofReply) ProtoReflect() protoreflect.Message {
mi := &file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VerifyProofReply.ProtoReflect.Descriptor instead.
func (*VerifyProofReply) Descriptor() ([]byte, []int) {
return file_github_com_SouthbankSoftware_provendb_apis_anchor_anchor_proto_rawDescGZIP(), []int{7}
}
func (x *VerifyProofReply) GetVerified() bool {
if x != nil {
return x.Verified
}