2020-04-02 13:07:05 +03:00
|
|
|
// 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"
|
2020-05-28 14:07:31 +03:00
|
|
|
codes "google.golang.org/grpc/codes"
|
|
|
|
status "google.golang.org/grpc/status"
|
2020-04-02 13:07:05 +03:00
|
|
|
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 {
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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 {
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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 {
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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.
|
2020-10-06 18:23:26 +03:00
|
|
|
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:"-"`
|
2020-04-02 13:07:05 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2020-10-06 18:23:26 +03:00
|
|
|
func (m *InitWalletRequest) GetStatelessInit() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.StatelessInit
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2020-04-02 13:07:05 +03:00
|
|
|
type InitWalletResponse struct {
|
2020-10-06 18:23:26 +03:00
|
|
|
//
|
|
|
|
//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"`
|
2020-04-02 13:07:05 +03:00
|
|
|
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
|
|
|
|
|
2020-10-06 18:23:26 +03:00
|
|
|
func (m *InitWalletResponse) GetAdminMacaroon() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.AdminMacaroon
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-04-02 13:07:05 +03:00
|
|
|
type UnlockWalletRequest struct {
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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.
|
2020-10-06 18:23:26 +03:00
|
|
|
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:"-"`
|
2020-04-02 13:07:05 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2020-10-06 18:23:26 +03:00
|
|
|
func (m *UnlockWalletRequest) GetStatelessInit() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.StatelessInit
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2020-04-02 13:07:05 +03:00
|
|
|
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 {
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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.
|
2020-10-06 18:23:26 +03:00
|
|
|
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"`
|
2020-04-02 13:07:05 +03:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2020-10-06 18:23:26 +03:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2020-04-02 13:07:05 +03:00
|
|
|
type ChangePasswordResponse struct {
|
2020-10-06 18:23:26 +03:00
|
|
|
//
|
|
|
|
//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"`
|
2020-04-02 13:07:05 +03:00
|
|
|
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
|
|
|
|
|
2020-10-06 18:23:26 +03:00
|
|
|
func (m *ChangePasswordResponse) GetAdminMacaroon() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.AdminMacaroon
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-04-02 13:07:05 +03:00
|
|
|
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{
|
2020-10-06 18:23:26 +03:00
|
|
|
// 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, 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, 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,
|
2020-04-02 13:07:05 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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 {
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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)
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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)
|
2020-05-06 17:51:14 +03:00
|
|
|
// lncli: `unlock`
|
2020-04-02 13:07:05 +03:00
|
|
|
//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)
|
2020-05-06 17:51:14 +03:00
|
|
|
// lncli: `changepassword`
|
2020-04-02 13:07:05 +03:00
|
|
|
//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 {
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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)
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-04-02 13:07:05 +03:00
|
|
|
//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)
|
2020-05-06 17:51:14 +03:00
|
|
|
// lncli: `unlock`
|
2020-04-02 13:07:05 +03:00
|
|
|
//UnlockWallet is used at startup of lnd to provide a password to unlock
|
|
|
|
//the wallet database.
|
|
|
|
UnlockWallet(context.Context, *UnlockWalletRequest) (*UnlockWalletResponse, error)
|
2020-05-06 17:51:14 +03:00
|
|
|
// lncli: `changepassword`
|
2020-04-02 13:07:05 +03:00
|
|
|
//ChangePassword changes the password of the encrypted wallet. This will
|
|
|
|
//automatically unlock the wallet database if successful.
|
|
|
|
ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error)
|
|
|
|
}
|
|
|
|
|
2020-05-28 14:07:31 +03:00
|
|
|
// 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")
|
|
|
|
}
|
|
|
|
|
2020-04-02 13:07:05 +03:00
|
|
|
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",
|
|
|
|
}
|