forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
walletunlocker.pb.go
828 lines (751 loc) · 34.1 KB
/
walletunlocker.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: walletunlocker.proto
package lnrpc
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 GenSeedRequest struct {
//
//aezeed_passphrase is an optional user provided passphrase that will be used
//to encrypt the generated aezeed cipher seed. When using REST, this field
//must be encoded as base64.
AezeedPassphrase []byte `protobuf:"bytes,1,opt,name=aezeed_passphrase,json=aezeedPassphrase,proto3" json:"aezeed_passphrase,omitempty"`
//
//seed_entropy is an optional 16-bytes generated via CSPRNG. If not
//specified, then a fresh set of randomness will be used to create the seed.
//When using REST, this field must be encoded as base64.
SeedEntropy []byte `protobuf:"bytes,2,opt,name=seed_entropy,json=seedEntropy,proto3" json:"seed_entropy,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GenSeedRequest) Reset() { *m = GenSeedRequest{} }
func (m *GenSeedRequest) String() string { return proto.CompactTextString(m) }
func (*GenSeedRequest) ProtoMessage() {}
func (*GenSeedRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{0}
}
func (m *GenSeedRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GenSeedRequest.Unmarshal(m, b)
}
func (m *GenSeedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GenSeedRequest.Marshal(b, m, deterministic)
}
func (m *GenSeedRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GenSeedRequest.Merge(m, src)
}
func (m *GenSeedRequest) XXX_Size() int {
return xxx_messageInfo_GenSeedRequest.Size(m)
}
func (m *GenSeedRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GenSeedRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GenSeedRequest proto.InternalMessageInfo
func (m *GenSeedRequest) GetAezeedPassphrase() []byte {
if m != nil {
return m.AezeedPassphrase
}
return nil
}
func (m *GenSeedRequest) GetSeedEntropy() []byte {
if m != nil {
return m.SeedEntropy
}
return nil
}
type GenSeedResponse struct {
//
//cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed
//cipher seed obtained by the user. This field is optional, as if not
//provided, then the daemon will generate a new cipher seed for the user.
//Otherwise, then the daemon will attempt to recover the wallet state linked
//to this cipher seed.
CipherSeedMnemonic []string `protobuf:"bytes,1,rep,name=cipher_seed_mnemonic,json=cipherSeedMnemonic,proto3" json:"cipher_seed_mnemonic,omitempty"`
//
//enciphered_seed are the raw aezeed cipher seed bytes. This is the raw
//cipher text before run through our mnemonic encoding scheme.
EncipheredSeed []byte `protobuf:"bytes,2,opt,name=enciphered_seed,json=encipheredSeed,proto3" json:"enciphered_seed,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GenSeedResponse) Reset() { *m = GenSeedResponse{} }
func (m *GenSeedResponse) String() string { return proto.CompactTextString(m) }
func (*GenSeedResponse) ProtoMessage() {}
func (*GenSeedResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{1}
}
func (m *GenSeedResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GenSeedResponse.Unmarshal(m, b)
}
func (m *GenSeedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GenSeedResponse.Marshal(b, m, deterministic)
}
func (m *GenSeedResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GenSeedResponse.Merge(m, src)
}
func (m *GenSeedResponse) XXX_Size() int {
return xxx_messageInfo_GenSeedResponse.Size(m)
}
func (m *GenSeedResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GenSeedResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GenSeedResponse proto.InternalMessageInfo
func (m *GenSeedResponse) GetCipherSeedMnemonic() []string {
if m != nil {
return m.CipherSeedMnemonic
}
return nil
}
func (m *GenSeedResponse) GetEncipheredSeed() []byte {
if m != nil {
return m.EncipheredSeed
}
return nil
}
type InitWalletRequest struct {
//
//wallet_password is the passphrase that should be used to encrypt the
//wallet. This MUST be at least 8 chars in length. After creation, this
//password is required to unlock the daemon. When using REST, this field
//must be encoded as base64.
WalletPassword []byte `protobuf:"bytes,1,opt,name=wallet_password,json=walletPassword,proto3" json:"wallet_password,omitempty"`
//
//cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed
//cipher seed obtained by the user. This may have been generated by the
//GenSeed method, or be an existing seed.
CipherSeedMnemonic []string `protobuf:"bytes,2,rep,name=cipher_seed_mnemonic,json=cipherSeedMnemonic,proto3" json:"cipher_seed_mnemonic,omitempty"`
//
//aezeed_passphrase is an optional user provided passphrase that will be used
//to encrypt the generated aezeed cipher seed. When using REST, this field
//must be encoded as base64.
AezeedPassphrase []byte `protobuf:"bytes,3,opt,name=aezeed_passphrase,json=aezeedPassphrase,proto3" json:"aezeed_passphrase,omitempty"`
//
//recovery_window is an optional argument specifying the address lookahead
//when restoring a wallet seed. The recovery window applies to each
//individual branch of the BIP44 derivation paths. Supplying a recovery
//window of zero indicates that no addresses should be recovered, such after
//the first initialization of the wallet.
RecoveryWindow int32 `protobuf:"varint,4,opt,name=recovery_window,json=recoveryWindow,proto3" json:"recovery_window,omitempty"`
//
//channel_backups is an optional argument that allows clients to recover the
//settled funds within a set of channels. This should be populated if the
//user was unable to close out all channels and sweep funds before partial or
//total data loss occurred. If specified, then after on-chain recovery of
//funds, lnd begin to carry out the data loss recovery protocol in order to
//recover the funds in each channel from a remote force closed transaction.
ChannelBackups *ChanBackupSnapshot `protobuf:"bytes,5,opt,name=channel_backups,json=channelBackups,proto3" json:"channel_backups,omitempty"`
//
//stateless_init is an optional argument instructing the daemon NOT to create
//any *.macaroon files in its filesystem. If this parameter is set, then the
//admin macaroon returned in the response MUST be stored by the caller of the
//RPC as otherwise all access to the daemon will be lost!
StatelessInit bool `protobuf:"varint,6,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InitWalletRequest) Reset() { *m = InitWalletRequest{} }
func (m *InitWalletRequest) String() string { return proto.CompactTextString(m) }
func (*InitWalletRequest) ProtoMessage() {}
func (*InitWalletRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{2}
}
func (m *InitWalletRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InitWalletRequest.Unmarshal(m, b)
}
func (m *InitWalletRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InitWalletRequest.Marshal(b, m, deterministic)
}
func (m *InitWalletRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_InitWalletRequest.Merge(m, src)
}
func (m *InitWalletRequest) XXX_Size() int {
return xxx_messageInfo_InitWalletRequest.Size(m)
}
func (m *InitWalletRequest) XXX_DiscardUnknown() {
xxx_messageInfo_InitWalletRequest.DiscardUnknown(m)
}
var xxx_messageInfo_InitWalletRequest proto.InternalMessageInfo
func (m *InitWalletRequest) GetWalletPassword() []byte {
if m != nil {
return m.WalletPassword
}
return nil
}
func (m *InitWalletRequest) GetCipherSeedMnemonic() []string {
if m != nil {
return m.CipherSeedMnemonic
}
return nil
}
func (m *InitWalletRequest) GetAezeedPassphrase() []byte {
if m != nil {
return m.AezeedPassphrase
}
return nil
}
func (m *InitWalletRequest) GetRecoveryWindow() int32 {
if m != nil {
return m.RecoveryWindow
}
return 0
}
func (m *InitWalletRequest) GetChannelBackups() *ChanBackupSnapshot {
if m != nil {
return m.ChannelBackups
}
return nil
}
func (m *InitWalletRequest) GetStatelessInit() bool {
if m != nil {
return m.StatelessInit
}
return false
}
type InitWalletResponse struct {
//
//The binary serialized admin macaroon that can be used to access the daemon
//after creating the wallet. If the stateless_init parameter was set to true,
//this is the ONLY copy of the macaroon and MUST be stored safely by the
//caller. Otherwise a copy of this macaroon is also persisted on disk by the
//daemon, together with other macaroon files.
AdminMacaroon []byte `protobuf:"bytes,1,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InitWalletResponse) Reset() { *m = InitWalletResponse{} }
func (m *InitWalletResponse) String() string { return proto.CompactTextString(m) }
func (*InitWalletResponse) ProtoMessage() {}
func (*InitWalletResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{3}
}
func (m *InitWalletResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InitWalletResponse.Unmarshal(m, b)
}
func (m *InitWalletResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InitWalletResponse.Marshal(b, m, deterministic)
}
func (m *InitWalletResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_InitWalletResponse.Merge(m, src)
}
func (m *InitWalletResponse) XXX_Size() int {
return xxx_messageInfo_InitWalletResponse.Size(m)
}
func (m *InitWalletResponse) XXX_DiscardUnknown() {
xxx_messageInfo_InitWalletResponse.DiscardUnknown(m)
}
var xxx_messageInfo_InitWalletResponse proto.InternalMessageInfo
func (m *InitWalletResponse) GetAdminMacaroon() []byte {
if m != nil {
return m.AdminMacaroon
}
return nil
}
type UnlockWalletRequest struct {
//
//wallet_password should be the current valid passphrase for the daemon. This
//will be required to decrypt on-disk material that the daemon requires to
//function properly. When using REST, this field must be encoded as base64.
WalletPassword []byte `protobuf:"bytes,1,opt,name=wallet_password,json=walletPassword,proto3" json:"wallet_password,omitempty"`
//
//recovery_window is an optional argument specifying the address lookahead
//when restoring a wallet seed. The recovery window applies to each
//individual branch of the BIP44 derivation paths. Supplying a recovery
//window of zero indicates that no addresses should be recovered, such after
//the first initialization of the wallet.
RecoveryWindow int32 `protobuf:"varint,2,opt,name=recovery_window,json=recoveryWindow,proto3" json:"recovery_window,omitempty"`
//
//channel_backups is an optional argument that allows clients to recover the
//settled funds within a set of channels. This should be populated if the
//user was unable to close out all channels and sweep funds before partial or
//total data loss occurred. If specified, then after on-chain recovery of
//funds, lnd begin to carry out the data loss recovery protocol in order to
//recover the funds in each channel from a remote force closed transaction.
ChannelBackups *ChanBackupSnapshot `protobuf:"bytes,3,opt,name=channel_backups,json=channelBackups,proto3" json:"channel_backups,omitempty"`
//
//stateless_init is an optional argument instructing the daemon NOT to create
//any *.macaroon files in its file system.
StatelessInit bool `protobuf:"varint,4,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UnlockWalletRequest) Reset() { *m = UnlockWalletRequest{} }
func (m *UnlockWalletRequest) String() string { return proto.CompactTextString(m) }
func (*UnlockWalletRequest) ProtoMessage() {}
func (*UnlockWalletRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{4}
}
func (m *UnlockWalletRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UnlockWalletRequest.Unmarshal(m, b)
}
func (m *UnlockWalletRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UnlockWalletRequest.Marshal(b, m, deterministic)
}
func (m *UnlockWalletRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UnlockWalletRequest.Merge(m, src)
}
func (m *UnlockWalletRequest) XXX_Size() int {
return xxx_messageInfo_UnlockWalletRequest.Size(m)
}
func (m *UnlockWalletRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UnlockWalletRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UnlockWalletRequest proto.InternalMessageInfo
func (m *UnlockWalletRequest) GetWalletPassword() []byte {
if m != nil {
return m.WalletPassword
}
return nil
}
func (m *UnlockWalletRequest) GetRecoveryWindow() int32 {
if m != nil {
return m.RecoveryWindow
}
return 0
}
func (m *UnlockWalletRequest) GetChannelBackups() *ChanBackupSnapshot {
if m != nil {
return m.ChannelBackups
}
return nil
}
func (m *UnlockWalletRequest) GetStatelessInit() bool {
if m != nil {
return m.StatelessInit
}
return false
}
type UnlockWalletResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UnlockWalletResponse) Reset() { *m = UnlockWalletResponse{} }
func (m *UnlockWalletResponse) String() string { return proto.CompactTextString(m) }
func (*UnlockWalletResponse) ProtoMessage() {}
func (*UnlockWalletResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{5}
}
func (m *UnlockWalletResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UnlockWalletResponse.Unmarshal(m, b)
}
func (m *UnlockWalletResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UnlockWalletResponse.Marshal(b, m, deterministic)
}
func (m *UnlockWalletResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_UnlockWalletResponse.Merge(m, src)
}
func (m *UnlockWalletResponse) XXX_Size() int {
return xxx_messageInfo_UnlockWalletResponse.Size(m)
}
func (m *UnlockWalletResponse) XXX_DiscardUnknown() {
xxx_messageInfo_UnlockWalletResponse.DiscardUnknown(m)
}
var xxx_messageInfo_UnlockWalletResponse proto.InternalMessageInfo
type ChangePasswordRequest struct {
//
//current_password should be the current valid passphrase used to unlock the
//daemon. When using REST, this field must be encoded as base64.
CurrentPassword []byte `protobuf:"bytes,1,opt,name=current_password,json=currentPassword,proto3" json:"current_password,omitempty"`
//
//new_password should be the new passphrase that will be needed to unlock the
//daemon. When using REST, this field must be encoded as base64.
NewPassword []byte `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
//
//stateless_init is an optional argument instructing the daemon NOT to create
//any *.macaroon files in its filesystem. If this parameter is set, then the
//admin macaroon returned in the response MUST be stored by the caller of the
//RPC as otherwise all access to the daemon will be lost!
StatelessInit bool `protobuf:"varint,3,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"`
//
//new_macaroon_root_key is an optional argument instructing the daemon to
//rotate the macaroon root key when set to true. This will invalidate all
//previously generated macaroons.
NewMacaroonRootKey bool `protobuf:"varint,4,opt,name=new_macaroon_root_key,json=newMacaroonRootKey,proto3" json:"new_macaroon_root_key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} }
func (m *ChangePasswordRequest) String() string { return proto.CompactTextString(m) }
func (*ChangePasswordRequest) ProtoMessage() {}
func (*ChangePasswordRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{6}
}
func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChangePasswordRequest.Unmarshal(m, b)
}
func (m *ChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ChangePasswordRequest.Marshal(b, m, deterministic)
}
func (m *ChangePasswordRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ChangePasswordRequest.Merge(m, src)
}
func (m *ChangePasswordRequest) XXX_Size() int {
return xxx_messageInfo_ChangePasswordRequest.Size(m)
}
func (m *ChangePasswordRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ChangePasswordRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ChangePasswordRequest proto.InternalMessageInfo
func (m *ChangePasswordRequest) GetCurrentPassword() []byte {
if m != nil {
return m.CurrentPassword
}
return nil
}
func (m *ChangePasswordRequest) GetNewPassword() []byte {
if m != nil {
return m.NewPassword
}
return nil
}
func (m *ChangePasswordRequest) GetStatelessInit() bool {
if m != nil {
return m.StatelessInit
}
return false
}
func (m *ChangePasswordRequest) GetNewMacaroonRootKey() bool {
if m != nil {
return m.NewMacaroonRootKey
}
return false
}
type ChangePasswordResponse struct {
//
//The binary serialized admin macaroon that can be used to access the daemon
//after rotating the macaroon root key. If both the stateless_init and
//new_macaroon_root_key parameter were set to true, this is the ONLY copy of
//the macaroon that was created from the new root key and MUST be stored
//safely by the caller. Otherwise a copy of this macaroon is also persisted on
//disk by the daemon, together with other macaroon files.
AdminMacaroon []byte `protobuf:"bytes,1,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ChangePasswordResponse) Reset() { *m = ChangePasswordResponse{} }
func (m *ChangePasswordResponse) String() string { return proto.CompactTextString(m) }
func (*ChangePasswordResponse) ProtoMessage() {}
func (*ChangePasswordResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_76e3ed10ed53e4fd, []int{7}
}
func (m *ChangePasswordResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChangePasswordResponse.Unmarshal(m, b)
}
func (m *ChangePasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ChangePasswordResponse.Marshal(b, m, deterministic)
}
func (m *ChangePasswordResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ChangePasswordResponse.Merge(m, src)
}
func (m *ChangePasswordResponse) XXX_Size() int {
return xxx_messageInfo_ChangePasswordResponse.Size(m)
}
func (m *ChangePasswordResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ChangePasswordResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ChangePasswordResponse proto.InternalMessageInfo
func (m *ChangePasswordResponse) GetAdminMacaroon() []byte {
if m != nil {
return m.AdminMacaroon
}
return nil
}
func init() {
proto.RegisterType((*GenSeedRequest)(nil), "lnrpc.GenSeedRequest")
proto.RegisterType((*GenSeedResponse)(nil), "lnrpc.GenSeedResponse")
proto.RegisterType((*InitWalletRequest)(nil), "lnrpc.InitWalletRequest")
proto.RegisterType((*InitWalletResponse)(nil), "lnrpc.InitWalletResponse")
proto.RegisterType((*UnlockWalletRequest)(nil), "lnrpc.UnlockWalletRequest")
proto.RegisterType((*UnlockWalletResponse)(nil), "lnrpc.UnlockWalletResponse")
proto.RegisterType((*ChangePasswordRequest)(nil), "lnrpc.ChangePasswordRequest")
proto.RegisterType((*ChangePasswordResponse)(nil), "lnrpc.ChangePasswordResponse")
}
func init() { proto.RegisterFile("walletunlocker.proto", fileDescriptor_76e3ed10ed53e4fd) }
var fileDescriptor_76e3ed10ed53e4fd = []byte{
// 599 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xdd, 0x6a, 0xdb, 0x4c,
0x10, 0x86, 0x91, 0x9d, 0xe4, 0xfb, 0x32, 0x71, 0xe4, 0x64, 0x9b, 0x04, 0xc5, 0x6d, 0xc1, 0x11,
0x04, 0xbb, 0x14, 0x9c, 0x36, 0x3d, 0x29, 0xf4, 0xa0, 0x34, 0xa5, 0x84, 0x52, 0x02, 0x41, 0x21,
0x04, 0x7a, 0xa2, 0x6e, 0xa4, 0xc1, 0x12, 0x96, 0x67, 0xd5, 0xdd, 0x75, 0x85, 0x7b, 0x3f, 0x3d,
0xee, 0x25, 0xf4, 0x1e, 0x7a, 0x45, 0x45, 0xab, 0xb5, 0xf3, 0x63, 0x19, 0xfa, 0x73, 0xfa, 0xcc,
0xcc, 0xee, 0xbc, 0xef, 0xcc, 0x2e, 0xec, 0x14, 0x3c, 0xcb, 0x50, 0x4f, 0x28, 0x13, 0xd1, 0x08,
0xe5, 0x20, 0x97, 0x42, 0x0b, 0xb6, 0x9a, 0x91, 0xcc, 0xa3, 0xce, 0xba, 0xcc, 0xa3, 0x8a, 0xf8,
0x9f, 0xc0, 0x3d, 0x45, 0xba, 0x40, 0x8c, 0x03, 0xfc, 0x3c, 0x41, 0xa5, 0xd9, 0x53, 0xd8, 0xe6,
0xf8, 0x15, 0x31, 0x0e, 0x73, 0xae, 0x54, 0x9e, 0x48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 0x6c, 0xd6, 0xc2, 0xeb, 0xed, 0xec,
0xd7, 0x44, 0xec, 0x11, 0xa7, 0xd0, 0xba, 0x3d, 0x2a, 0xd6, 0xb1, 0xa9, 0x35, 0x3b, 0xd9, 0x79,
0x58, 0x1b, 0xb3, 0x07, 0x9d, 0x81, 0x7b, 0xd7, 0x19, 0xf6, 0xe8, 0xd6, 0x5e, 0x2d, 0x4c, 0xbc,
0xf3, 0x78, 0x49, 0xb4, 0x3a, 0xee, 0xa4, 0xf7, 0xf1, 0x70, 0x98, 0xea, 0x64, 0x72, 0x3d, 0x88,
0xc4, 0xf8, 0x28, 0x4b, 0x87, 0x89, 0xa6, 0x94, 0x86, 0x84, 0xba, 0x10, 0x72, 0x74, 0x94, 0x51,
0x7c, 0x64, 0xea, 0xaf, 0xd7, 0xcc, 0x37, 0xfc, 0xe2, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf8,
0x7a, 0x3b, 0x08, 0xb0, 0x05, 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
// WalletUnlockerClient is the client API for WalletUnlocker service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type WalletUnlockerClient interface {
//
//GenSeed is the first method that should be used to instantiate a new lnd
//instance. This method allows a caller to generate a new aezeed cipher seed
//given an optional passphrase. If provided, the passphrase will be necessary
//to decrypt the cipherseed to expose the internal wallet seed.
//
//Once the cipherseed is obtained and verified by the user, the InitWallet
//method should be used to commit the newly generated seed, and create the
//wallet.
GenSeed(ctx context.Context, in *GenSeedRequest, opts ...grpc.CallOption) (*GenSeedResponse, error)
//
//InitWallet is used when lnd is starting up for the first time to fully
//initialize the daemon and its internal wallet. At the very least a wallet
//password must be provided. This will be used to encrypt sensitive material
//on disk.
//
//In the case of a recovery scenario, the user can also specify their aezeed
//mnemonic and passphrase. If set, then the daemon will use this prior state
//to initialize its internal wallet.
//
//Alternatively, this can be used along with the GenSeed RPC to obtain a
//seed, then present it to the user. Once it has been verified by the user,
//the seed can be fed into this RPC in order to commit the new wallet.
InitWallet(ctx context.Context, in *InitWalletRequest, opts ...grpc.CallOption) (*InitWalletResponse, error)
// lncli: `unlock`
//UnlockWallet is used at startup of lnd to provide a password to unlock
//the wallet database.
UnlockWallet(ctx context.Context, in *UnlockWalletRequest, opts ...grpc.CallOption) (*UnlockWalletResponse, error)
// lncli: `changepassword`
//ChangePassword changes the password of the encrypted wallet. This will
//automatically unlock the wallet database if successful.
ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error)
}
type walletUnlockerClient struct {
cc *grpc.ClientConn
}
func NewWalletUnlockerClient(cc *grpc.ClientConn) WalletUnlockerClient {
return &walletUnlockerClient{cc}
}
func (c *walletUnlockerClient) GenSeed(ctx context.Context, in *GenSeedRequest, opts ...grpc.CallOption) (*GenSeedResponse, error) {
out := new(GenSeedResponse)
err := c.cc.Invoke(ctx, "/lnrpc.WalletUnlocker/GenSeed", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletUnlockerClient) InitWallet(ctx context.Context, in *InitWalletRequest, opts ...grpc.CallOption) (*InitWalletResponse, error) {
out := new(InitWalletResponse)
err := c.cc.Invoke(ctx, "/lnrpc.WalletUnlocker/InitWallet", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletUnlockerClient) UnlockWallet(ctx context.Context, in *UnlockWalletRequest, opts ...grpc.CallOption) (*UnlockWalletResponse, error) {
out := new(UnlockWalletResponse)
err := c.cc.Invoke(ctx, "/lnrpc.WalletUnlocker/UnlockWallet", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletUnlockerClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) {
out := new(ChangePasswordResponse)
err := c.cc.Invoke(ctx, "/lnrpc.WalletUnlocker/ChangePassword", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WalletUnlockerServer is the server API for WalletUnlocker service.
type WalletUnlockerServer interface {
//
//GenSeed is the first method that should be used to instantiate a new lnd
//instance. This method allows a caller to generate a new aezeed cipher seed
//given an optional passphrase. If provided, the passphrase will be necessary
//to decrypt the cipherseed to expose the internal wallet seed.
//
//Once the cipherseed is obtained and verified by the user, the InitWallet
//method should be used to commit the newly generated seed, and create the
//wallet.
GenSeed(context.Context, *GenSeedRequest) (*GenSeedResponse, error)
//
//InitWallet is used when lnd is starting up for the first time to fully
//initialize the daemon and its internal wallet. At the very least a wallet
//password must be provided. This will be used to encrypt sensitive material
//on disk.
//
//In the case of a recovery scenario, the user can also specify their aezeed
//mnemonic and passphrase. If set, then the daemon will use this prior state
//to initialize its internal wallet.
//
//Alternatively, this can be used along with the GenSeed RPC to obtain a
//seed, then present it to the user. Once it has been verified by the user,
//the seed can be fed into this RPC in order to commit the new wallet.
InitWallet(context.Context, *InitWalletRequest) (*InitWalletResponse, error)
// lncli: `unlock`
//UnlockWallet is used at startup of lnd to provide a password to unlock
//the wallet database.
UnlockWallet(context.Context, *UnlockWalletRequest) (*UnlockWalletResponse, error)
// lncli: `changepassword`
//ChangePassword changes the password of the encrypted wallet. This will
//automatically unlock the wallet database if successful.
ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error)
}
// UnimplementedWalletUnlockerServer can be embedded to have forward compatible implementations.
type UnimplementedWalletUnlockerServer struct {
}
func (*UnimplementedWalletUnlockerServer) GenSeed(ctx context.Context, req *GenSeedRequest) (*GenSeedResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GenSeed not implemented")
}
func (*UnimplementedWalletUnlockerServer) InitWallet(ctx context.Context, req *InitWalletRequest) (*InitWalletResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method InitWallet not implemented")
}
func (*UnimplementedWalletUnlockerServer) UnlockWallet(ctx context.Context, req *UnlockWalletRequest) (*UnlockWalletResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UnlockWallet not implemented")
}
func (*UnimplementedWalletUnlockerServer) ChangePassword(ctx context.Context, req *ChangePasswordRequest) (*ChangePasswordResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented")
}
func RegisterWalletUnlockerServer(s *grpc.Server, srv WalletUnlockerServer) {
s.RegisterService(&_WalletUnlocker_serviceDesc, srv)
}
func _WalletUnlocker_GenSeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GenSeedRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletUnlockerServer).GenSeed(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/lnrpc.WalletUnlocker/GenSeed",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletUnlockerServer).GenSeed(ctx, req.(*GenSeedRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletUnlocker_InitWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InitWalletRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletUnlockerServer).InitWallet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/lnrpc.WalletUnlocker/InitWallet",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletUnlockerServer).InitWallet(ctx, req.(*InitWalletRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletUnlocker_UnlockWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UnlockWalletRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletUnlockerServer).UnlockWallet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/lnrpc.WalletUnlocker/UnlockWallet",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletUnlockerServer).UnlockWallet(ctx, req.(*UnlockWalletRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletUnlocker_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ChangePasswordRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletUnlockerServer).ChangePassword(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/lnrpc.WalletUnlocker/ChangePassword",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletUnlockerServer).ChangePassword(ctx, req.(*ChangePasswordRequest))
}
return interceptor(ctx, in, info, handler)
}
var _WalletUnlocker_serviceDesc = grpc.ServiceDesc{
ServiceName: "lnrpc.WalletUnlocker",
HandlerType: (*WalletUnlockerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GenSeed",
Handler: _WalletUnlocker_GenSeed_Handler,
},
{
MethodName: "InitWallet",
Handler: _WalletUnlocker_InitWallet_Handler,
},
{
MethodName: "UnlockWallet",
Handler: _WalletUnlocker_UnlockWallet_Handler,
},
{
MethodName: "ChangePassword",
Handler: _WalletUnlocker_ChangePassword_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "walletunlocker.proto",
}