-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathserver_grpc.pb.go
763 lines (699 loc) · 29.5 KB
/
server_grpc.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package swapserverrpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// SwapServerClient is the client API for SwapServer service.
//
// 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.
type SwapServerClient interface {
LoopOutTerms(ctx context.Context, in *ServerLoopOutTermsRequest, opts ...grpc.CallOption) (*ServerLoopOutTerms, error)
NewLoopOutSwap(ctx context.Context, in *ServerLoopOutRequest, opts ...grpc.CallOption) (*ServerLoopOutResponse, error)
LoopOutPushPreimage(ctx context.Context, in *ServerLoopOutPushPreimageRequest, opts ...grpc.CallOption) (*ServerLoopOutPushPreimageResponse, error)
LoopOutQuote(ctx context.Context, in *ServerLoopOutQuoteRequest, opts ...grpc.CallOption) (*ServerLoopOutQuote, error)
LoopInTerms(ctx context.Context, in *ServerLoopInTermsRequest, opts ...grpc.CallOption) (*ServerLoopInTerms, error)
NewLoopInSwap(ctx context.Context, in *ServerLoopInRequest, opts ...grpc.CallOption) (*ServerLoopInResponse, error)
LoopInQuote(ctx context.Context, in *ServerLoopInQuoteRequest, opts ...grpc.CallOption) (*ServerLoopInQuoteResponse, error)
SubscribeLoopOutUpdates(ctx context.Context, in *SubscribeUpdatesRequest, opts ...grpc.CallOption) (SwapServer_SubscribeLoopOutUpdatesClient, error)
SubscribeLoopInUpdates(ctx context.Context, in *SubscribeUpdatesRequest, opts ...grpc.CallOption) (SwapServer_SubscribeLoopInUpdatesClient, error)
CancelLoopOutSwap(ctx context.Context, in *CancelLoopOutSwapRequest, opts ...grpc.CallOption) (*CancelLoopOutSwapResponse, error)
Probe(ctx context.Context, in *ServerProbeRequest, opts ...grpc.CallOption) (*ServerProbeResponse, error)
RecommendRoutingPlugin(ctx context.Context, in *RecommendRoutingPluginReq, opts ...grpc.CallOption) (*RecommendRoutingPluginRes, error)
ReportRoutingResult(ctx context.Context, in *ReportRoutingResultReq, opts ...grpc.CallOption) (*ReportRoutingResultRes, error)
MuSig2SignSweep(ctx context.Context, in *MuSig2SignSweepReq, opts ...grpc.CallOption) (*MuSig2SignSweepRes, error)
PushKey(ctx context.Context, in *ServerPushKeyReq, opts ...grpc.CallOption) (*ServerPushKeyRes, error)
// FetchL402 is a simple non-l402-allowlisted request that is required
// in order to force the creation of an l402.
FetchL402(ctx context.Context, in *FetchL402Request, opts ...grpc.CallOption) (*FetchL402Response, error)
SubscribeNotifications(ctx context.Context, in *SubscribeNotificationsRequest, opts ...grpc.CallOption) (SwapServer_SubscribeNotificationsClient, error)
}
type swapServerClient struct {
cc grpc.ClientConnInterface
}
func NewSwapServerClient(cc grpc.ClientConnInterface) SwapServerClient {
return &swapServerClient{cc}
}
func (c *swapServerClient) LoopOutTerms(ctx context.Context, in *ServerLoopOutTermsRequest, opts ...grpc.CallOption) (*ServerLoopOutTerms, error) {
out := new(ServerLoopOutTerms)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/LoopOutTerms", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) NewLoopOutSwap(ctx context.Context, in *ServerLoopOutRequest, opts ...grpc.CallOption) (*ServerLoopOutResponse, error) {
out := new(ServerLoopOutResponse)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/NewLoopOutSwap", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) LoopOutPushPreimage(ctx context.Context, in *ServerLoopOutPushPreimageRequest, opts ...grpc.CallOption) (*ServerLoopOutPushPreimageResponse, error) {
out := new(ServerLoopOutPushPreimageResponse)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/LoopOutPushPreimage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) LoopOutQuote(ctx context.Context, in *ServerLoopOutQuoteRequest, opts ...grpc.CallOption) (*ServerLoopOutQuote, error) {
out := new(ServerLoopOutQuote)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/LoopOutQuote", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) LoopInTerms(ctx context.Context, in *ServerLoopInTermsRequest, opts ...grpc.CallOption) (*ServerLoopInTerms, error) {
out := new(ServerLoopInTerms)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/LoopInTerms", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) NewLoopInSwap(ctx context.Context, in *ServerLoopInRequest, opts ...grpc.CallOption) (*ServerLoopInResponse, error) {
out := new(ServerLoopInResponse)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/NewLoopInSwap", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) LoopInQuote(ctx context.Context, in *ServerLoopInQuoteRequest, opts ...grpc.CallOption) (*ServerLoopInQuoteResponse, error) {
out := new(ServerLoopInQuoteResponse)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/LoopInQuote", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) SubscribeLoopOutUpdates(ctx context.Context, in *SubscribeUpdatesRequest, opts ...grpc.CallOption) (SwapServer_SubscribeLoopOutUpdatesClient, error) {
stream, err := c.cc.NewStream(ctx, &SwapServer_ServiceDesc.Streams[0], "/looprpc.SwapServer/SubscribeLoopOutUpdates", opts...)
if err != nil {
return nil, err
}
x := &swapServerSubscribeLoopOutUpdatesClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type SwapServer_SubscribeLoopOutUpdatesClient interface {
Recv() (*SubscribeLoopOutUpdatesResponse, error)
grpc.ClientStream
}
type swapServerSubscribeLoopOutUpdatesClient struct {
grpc.ClientStream
}
func (x *swapServerSubscribeLoopOutUpdatesClient) Recv() (*SubscribeLoopOutUpdatesResponse, error) {
m := new(SubscribeLoopOutUpdatesResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *swapServerClient) SubscribeLoopInUpdates(ctx context.Context, in *SubscribeUpdatesRequest, opts ...grpc.CallOption) (SwapServer_SubscribeLoopInUpdatesClient, error) {
stream, err := c.cc.NewStream(ctx, &SwapServer_ServiceDesc.Streams[1], "/looprpc.SwapServer/SubscribeLoopInUpdates", opts...)
if err != nil {
return nil, err
}
x := &swapServerSubscribeLoopInUpdatesClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type SwapServer_SubscribeLoopInUpdatesClient interface {
Recv() (*SubscribeLoopInUpdatesResponse, error)
grpc.ClientStream
}
type swapServerSubscribeLoopInUpdatesClient struct {
grpc.ClientStream
}
func (x *swapServerSubscribeLoopInUpdatesClient) Recv() (*SubscribeLoopInUpdatesResponse, error) {
m := new(SubscribeLoopInUpdatesResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *swapServerClient) CancelLoopOutSwap(ctx context.Context, in *CancelLoopOutSwapRequest, opts ...grpc.CallOption) (*CancelLoopOutSwapResponse, error) {
out := new(CancelLoopOutSwapResponse)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/CancelLoopOutSwap", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) Probe(ctx context.Context, in *ServerProbeRequest, opts ...grpc.CallOption) (*ServerProbeResponse, error) {
out := new(ServerProbeResponse)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/Probe", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) RecommendRoutingPlugin(ctx context.Context, in *RecommendRoutingPluginReq, opts ...grpc.CallOption) (*RecommendRoutingPluginRes, error) {
out := new(RecommendRoutingPluginRes)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/RecommendRoutingPlugin", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) ReportRoutingResult(ctx context.Context, in *ReportRoutingResultReq, opts ...grpc.CallOption) (*ReportRoutingResultRes, error) {
out := new(ReportRoutingResultRes)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/ReportRoutingResult", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) MuSig2SignSweep(ctx context.Context, in *MuSig2SignSweepReq, opts ...grpc.CallOption) (*MuSig2SignSweepRes, error) {
out := new(MuSig2SignSweepRes)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/MuSig2SignSweep", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) PushKey(ctx context.Context, in *ServerPushKeyReq, opts ...grpc.CallOption) (*ServerPushKeyRes, error) {
out := new(ServerPushKeyRes)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/PushKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) FetchL402(ctx context.Context, in *FetchL402Request, opts ...grpc.CallOption) (*FetchL402Response, error) {
out := new(FetchL402Response)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/FetchL402", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapServerClient) SubscribeNotifications(ctx context.Context, in *SubscribeNotificationsRequest, opts ...grpc.CallOption) (SwapServer_SubscribeNotificationsClient, error) {
stream, err := c.cc.NewStream(ctx, &SwapServer_ServiceDesc.Streams[2], "/looprpc.SwapServer/SubscribeNotifications", opts...)
if err != nil {
return nil, err
}
x := &swapServerSubscribeNotificationsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type SwapServer_SubscribeNotificationsClient interface {
Recv() (*SubscribeNotificationsResponse, error)
grpc.ClientStream
}
type swapServerSubscribeNotificationsClient struct {
grpc.ClientStream
}
func (x *swapServerSubscribeNotificationsClient) Recv() (*SubscribeNotificationsResponse, error) {
m := new(SubscribeNotificationsResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// SwapServerServer is the server API for SwapServer service.
// All implementations must embed UnimplementedSwapServerServer
// for forward compatibility
type SwapServerServer interface {
LoopOutTerms(context.Context, *ServerLoopOutTermsRequest) (*ServerLoopOutTerms, error)
NewLoopOutSwap(context.Context, *ServerLoopOutRequest) (*ServerLoopOutResponse, error)
LoopOutPushPreimage(context.Context, *ServerLoopOutPushPreimageRequest) (*ServerLoopOutPushPreimageResponse, error)
LoopOutQuote(context.Context, *ServerLoopOutQuoteRequest) (*ServerLoopOutQuote, error)
LoopInTerms(context.Context, *ServerLoopInTermsRequest) (*ServerLoopInTerms, error)
NewLoopInSwap(context.Context, *ServerLoopInRequest) (*ServerLoopInResponse, error)
LoopInQuote(context.Context, *ServerLoopInQuoteRequest) (*ServerLoopInQuoteResponse, error)
SubscribeLoopOutUpdates(*SubscribeUpdatesRequest, SwapServer_SubscribeLoopOutUpdatesServer) error
SubscribeLoopInUpdates(*SubscribeUpdatesRequest, SwapServer_SubscribeLoopInUpdatesServer) error
CancelLoopOutSwap(context.Context, *CancelLoopOutSwapRequest) (*CancelLoopOutSwapResponse, error)
Probe(context.Context, *ServerProbeRequest) (*ServerProbeResponse, error)
RecommendRoutingPlugin(context.Context, *RecommendRoutingPluginReq) (*RecommendRoutingPluginRes, error)
ReportRoutingResult(context.Context, *ReportRoutingResultReq) (*ReportRoutingResultRes, error)
MuSig2SignSweep(context.Context, *MuSig2SignSweepReq) (*MuSig2SignSweepRes, error)
PushKey(context.Context, *ServerPushKeyReq) (*ServerPushKeyRes, error)
// FetchL402 is a simple non-l402-allowlisted request that is required
// in order to force the creation of an l402.
FetchL402(context.Context, *FetchL402Request) (*FetchL402Response, error)
SubscribeNotifications(*SubscribeNotificationsRequest, SwapServer_SubscribeNotificationsServer) error
mustEmbedUnimplementedSwapServerServer()
}
// UnimplementedSwapServerServer must be embedded to have forward compatible implementations.
type UnimplementedSwapServerServer struct {
}
func (UnimplementedSwapServerServer) LoopOutTerms(context.Context, *ServerLoopOutTermsRequest) (*ServerLoopOutTerms, error) {
return nil, status.Errorf(codes.Unimplemented, "method LoopOutTerms not implemented")
}
func (UnimplementedSwapServerServer) NewLoopOutSwap(context.Context, *ServerLoopOutRequest) (*ServerLoopOutResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NewLoopOutSwap not implemented")
}
func (UnimplementedSwapServerServer) LoopOutPushPreimage(context.Context, *ServerLoopOutPushPreimageRequest) (*ServerLoopOutPushPreimageResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LoopOutPushPreimage not implemented")
}
func (UnimplementedSwapServerServer) LoopOutQuote(context.Context, *ServerLoopOutQuoteRequest) (*ServerLoopOutQuote, error) {
return nil, status.Errorf(codes.Unimplemented, "method LoopOutQuote not implemented")
}
func (UnimplementedSwapServerServer) LoopInTerms(context.Context, *ServerLoopInTermsRequest) (*ServerLoopInTerms, error) {
return nil, status.Errorf(codes.Unimplemented, "method LoopInTerms not implemented")
}
func (UnimplementedSwapServerServer) NewLoopInSwap(context.Context, *ServerLoopInRequest) (*ServerLoopInResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NewLoopInSwap not implemented")
}
func (UnimplementedSwapServerServer) LoopInQuote(context.Context, *ServerLoopInQuoteRequest) (*ServerLoopInQuoteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LoopInQuote not implemented")
}
func (UnimplementedSwapServerServer) SubscribeLoopOutUpdates(*SubscribeUpdatesRequest, SwapServer_SubscribeLoopOutUpdatesServer) error {
return status.Errorf(codes.Unimplemented, "method SubscribeLoopOutUpdates not implemented")
}
func (UnimplementedSwapServerServer) SubscribeLoopInUpdates(*SubscribeUpdatesRequest, SwapServer_SubscribeLoopInUpdatesServer) error {
return status.Errorf(codes.Unimplemented, "method SubscribeLoopInUpdates not implemented")
}
func (UnimplementedSwapServerServer) CancelLoopOutSwap(context.Context, *CancelLoopOutSwapRequest) (*CancelLoopOutSwapResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CancelLoopOutSwap not implemented")
}
func (UnimplementedSwapServerServer) Probe(context.Context, *ServerProbeRequest) (*ServerProbeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Probe not implemented")
}
func (UnimplementedSwapServerServer) RecommendRoutingPlugin(context.Context, *RecommendRoutingPluginReq) (*RecommendRoutingPluginRes, error) {
return nil, status.Errorf(codes.Unimplemented, "method RecommendRoutingPlugin not implemented")
}
func (UnimplementedSwapServerServer) ReportRoutingResult(context.Context, *ReportRoutingResultReq) (*ReportRoutingResultRes, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReportRoutingResult not implemented")
}
func (UnimplementedSwapServerServer) MuSig2SignSweep(context.Context, *MuSig2SignSweepReq) (*MuSig2SignSweepRes, error) {
return nil, status.Errorf(codes.Unimplemented, "method MuSig2SignSweep not implemented")
}
func (UnimplementedSwapServerServer) PushKey(context.Context, *ServerPushKeyReq) (*ServerPushKeyRes, error) {
return nil, status.Errorf(codes.Unimplemented, "method PushKey not implemented")
}
func (UnimplementedSwapServerServer) FetchL402(context.Context, *FetchL402Request) (*FetchL402Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method FetchL402 not implemented")
}
func (UnimplementedSwapServerServer) SubscribeNotifications(*SubscribeNotificationsRequest, SwapServer_SubscribeNotificationsServer) error {
return status.Errorf(codes.Unimplemented, "method SubscribeNotifications not implemented")
}
func (UnimplementedSwapServerServer) mustEmbedUnimplementedSwapServerServer() {}
// UnsafeSwapServerServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SwapServerServer will
// result in compilation errors.
type UnsafeSwapServerServer interface {
mustEmbedUnimplementedSwapServerServer()
}
func RegisterSwapServerServer(s grpc.ServiceRegistrar, srv SwapServerServer) {
s.RegisterService(&SwapServer_ServiceDesc, srv)
}
func _SwapServer_LoopOutTerms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ServerLoopOutTermsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).LoopOutTerms(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/LoopOutTerms",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).LoopOutTerms(ctx, req.(*ServerLoopOutTermsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_NewLoopOutSwap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ServerLoopOutRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).NewLoopOutSwap(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/NewLoopOutSwap",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).NewLoopOutSwap(ctx, req.(*ServerLoopOutRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_LoopOutPushPreimage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ServerLoopOutPushPreimageRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).LoopOutPushPreimage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/LoopOutPushPreimage",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).LoopOutPushPreimage(ctx, req.(*ServerLoopOutPushPreimageRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_LoopOutQuote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ServerLoopOutQuoteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).LoopOutQuote(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/LoopOutQuote",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).LoopOutQuote(ctx, req.(*ServerLoopOutQuoteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_LoopInTerms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ServerLoopInTermsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).LoopInTerms(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/LoopInTerms",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).LoopInTerms(ctx, req.(*ServerLoopInTermsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_NewLoopInSwap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ServerLoopInRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).NewLoopInSwap(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/NewLoopInSwap",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).NewLoopInSwap(ctx, req.(*ServerLoopInRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_LoopInQuote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ServerLoopInQuoteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).LoopInQuote(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/LoopInQuote",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).LoopInQuote(ctx, req.(*ServerLoopInQuoteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_SubscribeLoopOutUpdates_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SubscribeUpdatesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(SwapServerServer).SubscribeLoopOutUpdates(m, &swapServerSubscribeLoopOutUpdatesServer{stream})
}
type SwapServer_SubscribeLoopOutUpdatesServer interface {
Send(*SubscribeLoopOutUpdatesResponse) error
grpc.ServerStream
}
type swapServerSubscribeLoopOutUpdatesServer struct {
grpc.ServerStream
}
func (x *swapServerSubscribeLoopOutUpdatesServer) Send(m *SubscribeLoopOutUpdatesResponse) error {
return x.ServerStream.SendMsg(m)
}
func _SwapServer_SubscribeLoopInUpdates_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SubscribeUpdatesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(SwapServerServer).SubscribeLoopInUpdates(m, &swapServerSubscribeLoopInUpdatesServer{stream})
}
type SwapServer_SubscribeLoopInUpdatesServer interface {
Send(*SubscribeLoopInUpdatesResponse) error
grpc.ServerStream
}
type swapServerSubscribeLoopInUpdatesServer struct {
grpc.ServerStream
}
func (x *swapServerSubscribeLoopInUpdatesServer) Send(m *SubscribeLoopInUpdatesResponse) error {
return x.ServerStream.SendMsg(m)
}
func _SwapServer_CancelLoopOutSwap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CancelLoopOutSwapRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).CancelLoopOutSwap(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/CancelLoopOutSwap",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).CancelLoopOutSwap(ctx, req.(*CancelLoopOutSwapRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_Probe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ServerProbeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).Probe(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/Probe",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).Probe(ctx, req.(*ServerProbeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_RecommendRoutingPlugin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RecommendRoutingPluginReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).RecommendRoutingPlugin(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/RecommendRoutingPlugin",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).RecommendRoutingPlugin(ctx, req.(*RecommendRoutingPluginReq))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_ReportRoutingResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReportRoutingResultReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).ReportRoutingResult(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/ReportRoutingResult",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).ReportRoutingResult(ctx, req.(*ReportRoutingResultReq))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_MuSig2SignSweep_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MuSig2SignSweepReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).MuSig2SignSweep(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/MuSig2SignSweep",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).MuSig2SignSweep(ctx, req.(*MuSig2SignSweepReq))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_PushKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ServerPushKeyReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).PushKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/PushKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).PushKey(ctx, req.(*ServerPushKeyReq))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_FetchL402_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FetchL402Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).FetchL402(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/FetchL402",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).FetchL402(ctx, req.(*FetchL402Request))
}
return interceptor(ctx, in, info, handler)
}
func _SwapServer_SubscribeNotifications_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SubscribeNotificationsRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(SwapServerServer).SubscribeNotifications(m, &swapServerSubscribeNotificationsServer{stream})
}
type SwapServer_SubscribeNotificationsServer interface {
Send(*SubscribeNotificationsResponse) error
grpc.ServerStream
}
type swapServerSubscribeNotificationsServer struct {
grpc.ServerStream
}
func (x *swapServerSubscribeNotificationsServer) Send(m *SubscribeNotificationsResponse) error {
return x.ServerStream.SendMsg(m)
}
// SwapServer_ServiceDesc is the grpc.ServiceDesc for SwapServer service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SwapServer_ServiceDesc = grpc.ServiceDesc{
ServiceName: "looprpc.SwapServer",
HandlerType: (*SwapServerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "LoopOutTerms",
Handler: _SwapServer_LoopOutTerms_Handler,
},
{
MethodName: "NewLoopOutSwap",
Handler: _SwapServer_NewLoopOutSwap_Handler,
},
{
MethodName: "LoopOutPushPreimage",
Handler: _SwapServer_LoopOutPushPreimage_Handler,
},
{
MethodName: "LoopOutQuote",
Handler: _SwapServer_LoopOutQuote_Handler,
},
{
MethodName: "LoopInTerms",
Handler: _SwapServer_LoopInTerms_Handler,
},
{
MethodName: "NewLoopInSwap",
Handler: _SwapServer_NewLoopInSwap_Handler,
},
{
MethodName: "LoopInQuote",
Handler: _SwapServer_LoopInQuote_Handler,
},
{
MethodName: "CancelLoopOutSwap",
Handler: _SwapServer_CancelLoopOutSwap_Handler,
},
{
MethodName: "Probe",
Handler: _SwapServer_Probe_Handler,
},
{
MethodName: "RecommendRoutingPlugin",
Handler: _SwapServer_RecommendRoutingPlugin_Handler,
},
{
MethodName: "ReportRoutingResult",
Handler: _SwapServer_ReportRoutingResult_Handler,
},
{
MethodName: "MuSig2SignSweep",
Handler: _SwapServer_MuSig2SignSweep_Handler,
},
{
MethodName: "PushKey",
Handler: _SwapServer_PushKey_Handler,
},
{
MethodName: "FetchL402",
Handler: _SwapServer_FetchL402_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "SubscribeLoopOutUpdates",
Handler: _SwapServer_SubscribeLoopOutUpdates_Handler,
ServerStreams: true,
},
{
StreamName: "SubscribeLoopInUpdates",
Handler: _SwapServer_SubscribeLoopInUpdates_Handler,
ServerStreams: true,
},
{
StreamName: "SubscribeNotifications",
Handler: _SwapServer_SubscribeNotifications_Handler,
ServerStreams: true,
},
},
Metadata: "server.proto",
}