-
Notifications
You must be signed in to change notification settings - Fork 1
/
did.pb.go
2287 lines (2225 loc) · 57.1 KB
/
did.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: did/v1/did.proto
package did
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "google.golang.org/protobuf/types/known/timestamppb"
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
// DidDocument represents a dencentralised identifer.
type DidDocument struct {
// @context is spec for did document.
Context []string `protobuf:"bytes,1,rep,name=context,proto3" json:"@context,omitempty"`
// id represents the id for the did document.
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
// A DID controller is an entity that is authorized to make changes to a DID document.
// cfr. https://www.w3.org/TR/did-core/#did-controller
Controller []string `protobuf:"bytes,3,rep,name=controller,proto3" json:"controller,omitempty"`
// A DID document can express verification methods,
// such as cryptographic public keys, which can be used
// to authenticate or authorize interactions with the DID subject or associated parties.
// https://www.w3.org/TR/did-core/#verification-methods
VerificationMethod []*VerificationMethod `protobuf:"bytes,4,rep,name=verificationMethod,proto3" json:"verificationMethod,omitempty"`
// Services are used in DID documents to express ways of communicating
// with the DID subject or associated entities.
// https://www.w3.org/TR/did-core/#services
Service []*Service `protobuf:"bytes,5,rep,name=service,proto3" json:"service,omitempty"`
// Authentication represents public key associated with the did document.
// cfr. https://www.w3.org/TR/did-core/#authentication
Authentication []string `protobuf:"bytes,6,rep,name=authentication,proto3" json:"authentication,omitempty"`
// Used to specify how the DID subject is expected to express claims,
// such as for the purposes of issuing a Verifiable Credential.
// cfr. https://www.w3.org/TR/did-core/#assertion
AssertionMethod []string `protobuf:"bytes,7,rep,name=assertionMethod,proto3" json:"assertionMethod,omitempty"`
// used to specify how an entity can generate encryption material
// in order to transmit confidential information intended for the DID subject.
// https://www.w3.org/TR/did-core/#key-agreement
KeyAgreement []string `protobuf:"bytes,8,rep,name=keyAgreement,proto3" json:"keyAgreement,omitempty"`
// Used to specify a verification method that might be used by the DID subject
// to invoke a cryptographic capability, such as the authorization
// to update the DID Document.
// https://www.w3.org/TR/did-core/#capability-invocation
CapabilityInvocation []string `protobuf:"bytes,9,rep,name=capabilityInvocation,proto3" json:"capabilityInvocation,omitempty"`
// Used to specify a mechanism that might be used by the DID subject
// to delegate a cryptographic capability to another party.
// https://www.w3.org/TR/did-core/#capability-delegation
CapabilityDelegation []string `protobuf:"bytes,10,rep,name=capabilityDelegation,proto3" json:"capabilityDelegation,omitempty"`
}
func (m *DidDocument) Reset() { *m = DidDocument{} }
func (m *DidDocument) String() string { return proto.CompactTextString(m) }
func (*DidDocument) ProtoMessage() {}
func (*DidDocument) Descriptor() ([]byte, []int) {
return fileDescriptor_e63f2c747195152a, []int{0}
}
func (m *DidDocument) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *DidDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_DidDocument.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 *DidDocument) XXX_Merge(src proto.Message) {
xxx_messageInfo_DidDocument.Merge(m, src)
}
func (m *DidDocument) XXX_Size() int {
return m.Size()
}
func (m *DidDocument) XXX_DiscardUnknown() {
xxx_messageInfo_DidDocument.DiscardUnknown(m)
}
var xxx_messageInfo_DidDocument proto.InternalMessageInfo
// A DID document can express verification methods,
// such as cryptographic public keys, which can be used
// to authenticate or authorize interactions
// with the DID subject or associated parties.
// https://www.w3.org/TR/did-core/#verification-methods
type VerificationMethod struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"`
// Types that are valid to be assigned to VerificationMaterial:
// *VerificationMethod_BlockchainAccountID
// *VerificationMethod_PublicKeyHex
// *VerificationMethod_PublicKeyMultibase
// *VerificationMethod_PublicKeyJwk
VerificationMaterial isVerificationMethod_VerificationMaterial `protobuf_oneof:"verificationMaterial"`
}
func (m *VerificationMethod) Reset() { *m = VerificationMethod{} }
func (m *VerificationMethod) String() string { return proto.CompactTextString(m) }
func (*VerificationMethod) ProtoMessage() {}
func (*VerificationMethod) Descriptor() ([]byte, []int) {
return fileDescriptor_e63f2c747195152a, []int{1}
}
func (m *VerificationMethod) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *VerificationMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_VerificationMethod.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 *VerificationMethod) XXX_Merge(src proto.Message) {
xxx_messageInfo_VerificationMethod.Merge(m, src)
}
func (m *VerificationMethod) XXX_Size() int {
return m.Size()
}
func (m *VerificationMethod) XXX_DiscardUnknown() {
xxx_messageInfo_VerificationMethod.DiscardUnknown(m)
}
var xxx_messageInfo_VerificationMethod proto.InternalMessageInfo
type isVerificationMethod_VerificationMaterial interface {
isVerificationMethod_VerificationMaterial()
Equal(interface{}) bool
MarshalTo([]byte) (int, error)
Size() int
}
type VerificationMethod_BlockchainAccountID struct {
BlockchainAccountID string `protobuf:"bytes,4,opt,name=blockchainAccountID,proto3,oneof" json:"blockchainAccountID,omitempty"`
}
type VerificationMethod_PublicKeyHex struct {
PublicKeyHex string `protobuf:"bytes,5,opt,name=publicKeyHex,proto3,oneof" json:"publicKeyHex,omitempty"`
}
type VerificationMethod_PublicKeyMultibase struct {
PublicKeyMultibase string `protobuf:"bytes,6,opt,name=publicKeyMultibase,proto3,oneof" json:"publicKeyMultibase,omitempty"`
}
type VerificationMethod_PublicKeyJwk struct {
PublicKeyJwk *PublicKeyJwk `protobuf:"bytes,7,opt,name=PublicKeyJwk,proto3,oneof" json:"PublicKeyJwk,omitempty"`
}
func (*VerificationMethod_BlockchainAccountID) isVerificationMethod_VerificationMaterial() {}
func (*VerificationMethod_PublicKeyHex) isVerificationMethod_VerificationMaterial() {}
func (*VerificationMethod_PublicKeyMultibase) isVerificationMethod_VerificationMaterial() {}
func (*VerificationMethod_PublicKeyJwk) isVerificationMethod_VerificationMaterial() {}
func (m *VerificationMethod) GetVerificationMaterial() isVerificationMethod_VerificationMaterial {
if m != nil {
return m.VerificationMaterial
}
return nil
}
func (m *VerificationMethod) GetBlockchainAccountID() string {
if x, ok := m.GetVerificationMaterial().(*VerificationMethod_BlockchainAccountID); ok {
return x.BlockchainAccountID
}
return ""
}
func (m *VerificationMethod) GetPublicKeyHex() string {
if x, ok := m.GetVerificationMaterial().(*VerificationMethod_PublicKeyHex); ok {
return x.PublicKeyHex
}
return ""
}
func (m *VerificationMethod) GetPublicKeyMultibase() string {
if x, ok := m.GetVerificationMaterial().(*VerificationMethod_PublicKeyMultibase); ok {
return x.PublicKeyMultibase
}
return ""
}
func (m *VerificationMethod) GetPublicKeyJwk() *PublicKeyJwk {
if x, ok := m.GetVerificationMaterial().(*VerificationMethod_PublicKeyJwk); ok {
return x.PublicKeyJwk
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*VerificationMethod) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*VerificationMethod_BlockchainAccountID)(nil),
(*VerificationMethod_PublicKeyHex)(nil),
(*VerificationMethod_PublicKeyMultibase)(nil),
(*VerificationMethod_PublicKeyJwk)(nil),
}
}
// The service property is OPTIONAL. If present, the associated value MUST be a
// set of services, where each service is described by a map. Each service
// map MUST contain id, type, and serviceEndpoint properties. Each service
// extension MAY include additional properties and MAY further
// restrict the properties associated with the extension.
// https://www.w3.org/TR/did-core/#services
type Service struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
ServiceEndpoint string `protobuf:"bytes,3,opt,name=serviceEndpoint,proto3" json:"serviceEndpoint,omitempty"`
}
func (m *Service) Reset() { *m = Service{} }
func (m *Service) String() string { return proto.CompactTextString(m) }
func (*Service) ProtoMessage() {}
func (*Service) Descriptor() ([]byte, []int) {
return fileDescriptor_e63f2c747195152a, []int{2}
}
func (m *Service) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Service.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 *Service) XXX_Merge(src proto.Message) {
xxx_messageInfo_Service.Merge(m, src)
}
func (m *Service) XXX_Size() int {
return m.Size()
}
func (m *Service) XXX_DiscardUnknown() {
xxx_messageInfo_Service.DiscardUnknown(m)
}
var xxx_messageInfo_Service proto.InternalMessageInfo
// PublicKeyJwk is a type of verification material, the implementation
// support is limited to elliptic curve public keys
// see https://www.w3.org/TR/did-core/#dfn-publickeyjwk
// see https://datatracker.ietf.org/doc/html/rfc7517
type PublicKeyJwk struct {
Kid string `protobuf:"bytes,1,opt,name=Kid,proto3" json:"Kid,omitempty"`
Crv string `protobuf:"bytes,2,opt,name=Crv,proto3" json:"Crv,omitempty"`
X string `protobuf:"bytes,3,opt,name=X,proto3" json:"X,omitempty"`
Y string `protobuf:"bytes,4,opt,name=Y,proto3" json:"Y,omitempty"`
Kty string `protobuf:"bytes,5,opt,name=Kty,proto3" json:"Kty,omitempty"`
}
func (m *PublicKeyJwk) Reset() { *m = PublicKeyJwk{} }
func (m *PublicKeyJwk) String() string { return proto.CompactTextString(m) }
func (*PublicKeyJwk) ProtoMessage() {}
func (*PublicKeyJwk) Descriptor() ([]byte, []int) {
return fileDescriptor_e63f2c747195152a, []int{3}
}
func (m *PublicKeyJwk) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PublicKeyJwk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PublicKeyJwk.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 *PublicKeyJwk) XXX_Merge(src proto.Message) {
xxx_messageInfo_PublicKeyJwk.Merge(m, src)
}
func (m *PublicKeyJwk) XXX_Size() int {
return m.Size()
}
func (m *PublicKeyJwk) XXX_DiscardUnknown() {
xxx_messageInfo_PublicKeyJwk.DiscardUnknown(m)
}
var xxx_messageInfo_PublicKeyJwk proto.InternalMessageInfo
func init() {
proto.RegisterType((*DidDocument)(nil), "elestodao.elesto.did.v1.DidDocument")
proto.RegisterType((*VerificationMethod)(nil), "elestodao.elesto.did.v1.VerificationMethod")
proto.RegisterType((*Service)(nil), "elestodao.elesto.did.v1.Service")
proto.RegisterType((*PublicKeyJwk)(nil), "elestodao.elesto.did.v1.PublicKeyJwk")
}
func init() { proto.RegisterFile("did/v1/did.proto", fileDescriptor_e63f2c747195152a) }
var fileDescriptor_e63f2c747195152a = []byte{
// 606 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xc1, 0x4e, 0xdb, 0x40,
0x10, 0xcd, 0x26, 0x40, 0x60, 0x88, 0x00, 0x6d, 0x11, 0xb5, 0x38, 0x38, 0x51, 0x54, 0xaa, 0x48,
0x6d, 0x63, 0x48, 0x6f, 0x5c, 0x5a, 0x68, 0x2a, 0x41, 0x11, 0x52, 0xe5, 0x4a, 0x15, 0xb4, 0xa7,
0xb5, 0x3d, 0x38, 0x5b, 0x1c, 0xaf, 0xe5, 0xac, 0x5d, 0xfc, 0x07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 0x02, 0xc9, 0x1d, 0x36,
0x42, 0x63, 0x4e, 0x73, 0xa7, 0xd4, 0xe8, 0x01, 0x34, 0xde, 0x5e, 0xa3, 0x6f, 0x3e, 0x9f, 0x1a,
0xf5, 0x16, 0xe9, 0x2c, 0xf6, 0x36, 0xee, 0xbd, 0x87, 0x32, 0x59, 0xad, 0x2f, 0xe7, 0xb7, 0xea,
0xed, 0xae, 0xc1, 0xea, 0xd8, 0xdd, 0x31, 0x89, 0x31, 0x67, 0x41, 0x9b, 0x41, 0x5d, 0x5f, 0xd4,
0x7f, 0x29, 0xd9, 0x81, 0x65, 0x7d, 0x77, 0xaf, 0x43, 0x2f, 0x12, 0x3c, 0x94, 0x5a, 0xce, 0x49,
0xb8, 0x64, 0xdc, 0xa7, 0xf1, 0x17, 0xd1, 0x15, 0xa8, 0x1d, 0xdc, 0x2c, 0x52, 0xa1, 0x42, 0x5e,
0xc5, 0xa9, 0x5e, 0xa4, 0x42, 0xda, 0x00, 0x72, 0xa4, 0x27, 0x93, 0x23, 0x95, 0x1d, 0x17, 0x6e,
0xd8, 0xe4, 0x38, 0xef, 0x97, 0x59, 0x21, 0xb8, 0xad, 0xc2, 0xd2, 0x33, 0x5f, 0x7c, 0xbb, 0x34,
0xc9, 0xc5, 0xa5, 0x49, 0x7e, 0x5d, 0x9a, 0xe4, 0xeb, 0x95, 0x59, 0xb9, 0xb8, 0x32, 0x2b, 0x3f,
0xae, 0xcc, 0xca, 0x87, 0x0d, 0x9f, 0xcb, 0x41, 0xe2, 0x74, 0x5d, 0x31, 0xb4, 0x0a, 0x05, 0x9f,
0x79, 0x4c, 0xe8, 0xd0, 0x4a, 0x7b, 0xd6, 0x99, 0xfa, 0x5d, 0x39, 0x73, 0xf9, 0xff, 0xe5, 0xf9,
0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x53, 0xd4, 0xbe, 0xef, 0xc3, 0x04, 0x00, 0x00,
}
func (this *DidDocument) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*DidDocument)
if !ok {
that2, ok := that.(DidDocument)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if len(this.Context) != len(that1.Context) {
return false
}
for i := range this.Context {
if this.Context[i] != that1.Context[i] {
return false
}
}
if this.Id != that1.Id {
return false
}
if len(this.Controller) != len(that1.Controller) {
return false
}
for i := range this.Controller {
if this.Controller[i] != that1.Controller[i] {
return false
}
}
if len(this.VerificationMethod) != len(that1.VerificationMethod) {
return false
}
for i := range this.VerificationMethod {
if !this.VerificationMethod[i].Equal(that1.VerificationMethod[i]) {
return false
}
}
if len(this.Service) != len(that1.Service) {
return false
}
for i := range this.Service {
if !this.Service[i].Equal(that1.Service[i]) {
return false
}
}
if len(this.Authentication) != len(that1.Authentication) {
return false
}
for i := range this.Authentication {
if this.Authentication[i] != that1.Authentication[i] {
return false
}
}
if len(this.AssertionMethod) != len(that1.AssertionMethod) {
return false
}
for i := range this.AssertionMethod {
if this.AssertionMethod[i] != that1.AssertionMethod[i] {
return false
}
}
if len(this.KeyAgreement) != len(that1.KeyAgreement) {
return false
}
for i := range this.KeyAgreement {
if this.KeyAgreement[i] != that1.KeyAgreement[i] {
return false
}
}
if len(this.CapabilityInvocation) != len(that1.CapabilityInvocation) {
return false
}
for i := range this.CapabilityInvocation {
if this.CapabilityInvocation[i] != that1.CapabilityInvocation[i] {
return false
}
}
if len(this.CapabilityDelegation) != len(that1.CapabilityDelegation) {
return false
}
for i := range this.CapabilityDelegation {
if this.CapabilityDelegation[i] != that1.CapabilityDelegation[i] {
return false
}
}
return true
}
func (this *VerificationMethod) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*VerificationMethod)
if !ok {
that2, ok := that.(VerificationMethod)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Id != that1.Id {
return false
}
if this.Type != that1.Type {
return false
}
if this.Controller != that1.Controller {
return false
}
if that1.VerificationMaterial == nil {
if this.VerificationMaterial != nil {
return false
}
} else if this.VerificationMaterial == nil {
return false
} else if !this.VerificationMaterial.Equal(that1.VerificationMaterial) {
return false
}
return true
}
func (this *VerificationMethod_BlockchainAccountID) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*VerificationMethod_BlockchainAccountID)
if !ok {
that2, ok := that.(VerificationMethod_BlockchainAccountID)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.BlockchainAccountID != that1.BlockchainAccountID {
return false
}
return true
}
func (this *VerificationMethod_PublicKeyHex) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*VerificationMethod_PublicKeyHex)
if !ok {
that2, ok := that.(VerificationMethod_PublicKeyHex)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.PublicKeyHex != that1.PublicKeyHex {
return false
}
return true
}
func (this *VerificationMethod_PublicKeyMultibase) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*VerificationMethod_PublicKeyMultibase)
if !ok {
that2, ok := that.(VerificationMethod_PublicKeyMultibase)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.PublicKeyMultibase != that1.PublicKeyMultibase {
return false
}
return true
}
func (this *VerificationMethod_PublicKeyJwk) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*VerificationMethod_PublicKeyJwk)
if !ok {
that2, ok := that.(VerificationMethod_PublicKeyJwk)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if !this.PublicKeyJwk.Equal(that1.PublicKeyJwk) {
return false
}
return true
}
func (this *Service) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Service)
if !ok {
that2, ok := that.(Service)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Id != that1.Id {
return false
}
if this.Type != that1.Type {
return false
}
if this.ServiceEndpoint != that1.ServiceEndpoint {
return false
}
return true
}
func (this *PublicKeyJwk) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*PublicKeyJwk)
if !ok {
that2, ok := that.(PublicKeyJwk)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Kid != that1.Kid {
return false
}
if this.Crv != that1.Crv {
return false
}
if this.X != that1.X {
return false
}
if this.Y != that1.Y {
return false
}
if this.Kty != that1.Kty {
return false
}
return true
}
func (m *DidDocument) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *DidDocument) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *DidDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.CapabilityDelegation) > 0 {
for iNdEx := len(m.CapabilityDelegation) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.CapabilityDelegation[iNdEx])
copy(dAtA[i:], m.CapabilityDelegation[iNdEx])
i = encodeVarintDid(dAtA, i, uint64(len(m.CapabilityDelegation[iNdEx])))
i--
dAtA[i] = 0x52
}
}
if len(m.CapabilityInvocation) > 0 {
for iNdEx := len(m.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.CapabilityInvocation[iNdEx])
copy(dAtA[i:], m.CapabilityInvocation[iNdEx])
i = encodeVarintDid(dAtA, i, uint64(len(m.CapabilityInvocation[iNdEx])))
i--
dAtA[i] = 0x4a
}
}
if len(m.KeyAgreement) > 0 {
for iNdEx := len(m.KeyAgreement) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.KeyAgreement[iNdEx])
copy(dAtA[i:], m.KeyAgreement[iNdEx])
i = encodeVarintDid(dAtA, i, uint64(len(m.KeyAgreement[iNdEx])))
i--
dAtA[i] = 0x42
}
}
if len(m.AssertionMethod) > 0 {
for iNdEx := len(m.AssertionMethod) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.AssertionMethod[iNdEx])
copy(dAtA[i:], m.AssertionMethod[iNdEx])
i = encodeVarintDid(dAtA, i, uint64(len(m.AssertionMethod[iNdEx])))
i--
dAtA[i] = 0x3a
}
}
if len(m.Authentication) > 0 {
for iNdEx := len(m.Authentication) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Authentication[iNdEx])
copy(dAtA[i:], m.Authentication[iNdEx])
i = encodeVarintDid(dAtA, i, uint64(len(m.Authentication[iNdEx])))
i--
dAtA[i] = 0x32
}
}
if len(m.Service) > 0 {
for iNdEx := len(m.Service) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Service[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintDid(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x2a
}
}
if len(m.VerificationMethod) > 0 {
for iNdEx := len(m.VerificationMethod) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.VerificationMethod[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintDid(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
}
}
if len(m.Controller) > 0 {
for iNdEx := len(m.Controller) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Controller[iNdEx])
copy(dAtA[i:], m.Controller[iNdEx])
i = encodeVarintDid(dAtA, i, uint64(len(m.Controller[iNdEx])))
i--
dAtA[i] = 0x1a
}
}
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = encodeVarintDid(dAtA, i, uint64(len(m.Id)))
i--
dAtA[i] = 0x12
}
if len(m.Context) > 0 {
for iNdEx := len(m.Context) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Context[iNdEx])
copy(dAtA[i:], m.Context[iNdEx])
i = encodeVarintDid(dAtA, i, uint64(len(m.Context[iNdEx])))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *VerificationMethod) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *VerificationMethod) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.VerificationMaterial != nil {
{
size := m.VerificationMaterial.Size()
i -= size
if _, err := m.VerificationMaterial.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
if len(m.Controller) > 0 {
i -= len(m.Controller)
copy(dAtA[i:], m.Controller)
i = encodeVarintDid(dAtA, i, uint64(len(m.Controller)))
i--
dAtA[i] = 0x1a
}
if len(m.Type) > 0 {
i -= len(m.Type)
copy(dAtA[i:], m.Type)
i = encodeVarintDid(dAtA, i, uint64(len(m.Type)))
i--
dAtA[i] = 0x12
}
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = encodeVarintDid(dAtA, i, uint64(len(m.Id)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *VerificationMethod_BlockchainAccountID) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *VerificationMethod_BlockchainAccountID) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i -= len(m.BlockchainAccountID)
copy(dAtA[i:], m.BlockchainAccountID)
i = encodeVarintDid(dAtA, i, uint64(len(m.BlockchainAccountID)))
i--
dAtA[i] = 0x22
return len(dAtA) - i, nil
}
func (m *VerificationMethod_PublicKeyHex) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *VerificationMethod_PublicKeyHex) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i -= len(m.PublicKeyHex)
copy(dAtA[i:], m.PublicKeyHex)
i = encodeVarintDid(dAtA, i, uint64(len(m.PublicKeyHex)))
i--
dAtA[i] = 0x2a
return len(dAtA) - i, nil
}
func (m *VerificationMethod_PublicKeyMultibase) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *VerificationMethod_PublicKeyMultibase) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i -= len(m.PublicKeyMultibase)
copy(dAtA[i:], m.PublicKeyMultibase)
i = encodeVarintDid(dAtA, i, uint64(len(m.PublicKeyMultibase)))
i--
dAtA[i] = 0x32
return len(dAtA) - i, nil
}
func (m *VerificationMethod_PublicKeyJwk) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *VerificationMethod_PublicKeyJwk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
if m.PublicKeyJwk != nil {
{
size, err := m.PublicKeyJwk.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintDid(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x3a
}
return len(dAtA) - i, nil
}
func (m *Service) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Service) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.ServiceEndpoint) > 0 {
i -= len(m.ServiceEndpoint)
copy(dAtA[i:], m.ServiceEndpoint)
i = encodeVarintDid(dAtA, i, uint64(len(m.ServiceEndpoint)))
i--
dAtA[i] = 0x1a
}
if len(m.Type) > 0 {
i -= len(m.Type)
copy(dAtA[i:], m.Type)
i = encodeVarintDid(dAtA, i, uint64(len(m.Type)))
i--
dAtA[i] = 0x12
}
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = encodeVarintDid(dAtA, i, uint64(len(m.Id)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *PublicKeyJwk) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *PublicKeyJwk) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PublicKeyJwk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Kty) > 0 {
i -= len(m.Kty)
copy(dAtA[i:], m.Kty)
i = encodeVarintDid(dAtA, i, uint64(len(m.Kty)))
i--
dAtA[i] = 0x2a
}
if len(m.Y) > 0 {
i -= len(m.Y)
copy(dAtA[i:], m.Y)
i = encodeVarintDid(dAtA, i, uint64(len(m.Y)))
i--
dAtA[i] = 0x22
}
if len(m.X) > 0 {
i -= len(m.X)
copy(dAtA[i:], m.X)
i = encodeVarintDid(dAtA, i, uint64(len(m.X)))
i--
dAtA[i] = 0x1a
}
if len(m.Crv) > 0 {
i -= len(m.Crv)
copy(dAtA[i:], m.Crv)
i = encodeVarintDid(dAtA, i, uint64(len(m.Crv)))
i--
dAtA[i] = 0x12
}
if len(m.Kid) > 0 {
i -= len(m.Kid)
copy(dAtA[i:], m.Kid)
i = encodeVarintDid(dAtA, i, uint64(len(m.Kid)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintDid(dAtA []byte, offset int, v uint64) int {
offset -= sovDid(v)
base := offset
for v >= 1<<7 {