• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 13412100018

19 Feb 2025 12:05PM UTC coverage: 44.914% (-13.9%) from 58.794%
13412100018

Pull #9521

github

web-flow
Merge 861d6970e into 0e8786348
Pull Request #9521: unit: remove GOACC, use Go 1.20 native coverage functionality

101023 of 224923 relevant lines covered (44.91%)

19479.4 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lnrpc/walletunlocker_grpc.pb.go
1
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2

3
package lnrpc
4

5
import (
6
        context "context"
7
        grpc "google.golang.org/grpc"
8
        codes "google.golang.org/grpc/codes"
9
        status "google.golang.org/grpc/status"
10
)
11

12
// This is a compile-time assertion to ensure that this generated file
13
// is compatible with the grpc package it is being compiled against.
14
// Requires gRPC-Go v1.32.0 or later.
15
const _ = grpc.SupportPackageIsVersion7
16

17
// WalletUnlockerClient is the client API for WalletUnlocker service.
18
//
19
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
20
type WalletUnlockerClient interface {
21
        // GenSeed is the first method that should be used to instantiate a new lnd
22
        // instance. This method allows a caller to generate a new aezeed cipher seed
23
        // given an optional passphrase. If provided, the passphrase will be necessary
24
        // to decrypt the cipherseed to expose the internal wallet seed.
25
        //
26
        // Once the cipherseed is obtained and verified by the user, the InitWallet
27
        // method should be used to commit the newly generated seed, and create the
28
        // wallet.
29
        GenSeed(ctx context.Context, in *GenSeedRequest, opts ...grpc.CallOption) (*GenSeedResponse, error)
30
        // InitWallet is used when lnd is starting up for the first time to fully
31
        // initialize the daemon and its internal wallet. At the very least a wallet
32
        // password must be provided. This will be used to encrypt sensitive material
33
        // on disk.
34
        //
35
        // In the case of a recovery scenario, the user can also specify their aezeed
36
        // mnemonic and passphrase. If set, then the daemon will use this prior state
37
        // to initialize its internal wallet.
38
        //
39
        // Alternatively, this can be used along with the GenSeed RPC to obtain a
40
        // seed, then present it to the user. Once it has been verified by the user,
41
        // the seed can be fed into this RPC in order to commit the new wallet.
42
        InitWallet(ctx context.Context, in *InitWalletRequest, opts ...grpc.CallOption) (*InitWalletResponse, error)
43
        // lncli: `unlock`
44
        // UnlockWallet is used at startup of lnd to provide a password to unlock
45
        // the wallet database.
46
        UnlockWallet(ctx context.Context, in *UnlockWalletRequest, opts ...grpc.CallOption) (*UnlockWalletResponse, error)
47
        // lncli: `changepassword`
48
        // ChangePassword changes the password of the encrypted wallet. This will
49
        // automatically unlock the wallet database if successful.
50
        ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error)
51
}
52

53
type walletUnlockerClient struct {
54
        cc grpc.ClientConnInterface
55
}
56

57
func NewWalletUnlockerClient(cc grpc.ClientConnInterface) WalletUnlockerClient {
×
58
        return &walletUnlockerClient{cc}
×
59
}
×
60

61
func (c *walletUnlockerClient) GenSeed(ctx context.Context, in *GenSeedRequest, opts ...grpc.CallOption) (*GenSeedResponse, error) {
×
62
        out := new(GenSeedResponse)
×
63
        err := c.cc.Invoke(ctx, "/lnrpc.WalletUnlocker/GenSeed", in, out, opts...)
×
64
        if err != nil {
×
65
                return nil, err
×
66
        }
×
67
        return out, nil
×
68
}
69

70
func (c *walletUnlockerClient) InitWallet(ctx context.Context, in *InitWalletRequest, opts ...grpc.CallOption) (*InitWalletResponse, error) {
×
71
        out := new(InitWalletResponse)
×
72
        err := c.cc.Invoke(ctx, "/lnrpc.WalletUnlocker/InitWallet", in, out, opts...)
×
73
        if err != nil {
×
74
                return nil, err
×
75
        }
×
76
        return out, nil
×
77
}
78

