/
transfers.pb.go
8350 lines (8094 loc) · 213 KB
/
transfers.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
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: badges/transfers.proto
package types
import (
fmt "fmt"
_ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/cosmos/gogoproto/proto"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// UserBalanceStore is the store for the user balances for a collection.
//
// It consists of a list of balances, a list of approved outgoing transfers, and a list of approved incoming transfers,
// as well as the permissions for updating the approved incoming/outgoing transfers.
//
// Upon initialization, all fields (minus the balances) are set to the defaults specified by the collection.
//
// The outgoing transfers can be used to allow / disallow transfers which are sent from this user.
// If a transfer has no match, then it is disallowed by default, unless from == initiatedBy (i.e. initiated by this user)
// and autoApproveSelfInitiatedOutgoingTransfers is set to true.
//
// The incoming transfers can be used to allow / disallow transfers which are sent to this user.
// If a transfer has no match, then it is disallowed by default, unless to == initiatedBy (i.e. initiated by this user)
// and autoApproveSelfInitiatedIncomingTransfers is set to true.
//
// Note that the user approved transfers are only checked if the collection approved transfers do not specify to override
// the user approved transfers.
//
// The permissions are used to determine whether the user can update the approved incoming/outgoing transfers and auto approvals.
type UserBalanceStore struct {
// The list of balances associated with this user.
Balances []*Balance `protobuf:"bytes,1,rep,name=balances,proto3" json:"balances,omitempty"`
// The list of approved outgoing transfers for this user.
OutgoingApprovals []*UserOutgoingApproval `protobuf:"bytes,2,rep,name=outgoingApprovals,proto3" json:"outgoingApprovals,omitempty"`
// The list of approved incoming transfers for this user.
IncomingApprovals []*UserIncomingApproval `protobuf:"bytes,3,rep,name=incomingApprovals,proto3" json:"incomingApprovals,omitempty"`
// Whether to auto-approve self-initiated outgoing transfers for this user (i.e. from == initiatedBy).
AutoApproveSelfInitiatedOutgoingTransfers bool `protobuf:"varint,4,opt,name=autoApproveSelfInitiatedOutgoingTransfers,proto3" json:"autoApproveSelfInitiatedOutgoingTransfers,omitempty"`
// Whether to auto-approve self-initiated incoming transfers for this user (i.e. to == initiatedBy).
AutoApproveSelfInitiatedIncomingTransfers bool `protobuf:"varint,5,opt,name=autoApproveSelfInitiatedIncomingTransfers,proto3" json:"autoApproveSelfInitiatedIncomingTransfers,omitempty"`
// The permissions for this user's actions and transfers.
UserPermissions *UserPermissions `protobuf:"bytes,6,opt,name=userPermissions,proto3" json:"userPermissions,omitempty"`
}
func (m *UserBalanceStore) Reset() { *m = UserBalanceStore{} }
func (m *UserBalanceStore) String() string { return proto.CompactTextString(m) }
func (*UserBalanceStore) ProtoMessage() {}
func (*UserBalanceStore) Descriptor() ([]byte, []int) {
return fileDescriptor_db7d8388ebf2a03f, []int{0}
}
func (m *UserBalanceStore) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *UserBalanceStore) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_UserBalanceStore.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *UserBalanceStore) XXX_Merge(src proto.Message) {
xxx_messageInfo_UserBalanceStore.Merge(m, src)
}
func (m *UserBalanceStore) XXX_Size() int {
return m.Size()
}
func (m *UserBalanceStore) XXX_DiscardUnknown() {
xxx_messageInfo_UserBalanceStore.DiscardUnknown(m)
}
var xxx_messageInfo_UserBalanceStore proto.InternalMessageInfo
func (m *UserBalanceStore) GetBalances() []*Balance {
if m != nil {
return m.Balances
}
return nil
}
func (m *UserBalanceStore) GetOutgoingApprovals() []*UserOutgoingApproval {
if m != nil {
return m.OutgoingApprovals
}
return nil
}
func (m *UserBalanceStore) GetIncomingApprovals() []*UserIncomingApproval {
if m != nil {
return m.IncomingApprovals
}
return nil
}
func (m *UserBalanceStore) GetAutoApproveSelfInitiatedOutgoingTransfers() bool {
if m != nil {
return m.AutoApproveSelfInitiatedOutgoingTransfers
}
return false
}
func (m *UserBalanceStore) GetAutoApproveSelfInitiatedIncomingTransfers() bool {
if m != nil {
return m.AutoApproveSelfInitiatedIncomingTransfers
}
return false
}
func (m *UserBalanceStore) GetUserPermissions() *UserPermissions {
if m != nil {
return m.UserPermissions
}
return nil
}
// Challenges define a rule for the approval in the form of a Merkle challenge.
//
// A Merkle challenge is a challenge where the user must provide a Merkle proof to a Merkle tree. If they provide a valid proof,
// then the challenge is met. All challenges must be met with valid solutions for the transfer to be approved.
//
// IMPORTANT: Merkle challenges currently are limited to SHA256 hashes. See documentation for MerkleChallenge for more details and tutorials.
//
// IMPORTANT: We track the number of uses per leaf according to the challengeTrackerId specified by the parent approval of this challenge.
// If you update the challenge ID, then the used leaves tracker will reset and start a new tally.
// We recommend using a unique challenge ID for each challenge to prevent overlap and unexpected behavior.
type MerkleChallenge struct {
// The root hash of the Merkle tree to which the Merkle path must lead for verification.
Root string `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"`
// The expected length of the Merkle path for verification. Used to prevent Merkle path truncation attacks.
ExpectedProofLength Uint `protobuf:"bytes,2,opt,name=expectedProofLength,proto3,customtype=Uint" json:"expectedProofLength"`
// If true, we will override the user's leaf for their proof with their creator address. Used for whitelist trees where all leaves are valid Cosmos addresses.
UseCreatorAddressAsLeaf bool `protobuf:"varint,3,opt,name=useCreatorAddressAsLeaf,proto3" json:"useCreatorAddressAsLeaf,omitempty"`
// The maximum number of times each leaf can be used. Must be 1 if useCreatorAddressAsLeaf is false to prevent replay attacks.
MaxUsesPerLeaf Uint `protobuf:"bytes,4,opt,name=maxUsesPerLeaf,proto3,customtype=Uint" json:"maxUsesPerLeaf"`
// The URI associated with this Merkle challenge, optionally providing metadata about the challenge.
Uri string `protobuf:"bytes,5,opt,name=uri,proto3" json:"uri,omitempty"`
// Arbitrary custom data associated with this Merkle challenge.
CustomData string `protobuf:"bytes,6,opt,name=customData,proto3" json:"customData,omitempty"`
}
func (m *MerkleChallenge) Reset() { *m = MerkleChallenge{} }
func (m *MerkleChallenge) String() string { return proto.CompactTextString(m) }
func (*MerkleChallenge) ProtoMessage() {}
func (*MerkleChallenge) Descriptor() ([]byte, []int) {
return fileDescriptor_db7d8388ebf2a03f, []int{1}
}
func (m *MerkleChallenge) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MerkleChallenge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MerkleChallenge.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *MerkleChallenge) XXX_Merge(src proto.Message) {
xxx_messageInfo_MerkleChallenge.Merge(m, src)
}
func (m *MerkleChallenge) XXX_Size() int {
return m.Size()
}
func (m *MerkleChallenge) XXX_DiscardUnknown() {
xxx_messageInfo_MerkleChallenge.DiscardUnknown(m)
}
var xxx_messageInfo_MerkleChallenge proto.InternalMessageInfo
func (m *MerkleChallenge) GetRoot() string {
if m != nil {
return m.Root
}
return ""
}
func (m *MerkleChallenge) GetUseCreatorAddressAsLeaf() bool {
if m != nil {
return m.UseCreatorAddressAsLeaf
}
return false
}
func (m *MerkleChallenge) GetUri() string {
if m != nil {
return m.Uri
}
return ""
}
func (m *MerkleChallenge) GetCustomData() string {
if m != nil {
return m.CustomData
}
return ""
}
// UserOutgoingApproval defines the rules for the approval of an outgoing transfer from a user.
type UserOutgoingApproval struct {
// The list ID for the recipient of the transfer.
ToListId string `protobuf:"bytes,1,opt,name=toListId,proto3" json:"toListId,omitempty"`
// The list ID for the user who initiated the transfer.
InitiatedByListId string `protobuf:"bytes,2,opt,name=initiatedByListId,proto3" json:"initiatedByListId,omitempty"`
// The allowed range of transfer times for approval.
TransferTimes []*UintRange `protobuf:"bytes,3,rep,name=transferTimes,proto3" json:"transferTimes,omitempty"`
// The allowed range of badge IDs for approval.
BadgeIds []*UintRange `protobuf:"bytes,4,rep,name=badgeIds,proto3" json:"badgeIds,omitempty"`
// The allowed range of ownership times for approval.
OwnershipTimes []*UintRange `protobuf:"bytes,5,rep,name=ownershipTimes,proto3" json:"ownershipTimes,omitempty"`
// The ID of the amount tracker associated with this approval.
// We use this ID to track the number of transfers and amounts transferred.
AmountTrackerId string `protobuf:"bytes,6,opt,name=amountTrackerId,proto3" json:"amountTrackerId,omitempty"`
// The ID of the challenge tracker associated with this approval.
// We use this ID to track the number of uses per leaf for the Merkle challenge.
ChallengeTrackerId string `protobuf:"bytes,7,opt,name=challengeTrackerId,proto3" json:"challengeTrackerId,omitempty"`
// The URI associated with this approval, optionally providing metadata about the approval.
Uri string `protobuf:"bytes,8,opt,name=uri,proto3" json:"uri,omitempty"`
// Arbitrary custom data associated with this approval.
CustomData string `protobuf:"bytes,9,opt,name=customData,proto3" json:"customData,omitempty"`
// The ID of this approval. Must be unique per level (i.e. collection, outgoing, incoming).
ApprovalId string `protobuf:"bytes,10,opt,name=approvalId,proto3" json:"approvalId,omitempty"`
// The criteria that must be met for this approval to be considered.
ApprovalCriteria *OutgoingApprovalCriteria `protobuf:"bytes,11,opt,name=approvalCriteria,proto3" json:"approvalCriteria,omitempty"`
}
func (m *UserOutgoingApproval) Reset() { *m = UserOutgoingApproval{} }
func (m *UserOutgoingApproval) String() string { return proto.CompactTextString(m) }
func (*UserOutgoingApproval) ProtoMessage() {}
func (*UserOutgoingApproval) Descriptor() ([]byte, []int) {
return fileDescriptor_db7d8388ebf2a03f, []int{2}
}
func (m *UserOutgoingApproval) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *UserOutgoingApproval) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_UserOutgoingApproval.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *UserOutgoingApproval) XXX_Merge(src proto.Message) {
xxx_messageInfo_UserOutgoingApproval.Merge(m, src)
}
func (m *UserOutgoingApproval) XXX_Size() int {
return m.Size()
}
func (m *UserOutgoingApproval) XXX_DiscardUnknown() {
xxx_messageInfo_UserOutgoingApproval.DiscardUnknown(m)
}
var xxx_messageInfo_UserOutgoingApproval proto.InternalMessageInfo
func (m *UserOutgoingApproval) GetToListId() string {
if m != nil {
return m.ToListId
}
return ""
}
func (m *UserOutgoingApproval) GetInitiatedByListId() string {
if m != nil {
return m.InitiatedByListId
}
return ""
}
func (m *UserOutgoingApproval) GetTransferTimes() []*UintRange {
if m != nil {
return m.TransferTimes
}
return nil
}
func (m *UserOutgoingApproval) GetBadgeIds() []*UintRange {
if m != nil {
return m.BadgeIds
}
return nil
}
func (m *UserOutgoingApproval) GetOwnershipTimes() []*UintRange {
if m != nil {
return m.OwnershipTimes
}
return nil
}
func (m *UserOutgoingApproval) GetAmountTrackerId() string {
if m != nil {
return m.AmountTrackerId
}
return ""
}
func (m *UserOutgoingApproval) GetChallengeTrackerId() string {
if m != nil {
return m.ChallengeTrackerId
}
return ""
}
func (m *UserOutgoingApproval) GetUri() string {
if m != nil {
return m.Uri
}
return ""
}
func (m *UserOutgoingApproval) GetCustomData() string {
if m != nil {
return m.CustomData
}
return ""
}
func (m *UserOutgoingApproval) GetApprovalId() string {
if m != nil {
return m.ApprovalId
}
return ""
}
func (m *UserOutgoingApproval) GetApprovalCriteria() *OutgoingApprovalCriteria {
if m != nil {
return m.ApprovalCriteria
}
return nil
}
// UserIncomingApproval defines the rules for the approval of an incoming transfer to a user.
type UserIncomingApproval struct {
// The list ID for the sender of the transfer.
FromListId string `protobuf:"bytes,1,opt,name=fromListId,proto3" json:"fromListId,omitempty"`
// The list ID for the user who initiated the transfer.
InitiatedByListId string `protobuf:"bytes,2,opt,name=initiatedByListId,proto3" json:"initiatedByListId,omitempty"`
// The allowed range of transfer times for approval.
TransferTimes []*UintRange `protobuf:"bytes,3,rep,name=transferTimes,proto3" json:"transferTimes,omitempty"`
// The allowed range of badge IDs for approval.
BadgeIds []*UintRange `protobuf:"bytes,4,rep,name=badgeIds,proto3" json:"badgeIds,omitempty"`
// The allowed range of ownership times for approval.
OwnershipTimes []*UintRange `protobuf:"bytes,5,rep,name=ownershipTimes,proto3" json:"ownershipTimes,omitempty"`
// The ID of the amount tracker associated with this approval.
// We use this ID to track the number of transfers and amounts transferred.
AmountTrackerId string `protobuf:"bytes,6,opt,name=amountTrackerId,proto3" json:"amountTrackerId,omitempty"`
// The ID of the challenge tracker associated with this approval.
// We use this ID to track the number of uses per leaf for the Merkle challenge.
ChallengeTrackerId string `protobuf:"bytes,7,opt,name=challengeTrackerId,proto3" json:"challengeTrackerId,omitempty"`
// The URI associated with this approval, optionally providing metadata about the approval.
Uri string `protobuf:"bytes,8,opt,name=uri,proto3" json:"uri,omitempty"`
// Arbitrary custom data associated with this approval.
CustomData string `protobuf:"bytes,9,opt,name=customData,proto3" json:"customData,omitempty"`
// The ID of this approval. Must be unique per level (i.e. collection, outgoing, incoming).
ApprovalId string `protobuf:"bytes,10,opt,name=approvalId,proto3" json:"approvalId,omitempty"`
// The criteria that must be met for this approval to be considered.
ApprovalCriteria *IncomingApprovalCriteria `protobuf:"bytes,11,opt,name=approvalCriteria,proto3" json:"approvalCriteria,omitempty"`
}
func (m *UserIncomingApproval) Reset() { *m = UserIncomingApproval{} }
func (m *UserIncomingApproval) String() string { return proto.CompactTextString(m) }
func (*UserIncomingApproval) ProtoMessage() {}
func (*UserIncomingApproval) Descriptor() ([]byte, []int) {
return fileDescriptor_db7d8388ebf2a03f, []int{3}
}
func (m *UserIncomingApproval) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *UserIncomingApproval) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_UserIncomingApproval.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *UserIncomingApproval) XXX_Merge(src proto.Message) {
xxx_messageInfo_UserIncomingApproval.Merge(m, src)
}
func (m *UserIncomingApproval) XXX_Size() int {
return m.Size()
}
func (m *UserIncomingApproval) XXX_DiscardUnknown() {
xxx_messageInfo_UserIncomingApproval.DiscardUnknown(m)
}
var xxx_messageInfo_UserIncomingApproval proto.InternalMessageInfo
func (m *UserIncomingApproval) GetFromListId() string {
if m != nil {
return m.FromListId
}
return ""
}
func (m *UserIncomingApproval) GetInitiatedByListId() string {
if m != nil {
return m.InitiatedByListId
}
return ""
}
func (m *UserIncomingApproval) GetTransferTimes() []*UintRange {
if m != nil {
return m.TransferTimes
}
return nil
}
func (m *UserIncomingApproval) GetBadgeIds() []*UintRange {
if m != nil {
return m.BadgeIds
}
return nil
}
func (m *UserIncomingApproval) GetOwnershipTimes() []*UintRange {
if m != nil {
return m.OwnershipTimes
}
return nil
}
func (m *UserIncomingApproval) GetAmountTrackerId() string {
if m != nil {
return m.AmountTrackerId
}
return ""
}
func (m *UserIncomingApproval) GetChallengeTrackerId() string {
if m != nil {
return m.ChallengeTrackerId
}
return ""
}
func (m *UserIncomingApproval) GetUri() string {
if m != nil {
return m.Uri
}
return ""
}
func (m *UserIncomingApproval) GetCustomData() string {
if m != nil {
return m.CustomData
}
return ""
}
func (m *UserIncomingApproval) GetApprovalId() string {
if m != nil {
return m.ApprovalId
}
return ""
}
func (m *UserIncomingApproval) GetApprovalCriteria() *IncomingApprovalCriteria {
if m != nil {
return m.ApprovalCriteria
}
return nil
}
// ManualBalances represents a list of manual balances entered for the predetermined balances criteria. Order is calculated according to the calculation method set.
type ManualBalances struct {
Balances []*Balance `protobuf:"bytes,1,rep,name=balances,proto3" json:"balances,omitempty"`
}
func (m *ManualBalances) Reset() { *m = ManualBalances{} }
func (m *ManualBalances) String() string { return proto.CompactTextString(m) }
func (*ManualBalances) ProtoMessage() {}
func (*ManualBalances) Descriptor() ([]byte, []int) {
return fileDescriptor_db7d8388ebf2a03f, []int{4}
}
func (m *ManualBalances) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ManualBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ManualBalances.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ManualBalances) XXX_Merge(src proto.Message) {
xxx_messageInfo_ManualBalances.Merge(m, src)
}
func (m *ManualBalances) XXX_Size() int {
return m.Size()
}
func (m *ManualBalances) XXX_DiscardUnknown() {
xxx_messageInfo_ManualBalances.DiscardUnknown(m)
}
var xxx_messageInfo_ManualBalances proto.InternalMessageInfo
func (m *ManualBalances) GetBalances() []*Balance {
if m != nil {
return m.Balances
}
return nil
}
// IncrementedBalances represents balances that are incremented by specific amounts, according to the order calculation method.
type IncrementedBalances struct {
StartBalances []*Balance `protobuf:"bytes,1,rep,name=startBalances,proto3" json:"startBalances,omitempty"`
// The amount by which to increment badge IDs.
IncrementBadgeIdsBy Uint `protobuf:"bytes,2,opt,name=incrementBadgeIdsBy,proto3,customtype=Uint" json:"incrementBadgeIdsBy"`
// The amount by which to increment ownership times.
IncrementOwnershipTimesBy Uint `protobuf:"bytes,3,opt,name=incrementOwnershipTimesBy,proto3,customtype=Uint" json:"incrementOwnershipTimesBy"`
}
func (m *IncrementedBalances) Reset() { *m = IncrementedBalances{} }
func (m *IncrementedBalances) String() string { return proto.CompactTextString(m) }
func (*IncrementedBalances) ProtoMessage() {}
func (*IncrementedBalances) Descriptor() ([]byte, []int) {
return fileDescriptor_db7d8388ebf2a03f, []int{5}
}
func (m *IncrementedBalances) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *IncrementedBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_IncrementedBalances.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *IncrementedBalances) XXX_Merge(src proto.Message) {
xxx_messageInfo_IncrementedBalances.Merge(m, src)
}
func (m *IncrementedBalances) XXX_Size() int {
return m.Size()
}
func (m *IncrementedBalances) XXX_DiscardUnknown() {
xxx_messageInfo_IncrementedBalances.DiscardUnknown(m)
}
var xxx_messageInfo_IncrementedBalances proto.InternalMessageInfo
func (m *IncrementedBalances) GetStartBalances() []*Balance {
if m != nil {
return m.StartBalances
}
return nil
}
// PredeterminedOrderCalculationMethod defines the method to calculate predetermined balances order.
type PredeterminedOrderCalculationMethod struct {
// Use the overall number of transfers to calculate the order. Ex: First transfer gets the first balance, second transfer gets the second balance, etc.
UseOverallNumTransfers bool `protobuf:"varint,1,opt,name=useOverallNumTransfers,proto3" json:"useOverallNumTransfers,omitempty"`
// Use the number of transfers per "to" address to calculate the order. Ex: First transfer to address A gets the first balance, second transfer to address A gets the second balance, etc.
UsePerToAddressNumTransfers bool `protobuf:"varint,2,opt,name=usePerToAddressNumTransfers,proto3" json:"usePerToAddressNumTransfers,omitempty"`
// Use the number of transfers per "from" address to calculate the order. Ex: First transfer from address A gets the first balance, second transfer from address A gets the second balance, etc.
UsePerFromAddressNumTransfers bool `protobuf:"varint,3,opt,name=usePerFromAddressNumTransfers,proto3" json:"usePerFromAddressNumTransfers,omitempty"`
// Use the number of transfers per "initiated by" address to calculate the order. Ex: First transfer initiated by address A gets the first balance, second transfer initiated by address A gets the second balance, etc.
UsePerInitiatedByAddressNumTransfers bool `protobuf:"varint,4,opt,name=usePerInitiatedByAddressNumTransfers,proto3" json:"usePerInitiatedByAddressNumTransfers,omitempty"`
// Use the Merkle challenge leaf index to calculate the order. Ex: Transfer that uses leaf index 0 gets the first balance, transfer that uses leaf index 1 gets the second balance, etc.
UseMerkleChallengeLeafIndex bool `protobuf:"varint,5,opt,name=useMerkleChallengeLeafIndex,proto3" json:"useMerkleChallengeLeafIndex,omitempty"`
}
func (m *PredeterminedOrderCalculationMethod) Reset() { *m = PredeterminedOrderCalculationMethod{} }
func (m *PredeterminedOrderCalculationMethod) String() string { return proto.CompactTextString(m) }
func (*PredeterminedOrderCalculationMethod) ProtoMessage() {}
func (*PredeterminedOrderCalculationMethod) Descriptor() ([]byte, []int) {
return fileDescriptor_db7d8388ebf2a03f, []int{6}
}
func (m *PredeterminedOrderCalculationMethod) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PredeterminedOrderCalculationMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PredeterminedOrderCalculationMethod.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *PredeterminedOrderCalculationMethod) XXX_Merge(src proto.Message) {
xxx_messageInfo_PredeterminedOrderCalculationMethod.Merge(m, src)
}
func (m *PredeterminedOrderCalculationMethod) XXX_Size() int {
return m.Size()
}
func (m *PredeterminedOrderCalculationMethod) XXX_DiscardUnknown() {
xxx_messageInfo_PredeterminedOrderCalculationMethod.DiscardUnknown(m)
}
var xxx_messageInfo_PredeterminedOrderCalculationMethod proto.InternalMessageInfo
func (m *PredeterminedOrderCalculationMethod) GetUseOverallNumTransfers() bool {
if m != nil {
return m.UseOverallNumTransfers
}
return false
}
func (m *PredeterminedOrderCalculationMethod) GetUsePerToAddressNumTransfers() bool {
if m != nil {
return m.UsePerToAddressNumTransfers
}
return false
}
func (m *PredeterminedOrderCalculationMethod) GetUsePerFromAddressNumTransfers() bool {
if m != nil {
return m.UsePerFromAddressNumTransfers
}
return false
}
func (m *PredeterminedOrderCalculationMethod) GetUsePerInitiatedByAddressNumTransfers() bool {
if m != nil {
return m.UsePerInitiatedByAddressNumTransfers
}
return false
}
func (m *PredeterminedOrderCalculationMethod) GetUseMerkleChallengeLeafIndex() bool {
if m != nil {
return m.UseMerkleChallengeLeafIndex
}
return false
}
// PredeterminedBalances represents balances with predetermined order calculation.
type PredeterminedBalances struct {
// Manual balances that can be entered. If this is nil, then we use the incremented balances.
ManualBalances []*ManualBalances `protobuf:"bytes,1,rep,name=manualBalances,proto3" json:"manualBalances,omitempty"`
// Balances that have a starting amount and increment. If this is nil, then we use the manual balances.
IncrementedBalances *IncrementedBalances `protobuf:"bytes,2,opt,name=incrementedBalances,proto3" json:"incrementedBalances,omitempty"`
// The method to calculate the order of predetermined balances.
OrderCalculationMethod *PredeterminedOrderCalculationMethod `protobuf:"bytes,3,opt,name=orderCalculationMethod,proto3" json:"orderCalculationMethod,omitempty"`
}
func (m *PredeterminedBalances) Reset() { *m = PredeterminedBalances{} }
func (m *PredeterminedBalances) String() string { return proto.CompactTextString(m) }
func (*PredeterminedBalances) ProtoMessage() {}
func (*PredeterminedBalances) Descriptor() ([]byte, []int) {
return fileDescriptor_db7d8388ebf2a03f, []int{7}
}
func (m *PredeterminedBalances) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PredeterminedBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PredeterminedBalances.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *PredeterminedBalances) XXX_Merge(src proto.Message) {
xxx_messageInfo_PredeterminedBalances.Merge(m, src)
}
func (m *PredeterminedBalances) XXX_Size() int {
return m.Size()
}
func (m *PredeterminedBalances) XXX_DiscardUnknown() {
xxx_messageInfo_PredeterminedBalances.DiscardUnknown(m)
}
var xxx_messageInfo_PredeterminedBalances proto.InternalMessageInfo
func (m *PredeterminedBalances) GetManualBalances() []*ManualBalances {
if m != nil {
return m.ManualBalances
}
return nil
}
func (m *PredeterminedBalances) GetIncrementedBalances() *IncrementedBalances {
if m != nil {
return m.IncrementedBalances
}
return nil
}
func (m *PredeterminedBalances) GetOrderCalculationMethod() *PredeterminedOrderCalculationMethod {
if m != nil {
return m.OrderCalculationMethod
}
return nil
}
// ApprovalAmounts defines approval amounts per unique "from," "to," and/or "initiated by" address.
// If any of these are nil or "0", we assume unlimited approvals.
// If they are set to a value, then the running tally of the amounts transferred for the specified badge IDs and ownership times
// must not exceed the corresponding value.
type ApprovalAmounts struct {
// Overall approval amount.
OverallApprovalAmount Uint `protobuf:"bytes,1,opt,name=overallApprovalAmount,proto3,customtype=Uint" json:"overallApprovalAmount"`
// Approval amount per "to" address.
PerToAddressApprovalAmount Uint `protobuf:"bytes,2,opt,name=perToAddressApprovalAmount,proto3,customtype=Uint" json:"perToAddressApprovalAmount"`
// Approval amount per "from" address.
PerFromAddressApprovalAmount Uint `protobuf:"bytes,3,opt,name=perFromAddressApprovalAmount,proto3,customtype=Uint" json:"perFromAddressApprovalAmount"`
// Approval amount per "initiated by" address.
PerInitiatedByAddressApprovalAmount Uint `protobuf:"bytes,4,opt,name=perInitiatedByAddressApprovalAmount,proto3,customtype=Uint" json:"perInitiatedByAddressApprovalAmount"`
}
func (m *ApprovalAmounts) Reset() { *m = ApprovalAmounts{} }
func (m *ApprovalAmounts) String() string { return proto.CompactTextString(m) }
func (*ApprovalAmounts) ProtoMessage() {}
func (*ApprovalAmounts) Descriptor() ([]byte, []int) {
return fileDescriptor_db7d8388ebf2a03f, []int{8}
}
func (m *ApprovalAmounts) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ApprovalAmounts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ApprovalAmounts.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ApprovalAmounts) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApprovalAmounts.Merge(m, src)
}
func (m *ApprovalAmounts) XXX_Size() int {
return m.Size()
}
func (m *ApprovalAmounts) XXX_DiscardUnknown() {
xxx_messageInfo_ApprovalAmounts.DiscardUnknown(m)
}
var xxx_messageInfo_ApprovalAmounts proto.InternalMessageInfo
// MaxNumTransfers defines the maximum number of transfers per unique "from," "to," and/or "initiated by" address.
// If any of these are nil or "0", we assume unlimited approvals.
// If they are set to a value, then the running tally of the number of transfers for the specified badge IDs and ownership times
// must not exceed the corresponding value.
type MaxNumTransfers struct {
// Overall maximum number of transfers.
OverallMaxNumTransfers Uint `protobuf:"bytes,1,opt,name=overallMaxNumTransfers,proto3,customtype=Uint" json:"overallMaxNumTransfers"`
// Maximum number of transfers per "to" address.
PerToAddressMaxNumTransfers Uint `protobuf:"bytes,2,opt,name=perToAddressMaxNumTransfers,proto3,customtype=Uint" json:"perToAddressMaxNumTransfers"`
// Maximum number of transfers per "from" address.
PerFromAddressMaxNumTransfers Uint `protobuf:"bytes,3,opt,name=perFromAddressMaxNumTransfers,proto3,customtype=Uint" json:"perFromAddressMaxNumTransfers"`
// Maximum number of transfers per "initiated by" address.
PerInitiatedByAddressMaxNumTransfers Uint `protobuf:"bytes,4,opt,name=perInitiatedByAddressMaxNumTransfers,proto3,customtype=Uint" json:"perInitiatedByAddressMaxNumTransfers"`
}
func (m *MaxNumTransfers) Reset() { *m = MaxNumTransfers{} }
func (m *MaxNumTransfers) String() string { return proto.CompactTextString(m) }
func (*MaxNumTransfers) ProtoMessage() {}
func (*MaxNumTransfers) Descriptor() ([]byte, []int) {
return fileDescriptor_db7d8388ebf2a03f, []int{9}
}
func (m *MaxNumTransfers) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MaxNumTransfers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MaxNumTransfers.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *MaxNumTransfers) XXX_Merge(src proto.Message) {
xxx_messageInfo_MaxNumTransfers.Merge(m, src)
}
func (m *MaxNumTransfers) XXX_Size() int {
return m.Size()
}
func (m *MaxNumTransfers) XXX_DiscardUnknown() {
xxx_messageInfo_MaxNumTransfers.DiscardUnknown(m)
}
var xxx_messageInfo_MaxNumTransfers proto.InternalMessageInfo
// ApprovalTracker defines the tracker for approvals. This tracks the cumulative number of transfers and associated balances transferred.
type ApprovalTracker struct {
// The number of transfers that have been processed.
NumTransfers Uint `protobuf:"bytes,1,opt,name=numTransfers,proto3,customtype=Uint" json:"numTransfers"`
// Cumulative balances associated with the transfers that have been processed.
Amounts []*Balance `protobuf:"bytes,2,rep,name=amounts,proto3" json:"amounts,omitempty"`
}
func (m *ApprovalTracker) Reset() { *m = ApprovalTracker{} }
func (m *ApprovalTracker) String() string { return proto.CompactTextString(m) }
func (*ApprovalTracker) ProtoMessage() {}
func (*ApprovalTracker) Descriptor() ([]byte, []int) {
return fileDescriptor_db7d8388ebf2a03f, []int{10}
}
func (m *ApprovalTracker) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ApprovalTracker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ApprovalTracker.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ApprovalTracker) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApprovalTracker.Merge(m, src)
}
func (m *ApprovalTracker) XXX_Size() int {
return m.Size()
}
func (m *ApprovalTracker) XXX_DiscardUnknown() {
xxx_messageInfo_ApprovalTracker.DiscardUnknown(m)
}
var xxx_messageInfo_ApprovalTracker proto.InternalMessageInfo
func (m *ApprovalTracker) GetAmounts() []*Balance {
if m != nil {
return m.Amounts
}
return nil
}
// ApprovalCriteria defines the criteria for approving transfers.
type ApprovalCriteria struct {
// List of badges that the user must own for approval.
MustOwnBadges []*MustOwnBadges `protobuf:"bytes,1,rep,name=mustOwnBadges,proto3" json:"mustOwnBadges,omitempty"`
// Merkle challenge that must be satisfied for approval.
MerkleChallenge *MerkleChallenge `protobuf:"bytes,2,opt,name=merkleChallenge,proto3" json:"merkleChallenge,omitempty"`
// Predetermined balances for eeach approval.
PredeterminedBalances *PredeterminedBalances `protobuf:"bytes,3,opt,name=predeterminedBalances,proto3" json:"predeterminedBalances,omitempty"`
// Threshold limit of amounts that can be transferred using this approval.
ApprovalAmounts *ApprovalAmounts `protobuf:"bytes,4,opt,name=approvalAmounts,proto3" json:"approvalAmounts,omitempty"`
// Maximum number of transfers that can be processed using this approval.
MaxNumTransfers *MaxNumTransfers `protobuf:"bytes,5,opt,name=maxNumTransfers,proto3" json:"maxNumTransfers,omitempty"`
// Require the "to" address to be equal to the "initiated by" address for approval.
RequireToEqualsInitiatedBy bool `protobuf:"varint,9,opt,name=requireToEqualsInitiatedBy,proto3" json:"requireToEqualsInitiatedBy,omitempty"`
// Require the "from" address to be equal to the "initiated by" address for approval.
RequireFromEqualsInitiatedBy bool `protobuf:"varint,10,opt,name=requireFromEqualsInitiatedBy,proto3" json:"requireFromEqualsInitiatedBy,omitempty"`
// Require the "to" address to not be equal to the "initiated by" address for approval.
RequireToDoesNotEqualInitiatedBy bool `protobuf:"varint,11,opt,name=requireToDoesNotEqualInitiatedBy,proto3" json:"requireToDoesNotEqualInitiatedBy,omitempty"`
// Require the "from" address to not be equal to the "initiated by" address for approval.
RequireFromDoesNotEqualInitiatedBy bool `protobuf:"varint,12,opt,name=requireFromDoesNotEqualInitiatedBy,proto3" json:"requireFromDoesNotEqualInitiatedBy,omitempty"`
// Overrides the user's outgoing approvals for approval.
OverridesFromOutgoingApprovals bool `protobuf:"varint,13,opt,name=overridesFromOutgoingApprovals,proto3" json:"overridesFromOutgoingApprovals,omitempty"`
// Overrides the user's incoming approvals for approval.
OverridesToIncomingApprovals bool `protobuf:"varint,14,opt,name=overridesToIncomingApprovals,proto3" json:"overridesToIncomingApprovals,omitempty"`
}
func (m *ApprovalCriteria) Reset() { *m = ApprovalCriteria{} }
func (m *ApprovalCriteria) String() string { return proto.CompactTextString(m) }
func (*ApprovalCriteria) ProtoMessage() {}
func (*ApprovalCriteria) Descriptor() ([]byte, []int) {
return fileDescriptor_db7d8388ebf2a03f, []int{11}
}
func (m *ApprovalCriteria) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ApprovalCriteria) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ApprovalCriteria.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ApprovalCriteria) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApprovalCriteria.Merge(m, src)
}
func (m *ApprovalCriteria) XXX_Size() int {
return m.Size()
}
func (m *ApprovalCriteria) XXX_DiscardUnknown() {
xxx_messageInfo_ApprovalCriteria.DiscardUnknown(m)
}
var xxx_messageInfo_ApprovalCriteria proto.InternalMessageInfo
func (m *ApprovalCriteria) GetMustOwnBadges() []*MustOwnBadges {
if m != nil {
return m.MustOwnBadges
}
return nil
}
func (m *ApprovalCriteria) GetMerkleChallenge() *MerkleChallenge {
if m != nil {
return m.MerkleChallenge
}
return nil
}
func (m *ApprovalCriteria) GetPredeterminedBalances() *PredeterminedBalances {
if m != nil {
return m.PredeterminedBalances
}
return nil
}
func (m *ApprovalCriteria) GetApprovalAmounts() *ApprovalAmounts {
if m != nil {
return m.ApprovalAmounts
}
return nil
}
func (m *ApprovalCriteria) GetMaxNumTransfers() *MaxNumTransfers {
if m != nil {
return m.MaxNumTransfers
}
return nil
}
func (m *ApprovalCriteria) GetRequireToEqualsInitiatedBy() bool {
if m != nil {
return m.RequireToEqualsInitiatedBy
}
return false
}
func (m *ApprovalCriteria) GetRequireFromEqualsInitiatedBy() bool {
if m != nil {
return m.RequireFromEqualsInitiatedBy
}
return false
}
func (m *ApprovalCriteria) GetRequireToDoesNotEqualInitiatedBy() bool {
if m != nil {
return m.RequireToDoesNotEqualInitiatedBy
}
return false
}
func (m *ApprovalCriteria) GetRequireFromDoesNotEqualInitiatedBy() bool {
if m != nil {
return m.RequireFromDoesNotEqualInitiatedBy
}
return false