forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsigner.pb.go
1153 lines (1040 loc) · 42.8 KB
/
signer.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-go. DO NOT EDIT.
// source: signrpc/signer.proto
package signrpc
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// 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.ProtoPackageIsVersion3 // please upgrade the proto package
type KeyLocator struct {
// The family of key being identified.
KeyFamily int32 `protobuf:"varint,1,opt,name=key_family,json=keyFamily,proto3" json:"key_family,omitempty"`
// The precise index of the key being identified.
KeyIndex int32 `protobuf:"varint,2,opt,name=key_index,json=keyIndex,proto3" json:"key_index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *KeyLocator) Reset() { *m = KeyLocator{} }
func (m *KeyLocator) String() string { return proto.CompactTextString(m) }
func (*KeyLocator) ProtoMessage() {}
func (*KeyLocator) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{0}
}
func (m *KeyLocator) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KeyLocator.Unmarshal(m, b)
}
func (m *KeyLocator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_KeyLocator.Marshal(b, m, deterministic)
}
func (m *KeyLocator) XXX_Merge(src proto.Message) {
xxx_messageInfo_KeyLocator.Merge(m, src)
}
func (m *KeyLocator) XXX_Size() int {
return xxx_messageInfo_KeyLocator.Size(m)
}
func (m *KeyLocator) XXX_DiscardUnknown() {
xxx_messageInfo_KeyLocator.DiscardUnknown(m)
}
var xxx_messageInfo_KeyLocator proto.InternalMessageInfo
func (m *KeyLocator) GetKeyFamily() int32 {
if m != nil {
return m.KeyFamily
}
return 0
}
func (m *KeyLocator) GetKeyIndex() int32 {
if m != nil {
return m.KeyIndex
}
return 0
}
type KeyDescriptor struct {
//
//The raw bytes of the key being identified. Either this or the KeyLocator
//must be specified.
RawKeyBytes []byte `protobuf:"bytes,1,opt,name=raw_key_bytes,json=rawKeyBytes,proto3" json:"raw_key_bytes,omitempty"`
//
//The key locator that identifies which key to use for signing. Either this
//or the raw bytes of the target key must be specified.
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *KeyDescriptor) Reset() { *m = KeyDescriptor{} }
func (m *KeyDescriptor) String() string { return proto.CompactTextString(m) }
func (*KeyDescriptor) ProtoMessage() {}
func (*KeyDescriptor) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{1}
}
func (m *KeyDescriptor) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KeyDescriptor.Unmarshal(m, b)
}
func (m *KeyDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_KeyDescriptor.Marshal(b, m, deterministic)
}
func (m *KeyDescriptor) XXX_Merge(src proto.Message) {
xxx_messageInfo_KeyDescriptor.Merge(m, src)
}
func (m *KeyDescriptor) XXX_Size() int {
return xxx_messageInfo_KeyDescriptor.Size(m)
}
func (m *KeyDescriptor) XXX_DiscardUnknown() {
xxx_messageInfo_KeyDescriptor.DiscardUnknown(m)
}
var xxx_messageInfo_KeyDescriptor proto.InternalMessageInfo
func (m *KeyDescriptor) GetRawKeyBytes() []byte {
if m != nil {
return m.RawKeyBytes
}
return nil
}
func (m *KeyDescriptor) GetKeyLoc() *KeyLocator {
if m != nil {
return m.KeyLoc
}
return nil
}
type TxOut struct {
// The value of the output being spent.
Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
// The script of the output being spent.
PkScript []byte `protobuf:"bytes,2,opt,name=pk_script,json=pkScript,proto3" json:"pk_script,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TxOut) Reset() { *m = TxOut{} }
func (m *TxOut) String() string { return proto.CompactTextString(m) }
func (*TxOut) ProtoMessage() {}
func (*TxOut) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{2}
}
func (m *TxOut) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TxOut.Unmarshal(m, b)
}
func (m *TxOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TxOut.Marshal(b, m, deterministic)
}
func (m *TxOut) XXX_Merge(src proto.Message) {
xxx_messageInfo_TxOut.Merge(m, src)
}
func (m *TxOut) XXX_Size() int {
return xxx_messageInfo_TxOut.Size(m)
}
func (m *TxOut) XXX_DiscardUnknown() {
xxx_messageInfo_TxOut.DiscardUnknown(m)
}
var xxx_messageInfo_TxOut proto.InternalMessageInfo
func (m *TxOut) GetValue() int64 {
if m != nil {
return m.Value
}
return 0
}
func (m *TxOut) GetPkScript() []byte {
if m != nil {
return m.PkScript
}
return nil
}
type SignDescriptor struct {
//
//A descriptor that precisely describes *which* key to use for signing. This
//may provide the raw public key directly, or require the Signer to re-derive
//the key according to the populated derivation path.
//
//Note that if the key descriptor was obtained through walletrpc.DeriveKey,
//then the key locator MUST always be provided, since the derived keys are not
//persisted unlike with DeriveNextKey.
KeyDesc *KeyDescriptor `protobuf:"bytes,1,opt,name=key_desc,json=keyDesc,proto3" json:"key_desc,omitempty"`
//
//A scalar value that will be added to the private key corresponding to the
//above public key to obtain the private key to be used to sign this input.
//This value is typically derived via the following computation:
//
// derivedKey = privkey + sha256(perCommitmentPoint || pubKey) mod N
SingleTweak []byte `protobuf:"bytes,2,opt,name=single_tweak,json=singleTweak,proto3" json:"single_tweak,omitempty"`
//
//A private key that will be used in combination with its corresponding
//private key to derive the private key that is to be used to sign the target
//input. Within the Lightning protocol, this value is typically the
//commitment secret from a previously revoked commitment transaction. This
//value is in combination with two hash values, and the original private key
//to derive the private key to be used when signing.
//
// k = (privKey*sha256(pubKey || tweakPub) +
//tweakPriv*sha256(tweakPub || pubKey)) mod N
DoubleTweak []byte `protobuf:"bytes,3,opt,name=double_tweak,json=doubleTweak,proto3" json:"double_tweak,omitempty"`
//
//The full script required to properly redeem the output. This field will
//only be populated if a p2wsh or a p2sh output is being signed.
WitnessScript []byte `protobuf:"bytes,4,opt,name=witness_script,json=witnessScript,proto3" json:"witness_script,omitempty"`
//
//A description of the output being spent. The value and script MUST be
//provided.
Output *TxOut `protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"`
//
//The target sighash type that should be used when generating the final
//sighash, and signature.
Sighash uint32 `protobuf:"varint,7,opt,name=sighash,proto3" json:"sighash,omitempty"`
//
//The target input within the transaction that should be signed.
InputIndex int32 `protobuf:"varint,8,opt,name=input_index,json=inputIndex,proto3" json:"input_index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SignDescriptor) Reset() { *m = SignDescriptor{} }
func (m *SignDescriptor) String() string { return proto.CompactTextString(m) }
func (*SignDescriptor) ProtoMessage() {}
func (*SignDescriptor) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{3}
}
func (m *SignDescriptor) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignDescriptor.Unmarshal(m, b)
}
func (m *SignDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignDescriptor.Marshal(b, m, deterministic)
}
func (m *SignDescriptor) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignDescriptor.Merge(m, src)
}
func (m *SignDescriptor) XXX_Size() int {
return xxx_messageInfo_SignDescriptor.Size(m)
}
func (m *SignDescriptor) XXX_DiscardUnknown() {
xxx_messageInfo_SignDescriptor.DiscardUnknown(m)
}
var xxx_messageInfo_SignDescriptor proto.InternalMessageInfo
func (m *SignDescriptor) GetKeyDesc() *KeyDescriptor {
if m != nil {
return m.KeyDesc
}
return nil
}
func (m *SignDescriptor) GetSingleTweak() []byte {
if m != nil {
return m.SingleTweak
}
return nil
}
func (m *SignDescriptor) GetDoubleTweak() []byte {
if m != nil {
return m.DoubleTweak
}
return nil
}
func (m *SignDescriptor) GetWitnessScript() []byte {
if m != nil {
return m.WitnessScript
}
return nil
}
func (m *SignDescriptor) GetOutput() *TxOut {
if m != nil {
return m.Output
}
return nil
}
func (m *SignDescriptor) GetSighash() uint32 {
if m != nil {
return m.Sighash
}
return 0
}
func (m *SignDescriptor) GetInputIndex() int32 {
if m != nil {
return m.InputIndex
}
return 0
}
type SignReq struct {
// The raw bytes of the transaction to be signed.
RawTxBytes []byte `protobuf:"bytes,1,opt,name=raw_tx_bytes,json=rawTxBytes,proto3" json:"raw_tx_bytes,omitempty"`
// A set of sign descriptors, for each input to be signed.
SignDescs []*SignDescriptor `protobuf:"bytes,2,rep,name=sign_descs,json=signDescs,proto3" json:"sign_descs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SignReq) Reset() { *m = SignReq{} }
func (m *SignReq) String() string { return proto.CompactTextString(m) }
func (*SignReq) ProtoMessage() {}
func (*SignReq) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{4}
}
func (m *SignReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignReq.Unmarshal(m, b)
}
func (m *SignReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignReq.Marshal(b, m, deterministic)
}
func (m *SignReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignReq.Merge(m, src)
}
func (m *SignReq) XXX_Size() int {
return xxx_messageInfo_SignReq.Size(m)
}
func (m *SignReq) XXX_DiscardUnknown() {
xxx_messageInfo_SignReq.DiscardUnknown(m)
}
var xxx_messageInfo_SignReq proto.InternalMessageInfo
func (m *SignReq) GetRawTxBytes() []byte {
if m != nil {
return m.RawTxBytes
}
return nil
}
func (m *SignReq) GetSignDescs() []*SignDescriptor {
if m != nil {
return m.SignDescs
}
return nil
}
type SignResp struct {
//
//A set of signatures realized in a fixed 64-byte format ordered in ascending
//input order.
RawSigs [][]byte `protobuf:"bytes,1,rep,name=raw_sigs,json=rawSigs,proto3" json:"raw_sigs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SignResp) Reset() { *m = SignResp{} }
func (m *SignResp) String() string { return proto.CompactTextString(m) }
func (*SignResp) ProtoMessage() {}
func (*SignResp) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{5}
}
func (m *SignResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignResp.Unmarshal(m, b)
}
func (m *SignResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignResp.Marshal(b, m, deterministic)
}
func (m *SignResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignResp.Merge(m, src)
}
func (m *SignResp) XXX_Size() int {
return xxx_messageInfo_SignResp.Size(m)
}
func (m *SignResp) XXX_DiscardUnknown() {
xxx_messageInfo_SignResp.DiscardUnknown(m)
}
var xxx_messageInfo_SignResp proto.InternalMessageInfo
func (m *SignResp) GetRawSigs() [][]byte {
if m != nil {
return m.RawSigs
}
return nil
}
type InputScript struct {
// The serializes witness stack for the specified input.
Witness [][]byte `protobuf:"bytes,1,rep,name=witness,proto3" json:"witness,omitempty"`
//
//The optional sig script for the specified witness that will only be set if
//the input specified is a nested p2sh witness program.
SigScript []byte `protobuf:"bytes,2,opt,name=sig_script,json=sigScript,proto3" json:"sig_script,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InputScript) Reset() { *m = InputScript{} }
func (m *InputScript) String() string { return proto.CompactTextString(m) }
func (*InputScript) ProtoMessage() {}
func (*InputScript) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{6}
}
func (m *InputScript) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InputScript.Unmarshal(m, b)
}
func (m *InputScript) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InputScript.Marshal(b, m, deterministic)
}
func (m *InputScript) XXX_Merge(src proto.Message) {
xxx_messageInfo_InputScript.Merge(m, src)
}
func (m *InputScript) XXX_Size() int {
return xxx_messageInfo_InputScript.Size(m)
}
func (m *InputScript) XXX_DiscardUnknown() {
xxx_messageInfo_InputScript.DiscardUnknown(m)
}
var xxx_messageInfo_InputScript proto.InternalMessageInfo
func (m *InputScript) GetWitness() [][]byte {
if m != nil {
return m.Witness
}
return nil
}
func (m *InputScript) GetSigScript() []byte {
if m != nil {
return m.SigScript
}
return nil
}
type InputScriptResp struct {
// The set of fully valid input scripts requested.
InputScripts []*InputScript `protobuf:"bytes,1,rep,name=input_scripts,json=inputScripts,proto3" json:"input_scripts,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InputScriptResp) Reset() { *m = InputScriptResp{} }
func (m *InputScriptResp) String() string { return proto.CompactTextString(m) }
func (*InputScriptResp) ProtoMessage() {}
func (*InputScriptResp) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{7}
}
func (m *InputScriptResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InputScriptResp.Unmarshal(m, b)
}
func (m *InputScriptResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InputScriptResp.Marshal(b, m, deterministic)
}
func (m *InputScriptResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_InputScriptResp.Merge(m, src)
}
func (m *InputScriptResp) XXX_Size() int {
return xxx_messageInfo_InputScriptResp.Size(m)
}
func (m *InputScriptResp) XXX_DiscardUnknown() {
xxx_messageInfo_InputScriptResp.DiscardUnknown(m)
}
var xxx_messageInfo_InputScriptResp proto.InternalMessageInfo
func (m *InputScriptResp) GetInputScripts() []*InputScript {
if m != nil {
return m.InputScripts
}
return nil
}
type SignMessageReq struct {
// The message to be signed.
Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
// The key locator that identifies which key to use for signing.
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SignMessageReq) Reset() { *m = SignMessageReq{} }
func (m *SignMessageReq) String() string { return proto.CompactTextString(m) }
func (*SignMessageReq) ProtoMessage() {}
func (*SignMessageReq) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{8}
}
func (m *SignMessageReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignMessageReq.Unmarshal(m, b)
}
func (m *SignMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignMessageReq.Marshal(b, m, deterministic)
}
func (m *SignMessageReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignMessageReq.Merge(m, src)
}
func (m *SignMessageReq) XXX_Size() int {
return xxx_messageInfo_SignMessageReq.Size(m)
}
func (m *SignMessageReq) XXX_DiscardUnknown() {
xxx_messageInfo_SignMessageReq.DiscardUnknown(m)
}
var xxx_messageInfo_SignMessageReq proto.InternalMessageInfo
func (m *SignMessageReq) GetMsg() []byte {
if m != nil {
return m.Msg
}
return nil
}
func (m *SignMessageReq) GetKeyLoc() *KeyLocator {
if m != nil {
return m.KeyLoc
}
return nil
}
type SignMessageResp struct {
//
//The signature for the given message in the fixed-size LN wire format.
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SignMessageResp) Reset() { *m = SignMessageResp{} }
func (m *SignMessageResp) String() string { return proto.CompactTextString(m) }
func (*SignMessageResp) ProtoMessage() {}
func (*SignMessageResp) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{9}
}
func (m *SignMessageResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignMessageResp.Unmarshal(m, b)
}
func (m *SignMessageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignMessageResp.Marshal(b, m, deterministic)
}
func (m *SignMessageResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignMessageResp.Merge(m, src)
}
func (m *SignMessageResp) XXX_Size() int {
return xxx_messageInfo_SignMessageResp.Size(m)
}
func (m *SignMessageResp) XXX_DiscardUnknown() {
xxx_messageInfo_SignMessageResp.DiscardUnknown(m)
}
var xxx_messageInfo_SignMessageResp proto.InternalMessageInfo
func (m *SignMessageResp) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
type VerifyMessageReq struct {
// The message over which the signature is to be verified.
Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
//
//The fixed-size LN wire encoded signature to be verified over the given
//message.
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
// The public key the signature has to be valid for.
Pubkey []byte `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VerifyMessageReq) Reset() { *m = VerifyMessageReq{} }
func (m *VerifyMessageReq) String() string { return proto.CompactTextString(m) }
func (*VerifyMessageReq) ProtoMessage() {}
func (*VerifyMessageReq) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{10}
}
func (m *VerifyMessageReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VerifyMessageReq.Unmarshal(m, b)
}
func (m *VerifyMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VerifyMessageReq.Marshal(b, m, deterministic)
}
func (m *VerifyMessageReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_VerifyMessageReq.Merge(m, src)
}
func (m *VerifyMessageReq) XXX_Size() int {
return xxx_messageInfo_VerifyMessageReq.Size(m)
}
func (m *VerifyMessageReq) XXX_DiscardUnknown() {
xxx_messageInfo_VerifyMessageReq.DiscardUnknown(m)
}
var xxx_messageInfo_VerifyMessageReq proto.InternalMessageInfo
func (m *VerifyMessageReq) GetMsg() []byte {
if m != nil {
return m.Msg
}
return nil
}
func (m *VerifyMessageReq) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
func (m *VerifyMessageReq) GetPubkey() []byte {
if m != nil {
return m.Pubkey
}
return nil
}
type VerifyMessageResp struct {
// Whether the signature was valid over the given message.
Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VerifyMessageResp) Reset() { *m = VerifyMessageResp{} }
func (m *VerifyMessageResp) String() string { return proto.CompactTextString(m) }
func (*VerifyMessageResp) ProtoMessage() {}
func (*VerifyMessageResp) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{11}
}
func (m *VerifyMessageResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VerifyMessageResp.Unmarshal(m, b)
}
func (m *VerifyMessageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VerifyMessageResp.Marshal(b, m, deterministic)
}
func (m *VerifyMessageResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_VerifyMessageResp.Merge(m, src)
}
func (m *VerifyMessageResp) XXX_Size() int {
return xxx_messageInfo_VerifyMessageResp.Size(m)
}
func (m *VerifyMessageResp) XXX_DiscardUnknown() {
xxx_messageInfo_VerifyMessageResp.DiscardUnknown(m)
}
var xxx_messageInfo_VerifyMessageResp proto.InternalMessageInfo
func (m *VerifyMessageResp) GetValid() bool {
if m != nil {
return m.Valid
}
return false
}
type SharedKeyRequest struct {
// The ephemeral public key to use for the DH key derivation.
EphemeralPubkey []byte `protobuf:"bytes,1,opt,name=ephemeral_pubkey,json=ephemeralPubkey,proto3" json:"ephemeral_pubkey,omitempty"`
//
//Deprecated. The optional key locator of the local key that should be used.
//If this parameter is not set then the node's identity private key will be
//used.
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"` // Deprecated: Do not use.
//
//A key descriptor describes the key used for performing ECDH. Either a key
//locator or a raw public key is expected, if neither is supplied, defaults to
//the node's identity private key.
KeyDesc *KeyDescriptor `protobuf:"bytes,3,opt,name=key_desc,json=keyDesc,proto3" json:"key_desc,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SharedKeyRequest) Reset() { *m = SharedKeyRequest{} }
func (m *SharedKeyRequest) String() string { return proto.CompactTextString(m) }
func (*SharedKeyRequest) ProtoMessage() {}
func (*SharedKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{12}
}
func (m *SharedKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SharedKeyRequest.Unmarshal(m, b)
}
func (m *SharedKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SharedKeyRequest.Marshal(b, m, deterministic)
}
func (m *SharedKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SharedKeyRequest.Merge(m, src)
}
func (m *SharedKeyRequest) XXX_Size() int {
return xxx_messageInfo_SharedKeyRequest.Size(m)
}
func (m *SharedKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SharedKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SharedKeyRequest proto.InternalMessageInfo
func (m *SharedKeyRequest) GetEphemeralPubkey() []byte {
if m != nil {
return m.EphemeralPubkey
}
return nil
}
// Deprecated: Do not use.
func (m *SharedKeyRequest) GetKeyLoc() *KeyLocator {
if m != nil {
return m.KeyLoc
}
return nil
}
func (m *SharedKeyRequest) GetKeyDesc() *KeyDescriptor {
if m != nil {
return m.KeyDesc
}
return nil
}
type SharedKeyResponse struct {
// The shared public key, hashed with sha256.
SharedKey []byte `protobuf:"bytes,1,opt,name=shared_key,json=sharedKey,proto3" json:"shared_key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SharedKeyResponse) Reset() { *m = SharedKeyResponse{} }
func (m *SharedKeyResponse) String() string { return proto.CompactTextString(m) }
func (*SharedKeyResponse) ProtoMessage() {}
func (*SharedKeyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4ecd772f6c7ffacf, []int{13}
}
func (m *SharedKeyResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SharedKeyResponse.Unmarshal(m, b)
}
func (m *SharedKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SharedKeyResponse.Marshal(b, m, deterministic)
}
func (m *SharedKeyResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_SharedKeyResponse.Merge(m, src)
}
func (m *SharedKeyResponse) XXX_Size() int {
return xxx_messageInfo_SharedKeyResponse.Size(m)
}
func (m *SharedKeyResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SharedKeyResponse.DiscardUnknown(m)
}
var xxx_messageInfo_SharedKeyResponse proto.InternalMessageInfo
func (m *SharedKeyResponse) GetSharedKey() []byte {
if m != nil {
return m.SharedKey
}
return nil
}
func init() {
proto.RegisterType((*KeyLocator)(nil), "signrpc.KeyLocator")
proto.RegisterType((*KeyDescriptor)(nil), "signrpc.KeyDescriptor")
proto.RegisterType((*TxOut)(nil), "signrpc.TxOut")
proto.RegisterType((*SignDescriptor)(nil), "signrpc.SignDescriptor")
proto.RegisterType((*SignReq)(nil), "signrpc.SignReq")
proto.RegisterType((*SignResp)(nil), "signrpc.SignResp")
proto.RegisterType((*InputScript)(nil), "signrpc.InputScript")
proto.RegisterType((*InputScriptResp)(nil), "signrpc.InputScriptResp")
proto.RegisterType((*SignMessageReq)(nil), "signrpc.SignMessageReq")
proto.RegisterType((*SignMessageResp)(nil), "signrpc.SignMessageResp")
proto.RegisterType((*VerifyMessageReq)(nil), "signrpc.VerifyMessageReq")
proto.RegisterType((*VerifyMessageResp)(nil), "signrpc.VerifyMessageResp")
proto.RegisterType((*SharedKeyRequest)(nil), "signrpc.SharedKeyRequest")
proto.RegisterType((*SharedKeyResponse)(nil), "signrpc.SharedKeyResponse")
}
func init() { proto.RegisterFile("signrpc/signer.proto", fileDescriptor_4ecd772f6c7ffacf) }
var fileDescriptor_4ecd772f6c7ffacf = []byte{
// 775 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xed, 0x8e, 0xdb, 0x44,
0x14, 0x55, 0x12, 0x36, 0xc9, 0x5e, 0x27, 0xbb, 0xd9, 0x61, 0x55, 0xdc, 0x05, 0xc4, 0x62, 0xa9,
0x68, 0x2b, 0x41, 0x02, 0x01, 0x21, 0xc1, 0x2f, 0xb4, 0x54, 0xab, 0x56, 0x29, 0x6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 0xb7, 0xb3, 0x77, 0xaa, 0x75, 0x41, 0x7b, 0x1f, 0x74, 0x41,
0xbd, 0x39, 0x5c, 0x34, 0x34, 0x0a, 0x96, 0x67, 0x02, 0xf5, 0xc2, 0x68, 0x30, 0x38, 0xc8, 0x3b,
0x15, 0xfb, 0xb6, 0xf9, 0x5f, 0x5d, 0xe8, 0x2f, 0xf5, 0xaf, 0x23, 0xf9, 0x01, 0xc6, 0xea, 0xe9,
0x95, 0xbe, 0x58, 0x7e, 0x58, 0x92, 0x49, 0x6b, 0xbf, 0x7d, 0x7c, 0xb8, 0xba, 0x38, 0x42, 0x04,
0x23, 0xbf, 0x00, 0xf9, 0x35, 0xdf, 0xb2, 0x42, 0x62, 0x73, 0x81, 0xdf, 0x3f, 0xea, 0xfe, 0xe3,
0xbe, 0x19, 0x06, 0xa7, 0xb1, 0x13, 0xa4, 0x7d, 0xab, 0x0e, 0xb1, 0x37, 0x18, 0x8e, 0x57, 0xe8,
0x0e, 0xc6, 0xad, 0x20, 0xc9, 0xe3, 0xba, 0xf5, 0x78, 0x79, 0xae, 0xae, 0xfe, 0xed, 0x95, 0x60,
0xe4, 0x39, 0x9c, 0x3f, 0x43, 0x4e, 0xdf, 0x61, 0x6d, 0x63, 0x83, 0xe9, 0x38, 0xfe, 0x06, 0xd3,
0x7b, 0xae, 0xdf, 0xce, 0xde, 0x7c, 0x13, 0x53, 0xb9, 0x29, 0x56, 0xd3, 0x28, 0xdf, 0xce, 0x52,
0x1a, 0x6f, 0x64, 0x46, 0xb3, 0x38, 0x43, 0x59, 0xe6, 0x3c, 0x99, 0xa5, 0xd9, 0x7a, 0x96, 0xd6,
0x5f, 0x26, 0xce, 0xa2, 0x55, 0x5f, 0x7f, 0x9b, 0xbe, 0xff, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x7d,
0x28, 0x4a, 0xad, 0xb3, 0x06, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// SignerClient is the client API for Signer service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type SignerClient interface {
//
//SignOutputRaw is a method that can be used to generated a signature for a
//set of inputs/outputs to a transaction. Each request specifies details
//concerning how the outputs should be signed, which keys they should be
//signed with, and also any optional tweaks. The return value is a fixed
//64-byte signature (the same format as we use on the wire in Lightning).
//
//If we are unable to sign using the specified keys, then an error will be
//returned.
SignOutputRaw(ctx context.Context, in *SignReq, opts ...grpc.CallOption) (*SignResp, error)
//
//ComputeInputScript generates a complete InputIndex for the passed
//transaction with the signature as defined within the passed SignDescriptor.
//This method should be capable of generating the proper input script for
//both regular p2wkh output and p2wkh outputs nested within a regular p2sh
//output.
//
//Note that when using this method to sign inputs belonging to the wallet,
//the only items of the SignDescriptor that need to be populated are pkScript
//in the TxOut field, the value in that same field, and finally the input
//index.
ComputeInputScript(ctx context.Context, in *SignReq, opts ...grpc.CallOption) (*InputScriptResp, error)
//
//SignMessage signs a message with the key specified in the key locator. The
//returned signature is fixed-size LN wire format encoded.
//
//The main difference to SignMessage in the main RPC is that a specific key is
//used to sign the message instead of the node identity private key.
SignMessage(ctx context.Context, in *SignMessageReq, opts ...grpc.CallOption) (*SignMessageResp, error)
//
//VerifyMessage verifies a signature over a message using the public key
//provided. The signature must be fixed-size LN wire format encoded.
//
//The main difference to VerifyMessage in the main RPC is that the public key
//used to sign the message does not have to be a node known to the network.
VerifyMessage(ctx context.Context, in *VerifyMessageReq, opts ...grpc.CallOption) (*VerifyMessageResp, error)
//
//DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key
//derivation between the ephemeral public key in the request and the node's
//key specified in the key_desc parameter. Either a key locator or a raw
//public key is expected in the key_desc, if neither is supplied, defaults to
//the node's identity private key:
//P_shared = privKeyNode * ephemeralPubkey
//The resulting shared public key is serialized in the compressed format and
//hashed with sha256, resulting in the final key length of 256bit.
DeriveSharedKey(ctx context.Context, in *SharedKeyRequest, opts ...grpc.CallOption) (*SharedKeyResponse, error)
}
type signerClient struct {
cc *grpc.ClientConn
}
func NewSignerClient(cc *grpc.ClientConn) SignerClient {
return &signerClient{cc}
}
func (c *signerClient) SignOutputRaw(ctx context.Context, in *SignReq, opts ...grpc.CallOption) (*SignResp, error) {
out := new(SignResp)
err := c.cc.Invoke(ctx, "/signrpc.Signer/SignOutputRaw", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *signerClient) ComputeInputScript(ctx context.Context, in *SignReq, opts ...grpc.CallOption) (*InputScriptResp, error) {
out := new(InputScriptResp)
err := c.cc.Invoke(ctx, "/signrpc.Signer/ComputeInputScript", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *signerClient) SignMessage(ctx context.Context, in *SignMessageReq, opts ...grpc.CallOption) (*SignMessageResp, error) {
out := new(SignMessageResp)
err := c.cc.Invoke(ctx, "/signrpc.Signer/SignMessage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *signerClient) VerifyMessage(ctx context.Context, in *VerifyMessageReq, opts ...grpc.CallOption) (*VerifyMessageResp, error) {
out := new(VerifyMessageResp)
err := c.cc.Invoke(ctx, "/signrpc.Signer/VerifyMessage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *signerClient) DeriveSharedKey(ctx context.Context, in *SharedKeyRequest, opts ...grpc.CallOption) (*SharedKeyResponse, error) {
out := new(SharedKeyResponse)
err := c.cc.Invoke(ctx, "/signrpc.Signer/DeriveSharedKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SignerServer is the server API for Signer service.
type SignerServer interface {
//
//SignOutputRaw is a method that can be used to generated a signature for a
//set of inputs/outputs to a transaction. Each request specifies details
//concerning how the outputs should be signed, which keys they should be
//signed with, and also any optional tweaks. The return value is a fixed
//64-byte signature (the same format as we use on the wire in Lightning).
//
//If we are unable to sign using the specified keys, then an error will be
//returned.
SignOutputRaw(context.Context, *SignReq) (*SignResp, error)
//
//ComputeInputScript generates a complete InputIndex for the passed
//transaction with the signature as defined within the passed SignDescriptor.
//This method should be capable of generating the proper input script for
//both regular p2wkh output and p2wkh outputs nested within a regular p2sh
//output.
//
//Note that when using this method to sign inputs belonging to the wallet,
//the only items of the SignDescriptor that need to be populated are pkScript
//in the TxOut field, the value in that same field, and finally the input
//index.
ComputeInputScript(context.Context, *SignReq) (*InputScriptResp, error)
//
//SignMessage signs a message with the key specified in the key locator. The
//returned signature is fixed-size LN wire format encoded.
//
//The main difference to SignMessage in the main RPC is that a specific key is
//used to sign the message instead of the node identity private key.
SignMessage(context.Context, *SignMessageReq) (*SignMessageResp, error)
//
//VerifyMessage verifies a signature over a message using the public key
//provided. The signature must be fixed-size LN wire format encoded.
//
//The main difference to VerifyMessage in the main RPC is that the public key
//used to sign the message does not have to be a node known to the network.
VerifyMessage(context.Context, *VerifyMessageReq) (*VerifyMessageResp, error)
//