79
func (c *walletUnlockerClient) UnlockWallet(ctx context.Context, in *UnlockWalletRequest, opts ...grpc.CallOption) (*UnlockWalletResponse, error) {
×
80
        out := new(UnlockWalletResponse)
×
81
        err := c.cc.Invoke(ctx, "/lnrpc.WalletUnlocker/UnlockWallet", in, out, opts...)
×
82
        if err != nil {
×
83
                return nil, err
×
84
        }
×
85
        return out, nil
×
86
}
87

88
func (c *walletUnlockerClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) {
×
89
        out := new(ChangePasswordResponse)
×
90
        err := c.cc.Invoke(ctx, "/lnrpc.WalletUnlocker/ChangePassword", in, out, opts...)
×
91
        if err != nil {
×
92
                return nil, err
×
93
        }
×
94
        return out, nil
×
95
}
96

97
// WalletUnlockerServer is the server API for WalletUnlocker service.
98
// All implementations must embed UnimplementedWalletUnlockerServer
99
// for forward compatibility
100
type WalletUnlockerServer interface {
101
        // GenSeed is the first method that should be used to instantiate a new lnd
102
        // instance. This method allows a caller to generate a new aezeed cipher seed
103
        // given an optional passphrase. If provided, the passphrase will be necessary
104
        // to decrypt the cipherseed to expose the internal wallet seed.
105
        //
106
        // Once the cipherseed is obtained and verified by the user, the InitWallet
107
        // method should be used to commit the newly generated seed, and create the
108
        // wallet.
109
        GenSeed(context.Context, *GenSeedRequest) (*GenSeedResponse, error)
110
        // InitWallet is used when lnd is starting up for the first time to fully
111
        // initialize the daemon and its internal wallet. At the very least a wallet
112
        // password must be provided. This will be used to encrypt sensitive material
113
        // on disk.
114
        //
115
        // In the case of a recovery scenario, the user can also specify their aezeed
116
        // mnemonic and passphrase. If set, then the daemon will use this prior state
117
        // to initialize its internal wallet.
118
        //
119
        // Alternatively, this can be used along with the GenSeed RPC to obtain a
120
        // seed, then present it to the user. Once it has been verified by the user,
121
        // the seed can be fed into this RPC in order to commit the new wallet.
122
        InitWallet(context.Context, *InitWalletRequest) (*InitWalletResponse, error)
123
        // lncli: `unlock`
124
        // UnlockWallet is used at startup of lnd to provide a password to unlock
125
        // the wallet database.
126
        UnlockWallet(context.Context, *UnlockWalletRequest) (*UnlockWalletResponse, error)
127
        // lncli: `changepassword`
128
        // ChangePassword changes the password of the encrypted wallet. This will
129
        // automatically unlock the wallet database if successful.
130
        ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error)
131
        mustEmbedUnimplementedWalletUnlockerServer()
132
}
133

134
// UnimplementedWalletUnlockerServer must be embedded to have forward compatible implementations.
135
type UnimplementedWalletUnlockerServer struct {
136
}
137

138
func (UnimplementedWalletUnlockerServer) GenSeed(context.Context, *GenSeedRequest) (*GenSeedResponse, error) {
×
139
        return nil, status.Errorf(codes.Unimplemented, "method GenSeed not implemented")
×
140
}
×
141
func (UnimplementedWalletUnlockerServer) InitWallet(context.Context, *InitWalletRequest) (*InitWalletResponse, error) {
×
142
        return nil, status.Errorf(codes.Unimplemented, "method InitWallet not implemented")
×
143
}
×
144
func (UnimplementedWalletUnlockerServer) UnlockWallet(context.Context, *UnlockWalletRequest) (*UnlockWalletResponse, error) {
×
145
        return nil, status.Errorf(codes.Unimplemented, "method UnlockWallet not implemented")
×
146
}
×
147
func (UnimplementedWalletUnlockerServer) ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error) {
×
148
        return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented")
×
149
}
×
150
func (UnimplementedWalletUnlockerServer) mustEmbedUnimplementedWalletUnlockerServer() {}
×
151

152
// UnsafeWalletUnlockerServer may be embedded to opt out of forward compatibility for this service.
153
// Use of this interface is not recommended, as added methods to WalletUnlockerServer will
154
// result in compilation errors.
155
type UnsafeWalletUnlockerServer interface {
156
        mustEmbedUnimplementedWalletUnlockerServer()
157
}
158

