@@ -18,6 +18,7 @@ import (
18
18
"github.com/lightninglabs/aperture/l402"
19
19
"github.com/lightninglabs/lndclient"
20
20
"github.com/lightninglabs/loop"
21
+ "github.com/lightninglabs/loop/hyperloop"
21
22
"github.com/lightninglabs/loop/instantout"
22
23
"github.com/lightninglabs/loop/instantout/reservation"
23
24
"github.com/lightninglabs/loop/labels"
@@ -83,6 +84,7 @@ type swapClientServer struct {
83
84
lnd * lndclient.LndServices
84
85
reservationManager * reservation.Manager
85
86
instantOutManager * instantout.Manager
87
+ hyperloopManager * hyperloop.Manager
86
88
swaps map [lntypes.Hash ]loop.SwapInfo
87
89
subscribers map [int ]chan <- interface {}
88
90
statusChan chan loop.SwapInfo
@@ -91,6 +93,24 @@ type swapClientServer struct {
91
93
mainCtx context.Context
92
94
}
93
95
96
+ func (s * swapClientServer ) HyperLoopOut (ctx context.Context ,
97
+ req * clientrpc.HyperLoopOutRequest ) (
98
+ * clientrpc.HyperLoopOutResponse , error ) {
99
+
100
+ log .Infof ("HyperLoop out request received" )
101
+
102
+ hyperloop , err := s .hyperloopManager .NewHyperLoopOut (
103
+ ctx , btcutil .Amount (req .Amt ), req .CustomSweepAddr ,
104
+ )
105
+ if err != nil {
106
+ return nil , err
107
+ }
108
+
109
+ return & clientrpc.HyperLoopOutResponse {
110
+ IdBytes : hyperloop .ID [:],
111
+ }, nil
112
+ }
113
+
94
114
// LoopOut initiates a loop out swap with the given parameters. The call returns
95
115
// after the swap has been set up with the swap server. From that point onwards,
96
116
// progress can be tracked via the LoopOutStatus stream that is returned from
0 commit comments