github.com/decred/dcrlnd@v0.7.6/lnrpc/walletunlocker.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.31.0 4 // protoc v3.4.0 5 // source: walletunlocker.proto 6 7 package lnrpc 8 9 import ( 10 context "context" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 15 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 16 reflect "reflect" 17 sync "sync" 18 ) 19 20 const ( 21 // Verify that this generated code is sufficiently up-to-date. 22 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 23 // Verify that runtime/protoimpl is sufficiently up-to-date. 24 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 25 ) 26 27 type GenSeedRequest struct { 28 state protoimpl.MessageState 29 sizeCache protoimpl.SizeCache 30 unknownFields protoimpl.UnknownFields 31 32 // aezeed_passphrase is an optional user provided passphrase that will be used 33 // to encrypt the generated aezeed cipher seed. When using REST, this field 34 // must be encoded as base64. 35 AezeedPassphrase []byte `protobuf:"bytes,1,opt,name=aezeed_passphrase,json=aezeedPassphrase,proto3" json:"aezeed_passphrase,omitempty"` 36 // seed_entropy is an optional 16-bytes generated via CSPRNG. If not 37 // specified, then a fresh set of randomness will be used to create the seed. 38 // When using REST, this field must be encoded as base64. 39 SeedEntropy []byte `protobuf:"bytes,2,opt,name=seed_entropy,json=seedEntropy,proto3" json:"seed_entropy,omitempty"` 40 } 41 42 func (x *GenSeedRequest) Reset() { 43 *x = GenSeedRequest{} 44 if protoimpl.UnsafeEnabled { 45 mi := &file_walletunlocker_proto_msgTypes[0] 46 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 47 ms.StoreMessageInfo(mi) 48 } 49 } 50 51 func (x *GenSeedRequest) String() string { 52 return protoimpl.X.MessageStringOf(x) 53 } 54 55 func (*GenSeedRequest) ProtoMessage() {} 56 57 func (x *GenSeedRequest) ProtoReflect() protoreflect.Message { 58 mi := &file_walletunlocker_proto_msgTypes[0] 59 if protoimpl.UnsafeEnabled && x != nil { 60 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 61 if ms.LoadMessageInfo() == nil { 62 ms.StoreMessageInfo(mi) 63 } 64 return ms 65 } 66 return mi.MessageOf(x) 67 } 68 69 // Deprecated: Use GenSeedRequest.ProtoReflect.Descriptor instead. 70 func (*GenSeedRequest) Descriptor() ([]byte, []int) { 71 return file_walletunlocker_proto_rawDescGZIP(), []int{0} 72 } 73 74 func (x *GenSeedRequest) GetAezeedPassphrase() []byte { 75 if x != nil { 76 return x.AezeedPassphrase 77 } 78 return nil 79 } 80 81 func (x *GenSeedRequest) GetSeedEntropy() []byte { 82 if x != nil { 83 return x.SeedEntropy 84 } 85 return nil 86 } 87 88 type GenSeedResponse struct { 89 state protoimpl.MessageState 90 sizeCache protoimpl.SizeCache 91 unknownFields protoimpl.UnknownFields 92 93 // cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed 94 // cipher seed obtained by the user. This field is optional, as if not 95 // provided, then the daemon will generate a new cipher seed for the user. 96 // Otherwise, then the daemon will attempt to recover the wallet state linked 97 // to this cipher seed. 98 CipherSeedMnemonic []string `protobuf:"bytes,1,rep,name=cipher_seed_mnemonic,json=cipherSeedMnemonic,proto3" json:"cipher_seed_mnemonic,omitempty"` 99 // enciphered_seed are the raw aezeed cipher seed bytes. This is the raw 100 // cipher text before run through our mnemonic encoding scheme. 101 EncipheredSeed []byte `protobuf:"bytes,2,opt,name=enciphered_seed,json=encipheredSeed,proto3" json:"enciphered_seed,omitempty"` 102 } 103 104 func (x *GenSeedResponse) Reset() { 105 *x = GenSeedResponse{} 106 if protoimpl.UnsafeEnabled { 107 mi := &file_walletunlocker_proto_msgTypes[1] 108 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 109 ms.StoreMessageInfo(mi) 110 } 111 } 112 113 func (x *GenSeedResponse) String() string { 114 return protoimpl.X.MessageStringOf(x) 115 } 116 117 func (*GenSeedResponse) ProtoMessage() {} 118 119 func (x *GenSeedResponse) ProtoReflect() protoreflect.Message { 120 mi := &file_walletunlocker_proto_msgTypes[1] 121 if protoimpl.UnsafeEnabled && x != nil { 122 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 123 if ms.LoadMessageInfo() == nil { 124 ms.StoreMessageInfo(mi) 125 } 126 return ms 127 } 128 return mi.MessageOf(x) 129 } 130 131 // Deprecated: Use GenSeedResponse.ProtoReflect.Descriptor instead. 132 func (*GenSeedResponse) Descriptor() ([]byte, []int) { 133 return file_walletunlocker_proto_rawDescGZIP(), []int{1} 134 } 135 136 func (x *GenSeedResponse) GetCipherSeedMnemonic() []string { 137 if x != nil { 138 return x.CipherSeedMnemonic 139 } 140 return nil 141 } 142 143 func (x *GenSeedResponse) GetEncipheredSeed() []byte { 144 if x != nil { 145 return x.EncipheredSeed 146 } 147 return nil 148 } 149 150 type InitWalletRequest struct { 151 state protoimpl.MessageState 152 sizeCache protoimpl.SizeCache 153 unknownFields protoimpl.UnknownFields 154 155 // wallet_password is the passphrase that should be used to encrypt the 156 // wallet. This MUST be at least 8 chars in length. After creation, this 157 // password is required to unlock the daemon. When using REST, this field 158 // must be encoded as base64. 159 WalletPassword []byte `protobuf:"bytes,1,opt,name=wallet_password,json=walletPassword,proto3" json:"wallet_password,omitempty"` 160 // cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed 161 // cipher seed obtained by the user. This may have been generated by the 162 // GenSeed method, or be an existing seed. 163 CipherSeedMnemonic []string `protobuf:"bytes,2,rep,name=cipher_seed_mnemonic,json=cipherSeedMnemonic,proto3" json:"cipher_seed_mnemonic,omitempty"` 164 // aezeed_passphrase is an optional user provided passphrase that will be used 165 // to encrypt the generated aezeed cipher seed. When using REST, this field 166 // must be encoded as base64. 167 AezeedPassphrase []byte `protobuf:"bytes,3,opt,name=aezeed_passphrase,json=aezeedPassphrase,proto3" json:"aezeed_passphrase,omitempty"` 168 // recovery_window is an optional argument specifying the address lookahead 169 // when restoring a wallet seed. The recovery window applies to each 170 // individual branch of the BIP44 derivation paths. Supplying a recovery 171 // window of zero indicates that no addresses should be recovered, such after 172 // the first initialization of the wallet. 173 RecoveryWindow int32 `protobuf:"varint,4,opt,name=recovery_window,json=recoveryWindow,proto3" json:"recovery_window,omitempty"` 174 // channel_backups is an optional argument that allows clients to recover the 175 // settled funds within a set of channels. This should be populated if the 176 // user was unable to close out all channels and sweep funds before partial or 177 // total data loss occurred. If specified, then after on-chain recovery of 178 // funds, lnd begin to carry out the data loss recovery protocol in order to 179 // recover the funds in each channel from a remote force closed transaction. 180 ChannelBackups *ChanBackupSnapshot `protobuf:"bytes,5,opt,name=channel_backups,json=channelBackups,proto3" json:"channel_backups,omitempty"` 181 // stateless_init is an optional argument instructing the daemon NOT to create 182 // any *.macaroon files in its filesystem. If this parameter is set, then the 183 // admin macaroon returned in the response MUST be stored by the caller of the 184 // RPC as otherwise all access to the daemon will be lost! 185 StatelessInit bool `protobuf:"varint,6,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"` 186 // extended_master_key is an alternative to specifying cipher_seed_mnemonic and 187 // aezeed_passphrase. Instead of deriving the master root key from the entropy 188 // of an aezeed cipher seed, the given extended master root key is used 189 // directly as the wallet's master key. This allows users to import/use a 190 // master key from another wallet. When doing so, lnd still uses its default 191 // SegWit only (BIP49/84) derivation paths and funds from custom/non-default 192 // derivation paths will not automatically appear in the on-chain wallet. Using 193 // an 'xprv' instead of an aezeed also has the disadvantage that the wallet's 194 // birthday is not known as that is an information that's only encoded in the 195 // aezeed, not the xprv. Therefore a birthday needs to be specified in 196 // extended_master_key_birthday_timestamp or a "safe" default value will be 197 // used. 198 ExtendedMasterKey string `protobuf:"bytes,7,opt,name=extended_master_key,json=extendedMasterKey,proto3" json:"extended_master_key,omitempty"` 199 // extended_master_key_birthday_timestamp is the optional unix timestamp in 200 // seconds to use as the wallet's birthday when using an extended master key 201 // to restore the wallet. lnd will only start scanning for funds in blocks that 202 // are after the birthday which can speed up the process significantly. If the 203 // birthday is not known, this should be left at its default value of 0 in 204 // which case lnd will start scanning from the first SegWit block (481824 on 205 // mainnet). 206 ExtendedMasterKeyBirthdayTimestamp uint64 `protobuf:"varint,8,opt,name=extended_master_key_birthday_timestamp,json=extendedMasterKeyBirthdayTimestamp,proto3" json:"extended_master_key_birthday_timestamp,omitempty"` 207 // watch_only is the third option of initializing a wallet: by importing 208 // account xpubs only and therefore creating a watch-only wallet that does not 209 // contain any private keys. That means the wallet won't be able to sign for 210 // any of the keys and _needs_ to be run with a remote signer that has the 211 // corresponding private keys and can serve signing RPC requests. 212 WatchOnly *WatchOnly `protobuf:"bytes,9,opt,name=watch_only,json=watchOnly,proto3" json:"watch_only,omitempty"` 213 } 214 215 func (x *InitWalletRequest) Reset() { 216 *x = InitWalletRequest{} 217 if protoimpl.UnsafeEnabled { 218 mi := &file_walletunlocker_proto_msgTypes[2] 219 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 220 ms.StoreMessageInfo(mi) 221 } 222 } 223 224 func (x *InitWalletRequest) String() string { 225 return protoimpl.X.MessageStringOf(x) 226 } 227 228 func (*InitWalletRequest) ProtoMessage() {} 229 230 func (x *InitWalletRequest) ProtoReflect() protoreflect.Message { 231 mi := &file_walletunlocker_proto_msgTypes[2] 232 if protoimpl.UnsafeEnabled && x != nil { 233 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 234 if ms.LoadMessageInfo() == nil { 235 ms.StoreMessageInfo(mi) 236 } 237 return ms 238 } 239 return mi.MessageOf(x) 240 } 241 242 // Deprecated: Use InitWalletRequest.ProtoReflect.Descriptor instead. 243 func (*InitWalletRequest) Descriptor() ([]byte, []int) { 244 return file_walletunlocker_proto_rawDescGZIP(), []int{2} 245 } 246 247 func (x *InitWalletRequest) GetWalletPassword() []byte { 248 if x != nil { 249 return x.WalletPassword 250 } 251 return nil 252 } 253 254 func (x *InitWalletRequest) GetCipherSeedMnemonic() []string { 255 if x != nil { 256 return x.CipherSeedMnemonic 257 } 258 return nil 259 } 260 261 func (x *InitWalletRequest) GetAezeedPassphrase() []byte { 262 if x != nil { 263 return x.AezeedPassphrase 264 } 265 return nil 266 } 267 268 func (x *InitWalletRequest) GetRecoveryWindow() int32 { 269 if x != nil { 270 return x.RecoveryWindow 271 } 272 return 0 273 } 274 275 func (x *InitWalletRequest) GetChannelBackups() *ChanBackupSnapshot { 276 if x != nil { 277 return x.ChannelBackups 278 } 279 return nil 280 } 281 282 func (x *InitWalletRequest) GetStatelessInit() bool { 283 if x != nil { 284 return x.StatelessInit 285 } 286 return false 287 } 288 289 func (x *InitWalletRequest) GetExtendedMasterKey() string { 290 if x != nil { 291 return x.ExtendedMasterKey 292 } 293 return "" 294 } 295 296 func (x *InitWalletRequest) GetExtendedMasterKeyBirthdayTimestamp() uint64 { 297 if x != nil { 298 return x.ExtendedMasterKeyBirthdayTimestamp 299 } 300 return 0 301 } 302 303 func (x *InitWalletRequest) GetWatchOnly() *WatchOnly { 304 if x != nil { 305 return x.WatchOnly 306 } 307 return nil 308 } 309 310 type InitWalletResponse struct { 311 state protoimpl.MessageState 312 sizeCache protoimpl.SizeCache 313 unknownFields protoimpl.UnknownFields 314 315 // The binary serialized admin macaroon that can be used to access the daemon 316 // after creating the wallet. If the stateless_init parameter was set to true, 317 // this is the ONLY copy of the macaroon and MUST be stored safely by the 318 // caller. Otherwise a copy of this macaroon is also persisted on disk by the 319 // daemon, together with other macaroon files. 320 AdminMacaroon []byte `protobuf:"bytes,1,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"` 321 } 322 323 func (x *InitWalletResponse) Reset() { 324 *x = InitWalletResponse{} 325 if protoimpl.UnsafeEnabled { 326 mi := &file_walletunlocker_proto_msgTypes[3] 327 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 328 ms.StoreMessageInfo(mi) 329 } 330 } 331 332 func (x *InitWalletResponse) String() string { 333 return protoimpl.X.MessageStringOf(x) 334 } 335 336 func (*InitWalletResponse) ProtoMessage() {} 337 338 func (x *InitWalletResponse) ProtoReflect() protoreflect.Message { 339 mi := &file_walletunlocker_proto_msgTypes[3] 340 if protoimpl.UnsafeEnabled && x != nil { 341 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 342 if ms.LoadMessageInfo() == nil { 343 ms.StoreMessageInfo(mi) 344 } 345 return ms 346 } 347 return mi.MessageOf(x) 348 } 349 350 // Deprecated: Use InitWalletResponse.ProtoReflect.Descriptor instead. 351 func (*InitWalletResponse) Descriptor() ([]byte, []int) { 352 return file_walletunlocker_proto_rawDescGZIP(), []int{3} 353 } 354 355 func (x *InitWalletResponse) GetAdminMacaroon() []byte { 356 if x != nil { 357 return x.AdminMacaroon 358 } 359 return nil 360 } 361 362 type WatchOnly struct { 363 state protoimpl.MessageState 364 sizeCache protoimpl.SizeCache 365 unknownFields protoimpl.UnknownFields 366 367 // The unix timestamp in seconds of when the master key was created. lnd will 368 // only start scanning for funds in blocks that are after the birthday which 369 // can speed up the process significantly. If the birthday is not known, this 370 // should be left at its default value of 0 in which case lnd will start 371 // scanning from the first SegWit block (481824 on mainnet). 372 MasterKeyBirthdayTimestamp uint64 `protobuf:"varint,1,opt,name=master_key_birthday_timestamp,json=masterKeyBirthdayTimestamp,proto3" json:"master_key_birthday_timestamp,omitempty"` 373 // The fingerprint of the root key (also known as the key with derivation path 374 // m/) from which the account public keys were derived from. This may be 375 // required by some hardware wallets for proper identification and signing. The 376 // bytes must be in big-endian order. 377 MasterKeyFingerprint []byte `protobuf:"bytes,2,opt,name=master_key_fingerprint,json=masterKeyFingerprint,proto3" json:"master_key_fingerprint,omitempty"` 378 // The list of accounts to import. There _must_ be an account for all of lnd's 379 // main key scopes: BIP49/BIP84 (m/49'/0'/0', m/84'/0'/0', note that the 380 // coin type is always 0, even for testnet/regtest) and lnd's internal key 381 // scope (m/1017'/<coin_type>'/<account>'), where account is the key family as 382 // defined in `keychain/derivation.go` (currently indices 0 to 9). 383 Accounts []*WatchOnlyAccount `protobuf:"bytes,3,rep,name=accounts,proto3" json:"accounts,omitempty"` 384 } 385 386 func (x *WatchOnly) Reset() { 387 *x = WatchOnly{} 388 if protoimpl.UnsafeEnabled { 389 mi := &file_walletunlocker_proto_msgTypes[4] 390 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 391 ms.StoreMessageInfo(mi) 392 } 393 } 394 395 func (x *WatchOnly) String() string { 396 return protoimpl.X.MessageStringOf(x) 397 } 398 399 func (*WatchOnly) ProtoMessage() {} 400 401 func (x *WatchOnly) ProtoReflect() protoreflect.Message { 402 mi := &file_walletunlocker_proto_msgTypes[4] 403 if protoimpl.UnsafeEnabled && x != nil { 404 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 405 if ms.LoadMessageInfo() == nil { 406 ms.StoreMessageInfo(mi) 407 } 408 return ms 409 } 410 return mi.MessageOf(x) 411 } 412 413 // Deprecated: Use WatchOnly.ProtoReflect.Descriptor instead. 414 func (*WatchOnly) Descriptor() ([]byte, []int) { 415 return file_walletunlocker_proto_rawDescGZIP(), []int{4} 416 } 417 418 func (x *WatchOnly) GetMasterKeyBirthdayTimestamp() uint64 { 419 if x != nil { 420 return x.MasterKeyBirthdayTimestamp 421 } 422 return 0 423 } 424 425 func (x *WatchOnly) GetMasterKeyFingerprint() []byte { 426 if x != nil { 427 return x.MasterKeyFingerprint 428 } 429 return nil 430 } 431 432 func (x *WatchOnly) GetAccounts() []*WatchOnlyAccount { 433 if x != nil { 434 return x.Accounts 435 } 436 return nil 437 } 438 439 type WatchOnlyAccount struct { 440 state protoimpl.MessageState 441 sizeCache protoimpl.SizeCache 442 unknownFields protoimpl.UnknownFields 443 444 // Purpose is the first number in the derivation path, must be either 49, 84 445 // or 1017. 446 Purpose uint32 `protobuf:"varint,1,opt,name=purpose,proto3" json:"purpose,omitempty"` 447 // Coin type is the second number in the derivation path, this is _always_ 0 448 // for purposes 49 and 84. It only needs to be set to 1 for purpose 1017 on 449 // testnet or regtest. 450 CoinType uint32 `protobuf:"varint,2,opt,name=coin_type,json=coinType,proto3" json:"coin_type,omitempty"` 451 // Account is the third number in the derivation path. For purposes 49 and 84 452 // at least the default account (index 0) needs to be created but optional 453 // additional accounts are allowed. For purpose 1017 there needs to be exactly 454 // one account for each of the key families defined in `keychain/derivation.go` 455 // (currently indices 0 to 9) 456 Account uint32 `protobuf:"varint,3,opt,name=account,proto3" json:"account,omitempty"` 457 // The extended public key at depth 3 for the given account. 458 Xpub string `protobuf:"bytes,4,opt,name=xpub,proto3" json:"xpub,omitempty"` 459 } 460 461 func (x *WatchOnlyAccount) Reset() { 462 *x = WatchOnlyAccount{} 463 if protoimpl.UnsafeEnabled { 464 mi := &file_walletunlocker_proto_msgTypes[5] 465 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 466 ms.StoreMessageInfo(mi) 467 } 468 } 469 470 func (x *WatchOnlyAccount) String() string { 471 return protoimpl.X.MessageStringOf(x) 472 } 473 474 func (*WatchOnlyAccount) ProtoMessage() {} 475 476 func (x *WatchOnlyAccount) ProtoReflect() protoreflect.Message { 477 mi := &file_walletunlocker_proto_msgTypes[5] 478 if protoimpl.UnsafeEnabled && x != nil { 479 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 480 if ms.LoadMessageInfo() == nil { 481 ms.StoreMessageInfo(mi) 482 } 483 return ms 484 } 485 return mi.MessageOf(x) 486 } 487 488 // Deprecated: Use WatchOnlyAccount.ProtoReflect.Descriptor instead. 489 func (*WatchOnlyAccount) Descriptor() ([]byte, []int) { 490 return file_walletunlocker_proto_rawDescGZIP(), []int{5} 491 } 492 493 func (x *WatchOnlyAccount) GetPurpose() uint32 { 494 if x != nil { 495 return x.Purpose 496 } 497 return 0 498 } 499 500 func (x *WatchOnlyAccount) GetCoinType() uint32 { 501 if x != nil { 502 return x.CoinType 503 } 504 return 0 505 } 506 507 func (x *WatchOnlyAccount) GetAccount() uint32 { 508 if x != nil { 509 return x.Account 510 } 511 return 0 512 } 513 514 func (x *WatchOnlyAccount) GetXpub() string { 515 if x != nil { 516 return x.Xpub 517 } 518 return "" 519 } 520 521 type UnlockWalletRequest struct { 522 state protoimpl.MessageState 523 sizeCache protoimpl.SizeCache 524 unknownFields protoimpl.UnknownFields 525 526 // wallet_password should be the current valid passphrase for the daemon. This 527 // will be required to decrypt on-disk material that the daemon requires to 528 // function properly. When using REST, this field must be encoded as base64. 529 WalletPassword []byte `protobuf:"bytes,1,opt,name=wallet_password,json=walletPassword,proto3" json:"wallet_password,omitempty"` 530 // recovery_window is an optional argument specifying the address lookahead 531 // when restoring a wallet seed. The recovery window applies to each 532 // individual branch of the BIP44 derivation paths. Supplying a recovery 533 // window of zero indicates that no addresses should be recovered, such after 534 // the first initialization of the wallet. 535 RecoveryWindow int32 `protobuf:"varint,2,opt,name=recovery_window,json=recoveryWindow,proto3" json:"recovery_window,omitempty"` 536 // channel_backups is an optional argument that allows clients to recover the 537 // settled funds within a set of channels. This should be populated if the 538 // user was unable to close out all channels and sweep funds before partial or 539 // total data loss occurred. If specified, then after on-chain recovery of 540 // funds, lnd begin to carry out the data loss recovery protocol in order to 541 // recover the funds in each channel from a remote force closed transaction. 542 ChannelBackups *ChanBackupSnapshot `protobuf:"bytes,3,opt,name=channel_backups,json=channelBackups,proto3" json:"channel_backups,omitempty"` 543 // dcrw_client_key_cert is a key and cert blob generated by dcrwallet used to 544 // authenticate grpc connections to it. 545 DcrwClientKeyCert []byte `protobuf:"bytes,901,opt,name=dcrw_client_key_cert,json=dcrwClientKeyCert,proto3" json:"dcrw_client_key_cert,omitempty"` 546 // stateless_init is an optional argument instructing the daemon NOT to create 547 // any *.macaroon files in its file system. 548 StatelessInit bool `protobuf:"varint,4,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"` 549 } 550 551 func (x *UnlockWalletRequest) Reset() { 552 *x = UnlockWalletRequest{} 553 if protoimpl.UnsafeEnabled { 554 mi := &file_walletunlocker_proto_msgTypes[6] 555 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 556 ms.StoreMessageInfo(mi) 557 } 558 } 559 560 func (x *UnlockWalletRequest) String() string { 561 return protoimpl.X.MessageStringOf(x) 562 } 563 564 func (*UnlockWalletRequest) ProtoMessage() {} 565 566 func (x *UnlockWalletRequest) ProtoReflect() protoreflect.Message { 567 mi := &file_walletunlocker_proto_msgTypes[6] 568 if protoimpl.UnsafeEnabled && x != nil { 569 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 570 if ms.LoadMessageInfo() == nil { 571 ms.StoreMessageInfo(mi) 572 } 573 return ms 574 } 575 return mi.MessageOf(x) 576 } 577 578 // Deprecated: Use UnlockWalletRequest.ProtoReflect.Descriptor instead. 579 func (*UnlockWalletRequest) Descriptor() ([]byte, []int) { 580 return file_walletunlocker_proto_rawDescGZIP(), []int{6} 581 } 582 583 func (x *UnlockWalletRequest) GetWalletPassword() []byte { 584 if x != nil { 585 return x.WalletPassword 586 } 587 return nil 588 } 589 590 func (x *UnlockWalletRequest) GetRecoveryWindow() int32 { 591 if x != nil { 592 return x.RecoveryWindow 593 } 594 return 0 595 } 596 597 func (x *UnlockWalletRequest) GetChannelBackups() *ChanBackupSnapshot { 598 if x != nil { 599 return x.ChannelBackups 600 } 601 return nil 602 } 603 604 func (x *UnlockWalletRequest) GetDcrwClientKeyCert() []byte { 605 if x != nil { 606 return x.DcrwClientKeyCert 607 } 608 return nil 609 } 610 611 func (x *UnlockWalletRequest) GetStatelessInit() bool { 612 if x != nil { 613 return x.StatelessInit 614 } 615 return false 616 } 617 618 type UnlockWalletResponse struct { 619 state protoimpl.MessageState 620 sizeCache protoimpl.SizeCache 621 unknownFields protoimpl.UnknownFields 622 623 // The binary serialized admin macaroon that can be used to access the daemon 624 // after rotating the macaroon root key. If both the stateless_init and 625 // new_macaroon_root_key parameter were set to true, this is the ONLY copy of 626 // the macaroon that was created from the new root key and MUST be stored 627 // safely by the caller. Otherwise a copy of this macaroon is also persisted on 628 // disk by the daemon, together with other macaroon files. 629 AdminMacaroon []byte `protobuf:"bytes,901,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"` 630 } 631 632 func (x *UnlockWalletResponse) Reset() { 633 *x = UnlockWalletResponse{} 634 if protoimpl.UnsafeEnabled { 635 mi := &file_walletunlocker_proto_msgTypes[7] 636 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 637 ms.StoreMessageInfo(mi) 638 } 639 } 640 641 func (x *UnlockWalletResponse) String() string { 642 return protoimpl.X.MessageStringOf(x) 643 } 644 645 func (*UnlockWalletResponse) ProtoMessage() {} 646 647 func (x *UnlockWalletResponse) ProtoReflect() protoreflect.Message { 648 mi := &file_walletunlocker_proto_msgTypes[7] 649 if protoimpl.UnsafeEnabled && x != nil { 650 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 651 if ms.LoadMessageInfo() == nil { 652 ms.StoreMessageInfo(mi) 653 } 654 return ms 655 } 656 return mi.MessageOf(x) 657 } 658 659 // Deprecated: Use UnlockWalletResponse.ProtoReflect.Descriptor instead. 660 func (*UnlockWalletResponse) Descriptor() ([]byte, []int) { 661 return file_walletunlocker_proto_rawDescGZIP(), []int{7} 662 } 663 664 func (x *UnlockWalletResponse) GetAdminMacaroon() []byte { 665 if x != nil { 666 return x.AdminMacaroon 667 } 668 return nil 669 } 670 671 type ChangePasswordRequest struct { 672 state protoimpl.MessageState 673 sizeCache protoimpl.SizeCache 674 unknownFields protoimpl.UnknownFields 675 676 // current_password should be the current valid passphrase used to unlock the 677 // daemon. When using REST, this field must be encoded as base64. 678 CurrentPassword []byte `protobuf:"bytes,1,opt,name=current_password,json=currentPassword,proto3" json:"current_password,omitempty"` 679 // new_password should be the new passphrase that will be needed to unlock the 680 // daemon. When using REST, this field must be encoded as base64. 681 NewPassword []byte `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` 682 // stateless_init is an optional argument instructing the daemon NOT to create 683 // any *.macaroon files in its filesystem. If this parameter is set, then the 684 // admin macaroon returned in the response MUST be stored by the caller of the 685 // RPC as otherwise all access to the daemon will be lost! 686 StatelessInit bool `protobuf:"varint,3,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"` 687 // new_macaroon_root_key is an optional argument instructing the daemon to 688 // rotate the macaroon root key when set to true. This will invalidate all 689 // previously generated macaroons. 690 NewMacaroonRootKey bool `protobuf:"varint,4,opt,name=new_macaroon_root_key,json=newMacaroonRootKey,proto3" json:"new_macaroon_root_key,omitempty"` 691 } 692 693 func (x *ChangePasswordRequest) Reset() { 694 *x = ChangePasswordRequest{} 695 if protoimpl.UnsafeEnabled { 696 mi := &file_walletunlocker_proto_msgTypes[8] 697 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 698 ms.StoreMessageInfo(mi) 699 } 700 } 701 702 func (x *ChangePasswordRequest) String() string { 703 return protoimpl.X.MessageStringOf(x) 704 } 705 706 func (*ChangePasswordRequest) ProtoMessage() {} 707 708 func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message { 709 mi := &file_walletunlocker_proto_msgTypes[8] 710 if protoimpl.UnsafeEnabled && x != nil { 711 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 712 if ms.LoadMessageInfo() == nil { 713 ms.StoreMessageInfo(mi) 714 } 715 return ms 716 } 717 return mi.MessageOf(x) 718 } 719 720 // Deprecated: Use ChangePasswordRequest.ProtoReflect.Descriptor instead. 721 func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { 722 return file_walletunlocker_proto_rawDescGZIP(), []int{8} 723 } 724 725 func (x *ChangePasswordRequest) GetCurrentPassword() []byte { 726 if x != nil { 727 return x.CurrentPassword 728 } 729 return nil 730 } 731 732 func (x *ChangePasswordRequest) GetNewPassword() []byte { 733 if x != nil { 734 return x.NewPassword 735 } 736 return nil 737 } 738 739 func (x *ChangePasswordRequest) GetStatelessInit() bool { 740 if x != nil { 741 return x.StatelessInit 742 } 743 return false 744 } 745 746 func (x *ChangePasswordRequest) GetNewMacaroonRootKey() bool { 747 if x != nil { 748 return x.NewMacaroonRootKey 749 } 750 return false 751 } 752 753 type ChangePasswordResponse struct { 754 state protoimpl.MessageState 755 sizeCache protoimpl.SizeCache 756 unknownFields protoimpl.UnknownFields 757 758 // The binary serialized admin macaroon that can be used to access the daemon 759 // after rotating the macaroon root key. If both the stateless_init and 760 // new_macaroon_root_key parameter were set to true, this is the ONLY copy of 761 // the macaroon that was created from the new root key and MUST be stored 762 // safely by the caller. Otherwise a copy of this macaroon is also persisted on 763 // disk by the daemon, together with other macaroon files. 764 AdminMacaroon []byte `protobuf:"bytes,1,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"` 765 } 766 767 func (x *ChangePasswordResponse) Reset() { 768 *x = ChangePasswordResponse{} 769 if protoimpl.UnsafeEnabled { 770 mi := &file_walletunlocker_proto_msgTypes[9] 771 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 772 ms.StoreMessageInfo(mi) 773 } 774 } 775 776 func (x *ChangePasswordResponse) String() string { 777 return protoimpl.X.MessageStringOf(x) 778 } 779 780 func (*ChangePasswordResponse) ProtoMessage() {} 781 782 func (x *ChangePasswordResponse) ProtoReflect() protoreflect.Message { 783 mi := &file_walletunlocker_proto_msgTypes[9] 784 if protoimpl.UnsafeEnabled && x != nil { 785 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 786 if ms.LoadMessageInfo() == nil { 787 ms.StoreMessageInfo(mi) 788 } 789 return ms 790 } 791 return mi.MessageOf(x) 792 } 793 794 // Deprecated: Use ChangePasswordResponse.ProtoReflect.Descriptor instead. 795 func (*ChangePasswordResponse) Descriptor() ([]byte, []int) { 796 return file_walletunlocker_proto_rawDescGZIP(), []int{9} 797 } 798 799 func (x *ChangePasswordResponse) GetAdminMacaroon() []byte { 800 if x != nil { 801 return x.AdminMacaroon 802 } 803 return nil 804 } 805 806 var File_walletunlocker_proto protoreflect.FileDescriptor 807 808 var file_walletunlocker_proto_rawDesc = []byte{ 809 0x0a, 0x14, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 810 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x1a, 0x0f, 0x6c, 811 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 812 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 813 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x65, 0x7a, 0x65, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x70, 814 0x68, 0x72, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x61, 0x65, 0x7a, 815 0x65, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x12, 0x21, 0x0a, 816 0x0c, 0x73, 0x65, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x18, 0x02, 0x20, 817 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x65, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 818 0x22, 0x6c, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 819 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x5f, 0x73, 0x65, 820 0x65, 0x64, 0x5f, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x01, 0x20, 0x03, 0x28, 821 0x09, 0x52, 0x12, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x53, 0x65, 0x65, 0x64, 0x4d, 0x6e, 0x65, 822 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x69, 0x70, 0x68, 0x65, 823 0x72, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 824 0x65, 0x6e, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x65, 0x64, 0x53, 0x65, 0x65, 0x64, 0x22, 0xe4, 825 0x03, 0x0a, 0x11, 0x49, 0x6e, 0x69, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 826 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x70, 827 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x77, 828 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x30, 0x0a, 829 0x14, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x5f, 0x6d, 0x6e, 0x65, 830 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x63, 0x69, 0x70, 831 0x68, 0x65, 0x72, 0x53, 0x65, 0x65, 0x64, 0x4d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x12, 832 0x2b, 0x0a, 0x11, 0x61, 0x65, 0x7a, 0x65, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 833 0x72, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x61, 0x65, 0x7a, 0x65, 834 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 835 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 836 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x57, 837 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 838 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 839 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 840 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 841 0x65, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 842 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 843 0x08, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x69, 0x74, 844 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x73, 845 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 846 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x65, 0x79, 847 0x12, 0x52, 0x0a, 0x26, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x73, 848 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 849 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 850 0x52, 0x22, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 851 0x4b, 0x65, 0x79, 0x42, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 852 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2f, 0x0a, 0x0a, 0x77, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6f, 0x6e, 853 0x6c, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 854 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x79, 0x52, 0x09, 0x77, 0x61, 0x74, 0x63, 855 0x68, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x3b, 0x0a, 0x12, 0x49, 0x6e, 0x69, 0x74, 0x57, 0x61, 0x6c, 856 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 857 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x18, 0x01, 0x20, 858 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 859 0x6f, 0x6e, 0x22, 0xb9, 0x01, 0x0a, 0x09, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x79, 860 0x12, 0x41, 0x0a, 0x1d, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 861 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 862 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1a, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4b, 863 0x65, 0x79, 0x42, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 864 0x61, 0x6d, 0x70, 0x12, 0x34, 0x0a, 0x16, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 865 0x79, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 866 0x01, 0x28, 0x0c, 0x52, 0x14, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x69, 867 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x08, 0x61, 0x63, 0x63, 868 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x6e, 869 0x72, 0x70, 0x63, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x79, 0x41, 0x63, 0x63, 870 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x77, 871 0x0a, 0x10, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 872 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x18, 0x01, 0x20, 873 0x01, 0x28, 0x0d, 0x52, 0x07, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 874 0x63, 0x6f, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 875 0x08, 0x63, 0x6f, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 876 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 877 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x78, 0x70, 0x75, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 878 0x09, 0x52, 0x04, 0x78, 0x70, 0x75, 0x62, 0x22, 0x84, 0x02, 0x0a, 0x13, 0x55, 0x6e, 0x6c, 0x6f, 879 0x63, 0x6b, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 880 0x27, 0x0a, 0x0f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 881 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 882 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x63, 0x6f, 883 0x76, 0x65, 0x72, 0x79, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 884 0x05, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x57, 0x69, 0x6e, 0x64, 0x6f, 885 0x77, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x62, 0x61, 0x63, 886 0x6b, 0x75, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 887 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x6e, 0x61, 888 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x61, 889 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x63, 0x72, 0x77, 0x5f, 0x63, 0x6c, 890 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x18, 0x85, 0x07, 891 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x64, 0x63, 0x72, 0x77, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 892 0x4b, 0x65, 0x79, 0x43, 0x65, 0x72, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, 893 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 894 0x0d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x22, 0x3e, 895 0x0a, 0x14, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 896 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 897 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x18, 0x85, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 898 0x0d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x22, 0xbf, 899 0x01, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 900 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x75, 0x72, 0x72, 901 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 902 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 903 0x6f, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 904 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x50, 0x61, 905 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6c, 906 0x65, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 907 0x73, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x31, 0x0a, 908 0x15, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 909 0x6f, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x6e, 0x65, 910 0x77, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x52, 0x6f, 0x6f, 0x74, 0x4b, 0x65, 0x79, 911 0x22, 0x3f, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 912 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 913 0x6d, 0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 914 0x28, 0x0c, 0x52, 0x0d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 915 0x6e, 0x32, 0xa5, 0x02, 0x0a, 0x0e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x55, 0x6e, 0x6c, 0x6f, 916 0x63, 0x6b, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x6e, 0x53, 0x65, 0x65, 0x64, 0x12, 917 0x15, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x6e, 0x53, 0x65, 0x65, 0x64, 0x52, 918 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 919 0x65, 0x6e, 0x53, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 920 0x0a, 0x0a, 0x49, 0x6e, 0x69, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x18, 0x2e, 0x6c, 921 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 922 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 923 0x6e, 0x69, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 924 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x61, 0x6c, 0x6c, 0x65, 925 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 926 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 927 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x61, 0x6c, 0x6c, 928 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0e, 0x43, 0x68, 929 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1c, 0x2e, 0x6c, 930 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 931 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6e, 0x72, 932 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 933 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x20, 0x5a, 0x1e, 0x67, 0x69, 0x74, 934 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x63, 0x72, 0x65, 0x64, 0x2f, 0x64, 935 0x63, 0x72, 0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 936 0x74, 0x6f, 0x33, 937 } 938 939 var ( 940 file_walletunlocker_proto_rawDescOnce sync.Once 941 file_walletunlocker_proto_rawDescData = file_walletunlocker_proto_rawDesc 942 ) 943 944 func file_walletunlocker_proto_rawDescGZIP() []byte { 945 file_walletunlocker_proto_rawDescOnce.Do(func() { 946 file_walletunlocker_proto_rawDescData = protoimpl.X.CompressGZIP(file_walletunlocker_proto_rawDescData) 947 }) 948 return file_walletunlocker_proto_rawDescData 949 } 950 951 var file_walletunlocker_proto_msgTypes = make([]protoimpl.MessageInfo, 10) 952 var file_walletunlocker_proto_goTypes = []interface{}{ 953 (*GenSeedRequest)(nil), // 0: lnrpc.GenSeedRequest 954 (*GenSeedResponse)(nil), // 1: lnrpc.GenSeedResponse 955 (*InitWalletRequest)(nil), // 2: lnrpc.InitWalletRequest 956 (*InitWalletResponse)(nil), // 3: lnrpc.InitWalletResponse 957 (*WatchOnly)(nil), // 4: lnrpc.WatchOnly 958 (*WatchOnlyAccount)(nil), // 5: lnrpc.WatchOnlyAccount 959 (*UnlockWalletRequest)(nil), // 6: lnrpc.UnlockWalletRequest 960 (*UnlockWalletResponse)(nil), // 7: lnrpc.UnlockWalletResponse 961 (*ChangePasswordRequest)(nil), // 8: lnrpc.ChangePasswordRequest 962 (*ChangePasswordResponse)(nil), // 9: lnrpc.ChangePasswordResponse 963 (*ChanBackupSnapshot)(nil), // 10: lnrpc.ChanBackupSnapshot 964 } 965 var file_walletunlocker_proto_depIdxs = []int32{ 966 10, // 0: lnrpc.InitWalletRequest.channel_backups:type_name -> lnrpc.ChanBackupSnapshot 967 4, // 1: lnrpc.InitWalletRequest.watch_only:type_name -> lnrpc.WatchOnly 968 5, // 2: lnrpc.WatchOnly.accounts:type_name -> lnrpc.WatchOnlyAccount 969 10, // 3: lnrpc.UnlockWalletRequest.channel_backups:type_name -> lnrpc.ChanBackupSnapshot 970 0, // 4: lnrpc.WalletUnlocker.GenSeed:input_type -> lnrpc.GenSeedRequest 971 2, // 5: lnrpc.WalletUnlocker.InitWallet:input_type -> lnrpc.InitWalletRequest 972 6, // 6: lnrpc.WalletUnlocker.UnlockWallet:input_type -> lnrpc.UnlockWalletRequest 973 8, // 7: lnrpc.WalletUnlocker.ChangePassword:input_type -> lnrpc.ChangePasswordRequest 974 1, // 8: lnrpc.WalletUnlocker.GenSeed:output_type -> lnrpc.GenSeedResponse 975 3, // 9: lnrpc.WalletUnlocker.InitWallet:output_type -> lnrpc.InitWalletResponse 976 7, // 10: lnrpc.WalletUnlocker.UnlockWallet:output_type -> lnrpc.UnlockWalletResponse 977 9, // 11: lnrpc.WalletUnlocker.ChangePassword:output_type -> lnrpc.ChangePasswordResponse 978 8, // [8:12] is the sub-list for method output_type 979 4, // [4:8] is the sub-list for method input_type 980 4, // [4:4] is the sub-list for extension type_name 981 4, // [4:4] is the sub-list for extension extendee 982 0, // [0:4] is the sub-list for field type_name 983 } 984 985 func init() { file_walletunlocker_proto_init() } 986 func file_walletunlocker_proto_init() { 987 if File_walletunlocker_proto != nil { 988 return 989 } 990 file_lightning_proto_init() 991 if !protoimpl.UnsafeEnabled { 992 file_walletunlocker_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 993 switch v := v.(*GenSeedRequest); i { 994 case 0: 995 return &v.state 996 case 1: 997 return &v.sizeCache 998 case 2: 999 return &v.unknownFields 1000 default: 1001 return nil 1002 } 1003 } 1004 file_walletunlocker_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 1005 switch v := v.(*GenSeedResponse); i { 1006 case 0: 1007 return &v.state 1008 case 1: 1009 return &v.sizeCache 1010 case 2: 1011 return &v.unknownFields 1012 default: 1013 return nil 1014 } 1015 } 1016 file_walletunlocker_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 1017 switch v := v.(*InitWalletRequest); i { 1018 case 0: 1019 return &v.state 1020 case 1: 1021 return &v.sizeCache 1022 case 2: 1023 return &v.unknownFields 1024 default: 1025 return nil 1026 } 1027 } 1028 file_walletunlocker_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 1029 switch v := v.(*InitWalletResponse); i { 1030 case 0: 1031 return &v.state 1032 case 1: 1033 return &v.sizeCache 1034 case 2: 1035 return &v.unknownFields 1036 default: 1037 return nil 1038 } 1039 } 1040 file_walletunlocker_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { 1041 switch v := v.(*WatchOnly); i { 1042 case 0: 1043 return &v.state 1044 case 1: 1045 return &v.sizeCache 1046 case 2: 1047 return &v.unknownFields 1048 default: 1049 return nil 1050 } 1051 } 1052 file_walletunlocker_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { 1053 switch v := v.(*WatchOnlyAccount); i { 1054 case 0: 1055 return &v.state 1056 case 1: 1057 return &v.sizeCache 1058 case 2: 1059 return &v.unknownFields 1060 default: 1061 return nil 1062 } 1063 } 1064 file_walletunlocker_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { 1065 switch v := v.(*UnlockWalletRequest); i { 1066 case 0: 1067 return &v.state 1068 case 1: 1069 return &v.sizeCache 1070 case 2: 1071 return &v.unknownFields 1072 default: 1073 return nil 1074 } 1075 } 1076 file_walletunlocker_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { 1077 switch v := v.(*UnlockWalletResponse); i { 1078 case 0: 1079 return &v.state 1080 case 1: 1081 return &v.sizeCache 1082 case 2: 1083 return &v.unknownFields 1084 default: 1085 return nil 1086 } 1087 } 1088 file_walletunlocker_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { 1089 switch v := v.(*ChangePasswordRequest); i { 1090 case 0: 1091 return &v.state 1092 case 1: 1093 return &v.sizeCache 1094 case 2: 1095 return &v.unknownFields 1096 default: 1097 return nil 1098 } 1099 } 1100 file_walletunlocker_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { 1101 switch v := v.(*ChangePasswordResponse); i { 1102 case 0: 1103 return &v.state 1104 case 1: 1105 return &v.sizeCache 1106 case 2: 1107 return &v.unknownFields 1108 default: 1109 return nil 1110 } 1111 } 1112 } 1113 type x struct{} 1114 out := protoimpl.TypeBuilder{ 1115 File: protoimpl.DescBuilder{ 1116 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 1117 RawDescriptor: file_walletunlocker_proto_rawDesc, 1118 NumEnums: 0, 1119 NumMessages: 10, 1120 NumExtensions: 0, 1121 NumServices: 1, 1122 }, 1123 GoTypes: file_walletunlocker_proto_goTypes, 1124 DependencyIndexes: file_walletunlocker_proto_depIdxs, 1125 MessageInfos: file_walletunlocker_proto_msgTypes, 1126 }.Build() 1127 File_walletunlocker_proto = out.File 1128 file_walletunlocker_proto_rawDesc = nil 1129 file_walletunlocker_proto_goTypes = nil 1130 file_walletunlocker_proto_depIdxs = nil 1131 } 1132 1133 // Reference imports to suppress errors if they are not otherwise used. 1134 var _ context.Context 1135 var _ grpc.ClientConnInterface 1136 1137 // This is a compile-time assertion to ensure that this generated file 1138 // is compatible with the grpc package it is being compiled against. 1139 const _ = grpc.SupportPackageIsVersion6 1140 1141 // WalletUnlockerClient is the client API for WalletUnlocker service. 1142 // 1143 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 1144 type WalletUnlockerClient interface { 1145 // GenSeed is the first method that should be used to instantiate a new lnd 1146 // instance. This method allows a caller to generate a new aezeed cipher seed 1147 // given an optional passphrase. If provided, the passphrase will be necessary 1148 // to decrypt the cipherseed to expose the internal wallet seed. 1149 // 1150 // Once the cipherseed is obtained and verified by the user, the InitWallet 1151 // method should be used to commit the newly generated seed, and create the 1152 // wallet. 1153 GenSeed(ctx context.Context, in *GenSeedRequest, opts ...grpc.CallOption) (*GenSeedResponse, error) 1154 // InitWallet is used when lnd is starting up for the first time to fully 1155 // initialize the daemon and its internal wallet. At the very least a wallet 1156 // password must be provided. This will be used to encrypt sensitive material 1157 // on disk. 1158 // 1159 // In the case of a recovery scenario, the user can also specify their aezeed 1160 // mnemonic and passphrase. If set, then the daemon will use this prior state 1161 // to initialize its internal wallet. 1162 // 1163 // Alternatively, this can be used along with the GenSeed RPC to obtain a 1164 // seed, then present it to the user. Once it has been verified by the user, 1165 // the seed can be fed into this RPC in order to commit the new wallet. 1166 InitWallet(ctx context.Context, in *InitWalletRequest, opts ...grpc.CallOption) (*InitWalletResponse, error) 1167 // lncli: `unlock` 1168 // UnlockWallet is used at startup of lnd to provide a password to unlock 1169 // the wallet database. 1170 UnlockWallet(ctx context.Context, in *UnlockWalletRequest, opts ...grpc.CallOption) (*UnlockWalletResponse, error) 1171 // lncli: `changepassword` 1172 // ChangePassword changes the password of the encrypted wallet. This will 1173 // automatically unlock the wallet database if successful. 1174 ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) 1175 } 1176 1177 type walletUnlockerClient struct { 1178 cc grpc.ClientConnInterface 1179 } 1180 1181 func NewWalletUnlockerClient(cc grpc.ClientConnInterface) WalletUnlockerClient { 1182 return &walletUnlockerClient{cc} 1183 } 1184 1185 func (c *walletUnlockerClient) GenSeed(ctx context.Context, in *GenSeedRequest, opts ...grpc.CallOption) (*GenSeedResponse, error) { 1186 out := new(GenSeedResponse) 1187 err := c.cc.Invoke(ctx, "/lnrpc.WalletUnlocker/GenSeed", in, out, opts...) 1188 if err != nil { 1189 return nil, err 1190 } 1191 return out, nil 1192 } 1193 1194 func (c *walletUnlockerClient) InitWallet(ctx context.Context, in *InitWalletRequest, opts ...grpc.CallOption) (*InitWalletResponse, error) { 1195 out := new(InitWalletResponse) 1196 err := c.cc.Invoke(ctx, "/lnrpc.WalletUnlocker/InitWallet", in, out, opts...) 1197 if err != nil { 1198 return nil, err 1199 } 1200 return out, nil 1201 } 1202 1203 func (c *walletUnlockerClient) UnlockWallet(ctx context.Context, in *UnlockWalletRequest, opts ...grpc.CallOption) (*UnlockWalletResponse, error) { 1204 out := new(UnlockWalletResponse) 1205 err := c.cc.Invoke(ctx, "/lnrpc.WalletUnlocker/UnlockWallet", in, out, opts...) 1206 if err != nil { 1207 return nil, err 1208 } 1209 return out, nil 1210 } 1211 1212 func (c *walletUnlockerClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) { 1213 out := new(ChangePasswordResponse) 1214 err := c.cc.Invoke(ctx, "/lnrpc.WalletUnlocker/ChangePassword", in, out, opts...) 1215 if err != nil { 1216 return nil, err 1217 } 1218 return out, nil 1219 } 1220 1221 // WalletUnlockerServer is the server API for WalletUnlocker service. 1222 type WalletUnlockerServer interface { 1223 // GenSeed is the first method that should be used to instantiate a new lnd 1224 // instance. This method allows a caller to generate a new aezeed cipher seed 1225 // given an optional passphrase. If provided, the passphrase will be necessary 1226 // to decrypt the cipherseed to expose the internal wallet seed. 1227 // 1228 // Once the cipherseed is obtained and verified by the user, the InitWallet 1229 // method should be used to commit the newly generated seed, and create the 1230 // wallet. 1231 GenSeed(context.Context, *GenSeedRequest) (*GenSeedResponse, error) 1232 // InitWallet is used when lnd is starting up for the first time to fully 1233 // initialize the daemon and its internal wallet. At the very least a wallet 1234 // password must be provided. This will be used to encrypt sensitive material 1235 // on disk. 1236 // 1237 // In the case of a recovery scenario, the user can also specify their aezeed 1238 // mnemonic and passphrase. If set, then the daemon will use this prior state 1239 // to initialize its internal wallet. 1240 // 1241 // Alternatively, this can be used along with the GenSeed RPC to obtain a 1242 // seed, then present it to the user. Once it has been verified by the user, 1243 // the seed can be fed into this RPC in order to commit the new wallet. 1244 InitWallet(context.Context, *InitWalletRequest) (*InitWalletResponse, error) 1245 // lncli: `unlock` 1246 // UnlockWallet is used at startup of lnd to provide a password to unlock 1247 // the wallet database. 1248 UnlockWallet(context.Context, *UnlockWalletRequest) (*UnlockWalletResponse, error) 1249 // lncli: `changepassword` 1250 // ChangePassword changes the password of the encrypted wallet. This will 1251 // automatically unlock the wallet database if successful. 1252 ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error) 1253 } 1254 1255 // UnimplementedWalletUnlockerServer can be embedded to have forward compatible implementations. 1256 type UnimplementedWalletUnlockerServer struct { 1257 } 1258 1259 func (*UnimplementedWalletUnlockerServer) GenSeed(context.Context, *GenSeedRequest) (*GenSeedResponse, error) { 1260 return nil, status.Errorf(codes.Unimplemented, "method GenSeed not implemented") 1261 } 1262 func (*UnimplementedWalletUnlockerServer) InitWallet(context.Context, *InitWalletRequest) (*InitWalletResponse, error) { 1263 return nil, status.Errorf(codes.Unimplemented, "method InitWallet not implemented") 1264 } 1265 func (*UnimplementedWalletUnlockerServer) UnlockWallet(context.Context, *UnlockWalletRequest) (*UnlockWalletResponse, error) { 1266 return nil, status.Errorf(codes.Unimplemented, "method UnlockWallet not implemented") 1267 } 1268 func (*UnimplementedWalletUnlockerServer) ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error) { 1269 return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented") 1270 } 1271 1272 func RegisterWalletUnlockerServer(s *grpc.Server, srv WalletUnlockerServer) { 1273 s.RegisterService(&_WalletUnlocker_serviceDesc, srv) 1274 } 1275 1276 func _WalletUnlocker_GenSeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1277 in := new(GenSeedRequest) 1278 if err := dec(in); err != nil { 1279 return nil, err 1280 } 1281 if interceptor == nil { 1282 return srv.(WalletUnlockerServer).GenSeed(ctx, in) 1283 } 1284 info := &grpc.UnaryServerInfo{ 1285 Server: srv, 1286 FullMethod: "/lnrpc.WalletUnlocker/GenSeed", 1287 } 1288 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1289 return srv.(WalletUnlockerServer).GenSeed(ctx, req.(*GenSeedRequest)) 1290 } 1291 return interceptor(ctx, in, info, handler) 1292 } 1293 1294 func _WalletUnlocker_InitWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1295 in := new(InitWalletRequest) 1296 if err := dec(in); err != nil { 1297 return nil, err 1298 } 1299 if interceptor == nil { 1300 return srv.(WalletUnlockerServer).InitWallet(ctx, in) 1301 } 1302 info := &grpc.UnaryServerInfo{ 1303 Server: srv, 1304 FullMethod: "/lnrpc.WalletUnlocker/InitWallet", 1305 } 1306 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1307 return srv.(WalletUnlockerServer).InitWallet(ctx, req.(*InitWalletRequest)) 1308 } 1309 return interceptor(ctx, in, info, handler) 1310 } 1311 1312 func _WalletUnlocker_UnlockWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1313 in := new(UnlockWalletRequest) 1314 if err := dec(in); err != nil { 1315 return nil, err 1316 } 1317 if interceptor == nil { 1318 return srv.(WalletUnlockerServer).UnlockWallet(ctx, in) 1319 } 1320 info := &grpc.UnaryServerInfo{ 1321 Server: srv, 1322 FullMethod: "/lnrpc.WalletUnlocker/UnlockWallet", 1323 } 1324 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1325 return srv.(WalletUnlockerServer).UnlockWallet(ctx, req.(*UnlockWalletRequest)) 1326 } 1327 return interceptor(ctx, in, info, handler) 1328 } 1329 1330 func _WalletUnlocker_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1331 in := new(ChangePasswordRequest) 1332 if err := dec(in); err != nil { 1333 return nil, err 1334 } 1335 if interceptor == nil { 1336 return srv.(WalletUnlockerServer).ChangePassword(ctx, in) 1337 } 1338 info := &grpc.UnaryServerInfo{ 1339 Server: srv, 1340 FullMethod: "/lnrpc.WalletUnlocker/ChangePassword", 1341 } 1342 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1343 return srv.(WalletUnlockerServer).ChangePassword(ctx, req.(*ChangePasswordRequest)) 1344 } 1345 return interceptor(ctx, in, info, handler) 1346 } 1347 1348 var _WalletUnlocker_serviceDesc = grpc.ServiceDesc{ 1349 ServiceName: "lnrpc.WalletUnlocker", 1350 HandlerType: (*WalletUnlockerServer)(nil), 1351 Methods: []grpc.MethodDesc{ 1352 { 1353 MethodName: "GenSeed", 1354 Handler: _WalletUnlocker_GenSeed_Handler, 1355 }, 1356 { 1357 MethodName: "InitWallet", 1358 Handler: _WalletUnlocker_InitWallet_Handler, 1359 }, 1360 { 1361 MethodName: "UnlockWallet", 1362 Handler: _WalletUnlocker_UnlockWallet_Handler, 1363 }, 1364 { 1365 MethodName: "ChangePassword", 1366 Handler: _WalletUnlocker_ChangePassword_Handler, 1367 }, 1368 }, 1369 Streams: []grpc.StreamDesc{}, 1370 Metadata: "walletunlocker.proto", 1371 }