159
func RegisterWalletUnlockerServer(s grpc.ServiceRegistrar, srv WalletUnlockerServer) {
×
160
        s.RegisterService(&WalletUnlocker_ServiceDesc, srv)
×
161
}
×
162

163
func _WalletUnlocker_GenSeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
164
        in := new(GenSeedRequest)
×
165
        if err := dec(in); err != nil {
×
166
                return nil, err
×
167
        }
×
168
        if interceptor == nil {
×
169
                return srv.(WalletUnlockerServer).GenSeed(ctx, in)
×
170
        }
×
171
        info := &grpc.UnaryServerInfo{
×
172
                Server:     srv,
×
173
                FullMethod: "/lnrpc.WalletUnlocker/GenSeed",
×
174
        }
×
175
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
176
                return srv.(WalletUnlockerServer).GenSeed(ctx, req.(*GenSeedRequest))
×
177
        }
×
178
        return interceptor(ctx, in, info, handler)
×
179
}
180

181
func _WalletUnlocker_InitWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
182
        in := new(InitWalletRequest)
×
183
        if err := dec(in); err != nil {
×
184
                return nil, err
×
185
        }
×
186
        if interceptor == nil {
×
187
                return srv.(WalletUnlockerServer).InitWallet(ctx, in)
×
188
        }
×
189
        info := &grpc.UnaryServerInfo{
×
190
                Server:     srv,
×
191
                FullMethod: "/lnrpc.WalletUnlocker/InitWallet",
×
192
        }
×
193
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
194
                return srv.(WalletUnlockerServer).InitWallet(ctx, req.(*InitWalletRequest))
×
195
        }
×
196
        return interceptor(ctx, in, info, handler)
×
197
}
198

199
func _WalletUnlocker_UnlockWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
200
        in := new(UnlockWalletRequest)
×
201
        if err := dec(in); err != nil {
×
202
                return nil, err
×
203
        }
×
204
        if interceptor == nil {
×
205
                return srv.(WalletUnlockerServer).UnlockWallet(ctx, in)
×
206
        }
×
207
        info := &grpc.UnaryServerInfo{
×
208
                Server:     srv,
×
209
                FullMethod: "/lnrpc.WalletUnlocker/UnlockWallet",
×
210
        }
×
211
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
212
                return srv.(WalletUnlockerServer).UnlockWallet(ctx, req.(*UnlockWalletRequest))
×
213
        }
×
214
        return interceptor(ctx, in, info, handler)
×
215
}
216

217
func _WalletUnlocker_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
218
        in := new(ChangePasswordRequest)
×
219
        if err := dec(in); err != nil {
×
220
                return nil, err
×
221
        }
×
222
        if interceptor == nil {
×
223
                return srv.(WalletUnlockerServer).ChangePassword(ctx, in)
×
224
        }
×
225
        info := &grpc.UnaryServerInfo{
×
226
                Server:     srv,
×
227
                FullMethod: "/lnrpc.WalletUnlocker/ChangePassword",
×
228
        }
×
229
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
230
                return srv.(WalletUnlockerServer).ChangePassword(ctx, req.(*ChangePasswordRequest))
×
231
        }
×
232
        return interceptor(ctx, in, info, handler)
×
233
}
234

235
// WalletUnlocker_ServiceDesc is the grpc.ServiceDesc for WalletUnlocker service.
236
// It's only intended for direct use with grpc.RegisterService,
237
// and not to be introspected or modified (even as a copy)
238
var WalletUnlocker_ServiceDesc = grpc.ServiceDesc{
239
        ServiceName: "lnrpc.WalletUnlocker",
240
        HandlerType: (*WalletUnlockerServer)(nil),
241
        Methods: []grpc.MethodDesc{
242
                {
243
                        MethodName: "GenSeed",
244
                        Handler:    _WalletUnlocker_GenSeed_Handler,
245
                },
246
                {
247
                        MethodName: "InitWallet",
248
                        Handler:    _WalletUnlocker_InitWallet_Handler,
249
                },
250
                {
251
                        MethodName: "UnlockWallet",
252
                        Handler:    _WalletUnlocker_UnlockWallet_Handler,
253
                },
254
                {
255
                        MethodName: "ChangePassword",
256
                        Handler:    _WalletUnlocker_ChangePassword_Handler,
257
                },
258
        },
259
        Streams:  []grpc.StreamDesc{},
260
        Metadata: "walletunlocker.proto",
261
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc