From f0aff9b7bdb9260c94a35178bba07ff1f0d55744 Mon Sep 17 00:00:00 2001 From: Andras Banki-Horvath Date: Fri, 24 Apr 2020 17:35:32 +0200 Subject: [PATCH] looprpc+loopin: support for native segwit htlcs This commit extends SwapResponse and SwapStatus with np2wsh and p2wsh htlc output addresses to support both nested and native segwit htlcs in loop-in. Furthermore the commit adds support for native segwith loop-in htlcs. When the htlc is paid internally, as of this commit we'll use NP2WSH, otherwise users are free to select whether to pay the NP2WSH or the P2WSH htlc. --- client.go | 41 +++--- interface.go | 19 ++- loopd/swapclient_server.go | 53 +++++--- loopin.go | 94 ++++++++++---- loopin_test.go | 51 +++++--- loopout.go | 2 +- looprpc/client.pb.go | 250 ++++++++++++++++++++++-------------- looprpc/client.proto | 39 +++++- looprpc/client.swagger.json | 20 ++- 9 files changed, 388 insertions(+), 181 deletions(-) diff --git a/client.go b/client.go index 720b99b..9b8161f 100644 --- a/client.go +++ b/client.go @@ -194,17 +194,17 @@ func (s *Client) FetchSwaps() ([]*SwapInfo, error) { } swaps = append(swaps, &SwapInfo{ - SwapType: swap.TypeOut, - SwapContract: swp.Contract.SwapContract, - SwapStateData: swp.State(), - SwapHash: swp.Hash, - LastUpdate: swp.LastUpdateTime(), - HtlcAddress: htlc.Address, + SwapType: swap.TypeOut, + SwapContract: swp.Contract.SwapContract, + SwapStateData: swp.State(), + SwapHash: swp.Hash, + LastUpdate: swp.LastUpdateTime(), + HtlcAddressP2WSH: htlc.Address, }) } for _, swp := range loopInSwaps { - htlc, err := swap.NewHtlc( + htlcNP2WSH, err := swap.NewHtlc( swp.Contract.CltvExpiry, swp.Contract.SenderKey, swp.Contract.ReceiverKey, swp.Hash, swap.HtlcNP2WSH, s.lndServices.ChainParams, @@ -213,13 +213,23 @@ func (s *Client) FetchSwaps() ([]*SwapInfo, error) { return nil, err } + htlcP2WSH, err := swap.NewHtlc( + swp.Contract.CltvExpiry, swp.Contract.SenderKey, + swp.Contract.ReceiverKey, swp.Hash, swap.HtlcP2WSH, + s.lndServices.ChainParams, + ) + if err != nil { + return nil, err + } + swaps = append(swaps, &SwapInfo{ - SwapType: swap.TypeIn, - SwapContract: swp.Contract.SwapContract, - SwapStateData: swp.State(), - SwapHash: swp.Hash, - LastUpdate: swp.LastUpdateTime(), - HtlcAddress: htlc.Address, + SwapType: swap.TypeIn, + SwapContract: swp.Contract.SwapContract, + SwapStateData: swp.State(), + SwapHash: swp.Hash, + LastUpdate: swp.LastUpdateTime(), + HtlcAddressP2WSH: htlcP2WSH.Address, + HtlcAddressNP2WSH: htlcNP2WSH.Address, }) } @@ -495,8 +505,9 @@ func (s *Client) LoopIn(globalCtx context.Context, // Return hash so that the caller can identify this swap in the updates // stream. swapInfo := &LoopInSwapInfo{ - SwapHash: swap.hash, - HtlcAddress: swap.htlc.Address, + SwapHash: swap.hash, + HtlcAddressP2WSH: swap.htlcP2WSH.Address, + HtlcAddressNP2WSH: swap.htlcNP2WSH.Address, } return swapInfo, nil } diff --git a/interface.go b/interface.go index 6f1942c..f702a45 100644 --- a/interface.go +++ b/interface.go @@ -241,9 +241,13 @@ type LoopInSwapInfo struct { // nolint // SwapHash contains the sha256 hash of the swap preimage. SwapHash lntypes.Hash - // HtlcAddress contains the swap htlc address, where the loop-in - // funds will be paid. - HtlcAddress btcutil.Address + // HtlcAddressP2WSH contains the native segwit swap htlc address, + // where the loop-in funds may be paid. + HtlcAddressP2WSH btcutil.Address + + // HtlcAddressNP2WSH contains the nested segwit swap htlc address, + // where the loop-in funds may be paid. + HtlcAddressNP2WSH btcutil.Address } // SwapInfoKit contains common swap info fields. @@ -271,8 +275,13 @@ type SwapInfo struct { // SwapType describes whether this is a loop in or loop out swap. SwapType swap.Type - // HtlcAddress holds the HTLC address of the swap. - HtlcAddress btcutil.Address + // HtlcAddressP2WSH stores the address of the P2WSH (native segwit) + // swap htlc. This is used for both loop-in and loop-out. + HtlcAddressP2WSH btcutil.Address + + // HtlcAddressNP2WSH stores the address of the NP2WSH (nested segwit) + // swap htlc. This is only used for external loop-in. + HtlcAddressNP2WSH btcutil.Address // ExternalHtlc is set to true for external loop-in swaps. ExternalHtlc bool diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 0616cc8..8fae91d 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -126,27 +126,40 @@ func (s *swapClientServer) marshallSwap(loopSwap *loop.SwapInfo) ( } var swapType looprpc.SwapType + var htlcAddress, htlcAddressP2WSH, htlcAddressNP2WSH string + switch loopSwap.SwapType { case swap.TypeIn: swapType = looprpc.SwapType_LOOP_IN + if loopSwap.ExternalHtlc { + htlcAddressP2WSH = loopSwap.HtlcAddressP2WSH.EncodeAddress() + } + htlcAddressNP2WSH = loopSwap.HtlcAddressNP2WSH.EncodeAddress() + htlcAddress = htlcAddressNP2WSH + case swap.TypeOut: swapType = looprpc.SwapType_LOOP_OUT + htlcAddressP2WSH = loopSwap.HtlcAddressP2WSH.EncodeAddress() + htlcAddress = htlcAddressP2WSH + default: return nil, errors.New("unknown swap type") } return &looprpc.SwapStatus{ - Amt: int64(loopSwap.AmountRequested), - Id: loopSwap.SwapHash.String(), - IdBytes: loopSwap.SwapHash[:], - State: state, - InitiationTime: loopSwap.InitiationTime.UnixNano(), - LastUpdateTime: loopSwap.LastUpdate.UnixNano(), - HtlcAddress: loopSwap.HtlcAddress.EncodeAddress(), - Type: swapType, - CostServer: int64(loopSwap.Cost.Server), - CostOnchain: int64(loopSwap.Cost.Onchain), - CostOffchain: int64(loopSwap.Cost.Offchain), + Amt: int64(loopSwap.AmountRequested), + Id: loopSwap.SwapHash.String(), + IdBytes: loopSwap.SwapHash[:], + State: state, + InitiationTime: loopSwap.InitiationTime.UnixNano(), + LastUpdateTime: loopSwap.LastUpdate.UnixNano(), + HtlcAddress: htlcAddress, + HtlcAddressP2Wsh: htlcAddressP2WSH, + HtlcAddressNp2Wsh: htlcAddressNP2WSH, + Type: swapType, + CostServer: int64(loopSwap.Cost.Server), + CostOnchain: int64(loopSwap.Cost.Onchain), + CostOffchain: int64(loopSwap.Cost.Offchain), }, nil } @@ -418,11 +431,19 @@ func (s *swapClientServer) LoopIn(ctx context.Context, return nil, err } - return &looprpc.SwapResponse{ - Id: swapInfo.SwapHash.String(), - IdBytes: swapInfo.SwapHash[:], - HtlcAddress: swapInfo.HtlcAddress.String(), - }, nil + np2wshAddress := swapInfo.HtlcAddressNP2WSH.String() + response := &looprpc.SwapResponse{ + Id: swapInfo.SwapHash.String(), + IdBytes: swapInfo.SwapHash[:], + HtlcAddress: np2wshAddress, + HtlcAddressNp2Wsh: np2wshAddress, + } + + if req.ExternalHtlc { + response.HtlcAddressP2Wsh = swapInfo.HtlcAddressP2WSH.String() + } + + return response, nil } // GetLsatTokens returns all tokens that are contained in the LSAT token store. diff --git a/loopin.go b/loopin.go index 1cd2633..8b1bcdb 100644 --- a/loopin.go +++ b/loopin.go @@ -54,6 +54,10 @@ type loopInSwap struct { htlc *swap.Htlc + htlcP2WSH *swap.Htlc + + htlcNP2WSH *swap.Htlc + timeoutAddr btcutil.Address } @@ -158,19 +162,13 @@ func newLoopInSwap(globalCtx context.Context, cfg *swapConfig, swapKit.lastUpdateTime = initiationTime - // Create the htlc. - htlc, err := swapKit.getHtlc(swap.HtlcNP2WSH) - if err != nil { - return nil, err - } - - // Log htlc address for debugging. - swapKit.log.Infof("Htlc address: %v", htlc.Address) - swap := &loopInSwap{ LoopInContract: contract, swapKit: *swapKit, - htlc: htlc, + } + + if err := swap.initHtlcs(); err != nil { + return nil, err } // Persist the data before exiting this function, so that the caller can @@ -196,19 +194,13 @@ func resumeLoopInSwap(reqContext context.Context, cfg *swapConfig, hash, swap.TypeIn, cfg, &pend.Contract.SwapContract, ) - // Create the htlc. - htlc, err := swapKit.getHtlc(swap.HtlcNP2WSH) - if err != nil { - return nil, err - } - - // Log htlc address for debugging. - swapKit.log.Infof("Htlc address: %v", htlc.Address) - swap := &loopInSwap{ LoopInContract: *pend.Contract, swapKit: *swapKit, - htlc: htlc, + } + + if err := swap.initHtlcs(); err != nil { + return nil, err } lastUpdate := pend.LastUpdate() @@ -238,12 +230,36 @@ func validateLoopInContract(lnd *lndclient.LndServices, return nil } +// initHtlcs creates and updates the native and nested segwit htlcs +// of the loopInSwap. +func (s *loopInSwap) initHtlcs() error { + htlcP2WSH, err := s.swapKit.getHtlc(swap.HtlcP2WSH) + if err != nil { + return err + } + + htlcNP2WSH, err := s.swapKit.getHtlc(swap.HtlcNP2WSH) + if err != nil { + return err + } + + // Log htlc addresses for debugging. + s.swapKit.log.Infof("Htlc address (P2WSH): %v", htlcP2WSH.Address) + s.swapKit.log.Infof("Htlc address (NP2WSH): %v", htlcNP2WSH.Address) + + s.htlcP2WSH = htlcP2WSH + s.htlcNP2WSH = htlcNP2WSH + + return nil +} + // sendUpdate reports an update to the swap state. func (s *loopInSwap) sendUpdate(ctx context.Context) error { info := s.swapInfo() s.log.Infof("Loop in swap state: %v", info.State) - info.HtlcAddress = s.htlc.Address + info.HtlcAddressP2WSH = s.htlcP2WSH.Address + info.HtlcAddressNP2WSH = s.htlcNP2WSH.Address info.ExternalHtlc = s.ExternalHtlc select { @@ -373,21 +389,44 @@ func (s *loopInSwap) waitForHtlcConf(globalCtx context.Context) ( ctx, cancel := context.WithCancel(globalCtx) defer cancel() - confChan, confErr, err := s.lnd.ChainNotifier.RegisterConfirmationsNtfn( - ctx, nil, s.htlc.PkScript, 1, s.InitiationHeight, + + notifier := s.lnd.ChainNotifier + + confChanP2WSH, confErrP2WSH, err := notifier.RegisterConfirmationsNtfn( + ctx, nil, s.htlcP2WSH.PkScript, 1, s.InitiationHeight, + ) + if err != nil { + return nil, err + } + + confChanNP2WSH, confErrNP2WSH, err := notifier.RegisterConfirmationsNtfn( + ctx, nil, s.htlcNP2WSH.PkScript, 1, s.InitiationHeight, ) if err != nil { return nil, err } + for { select { - // Htlc confirmed. - case conf := <-confChan: + // P2WSH htlc confirmed. + case conf := <-confChanP2WSH: + s.htlc = s.htlcP2WSH + s.log.Infof("P2WSH htlc confirmed") + return conf, nil + + // NP2WSH htlc confirmed. + case conf := <-confChanNP2WSH: + s.htlc = s.htlcNP2WSH + s.log.Infof("NP2WSH htlc confirmed") return conf, nil // Conf ntfn error. - case err := <-confErr: + case err := <-confErrP2WSH: + return nil, err + + // Conf ntfn error. + case err := <-confErrNP2WSH: return nil, err // Keep up with block height. @@ -432,9 +471,10 @@ func (s *loopInSwap) publishOnChainHtlc(ctx context.Context) (bool, error) { } s.log.Infof("Publishing on chain HTLC with fee rate %v", feeRate) + tx, err := s.lnd.WalletKit.SendOutputs(ctx, []*wire.TxOut{{ - PkScript: s.htlc.PkScript, + PkScript: s.htlcNP2WSH.PkScript, Value: int64(s.LoopInContract.AmountRequested), }}, feeRate, diff --git a/loopin_test.go b/loopin_test.go index f74ac75..8c15705 100644 --- a/loopin_test.go +++ b/loopin_test.go @@ -67,6 +67,7 @@ func TestLoopInSuccess(t *testing.T) { // Expect register for htlc conf. <-ctx.lnd.RegisterConfChannel + <-ctx.lnd.RegisterConfChannel // Confirm htlc. ctx.lnd.ConfChannel <- &chainntnfs.TxConfirmation{ @@ -118,20 +119,32 @@ func TestLoopInSuccess(t *testing.T) { func TestLoopInTimeout(t *testing.T) { testAmt := int64(testLoopInRequest.Amount) t.Run("internal htlc", func(t *testing.T) { - testLoopInTimeout(t, 0) - }) - t.Run("external htlc", func(t *testing.T) { - testLoopInTimeout(t, testAmt) - }) - t.Run("external amount too high", func(t *testing.T) { - testLoopInTimeout(t, testAmt+1) - }) - t.Run("external amount too low", func(t *testing.T) { - testLoopInTimeout(t, testAmt-1) + testLoopInTimeout(t, swap.HtlcNP2WSH, 0) }) + + outputTypes := []swap.HtlcOutputType{swap.HtlcP2WSH, swap.HtlcNP2WSH} + + for _, outputType := range outputTypes { + outputType := outputType + t.Run(outputType.String(), func(t *testing.T) { + t.Run("external htlc", func(t *testing.T) { + testLoopInTimeout(t, outputType, testAmt) + }) + + t.Run("external amount too high", func(t *testing.T) { + testLoopInTimeout(t, outputType, testAmt+1) + }) + + t.Run("external amount too low", func(t *testing.T) { + testLoopInTimeout(t, outputType, testAmt-1) + }) + }) + } } -func testLoopInTimeout(t *testing.T, externalValue int64) { +func testLoopInTimeout(t *testing.T, + outputType swap.HtlcOutputType, externalValue int64) { + defer test.Guard(t)() ctx := newLoopInTestContext(t) @@ -149,7 +162,7 @@ func testLoopInTimeout(t *testing.T, externalValue int64) { req.ExternalHtlc = true } - swap, err := newLoopInSwap( + s, err := newLoopInSwap( context.Background(), cfg, height, &req, ) @@ -161,7 +174,7 @@ func testLoopInTimeout(t *testing.T, externalValue int64) { errChan := make(chan error) go func() { - err := swap.execute(context.Background(), ctx.cfg, height) + err := s.execute(context.Background(), ctx.cfg, height) if err != nil { log.Error(err) } @@ -179,10 +192,16 @@ func testLoopInTimeout(t *testing.T, externalValue int64) { htlcTx = <-ctx.lnd.SendOutputsChannel } else { // Create an external htlc publish tx. + var pkScript []byte + if outputType == swap.HtlcNP2WSH { + pkScript = s.htlcNP2WSH.PkScript + } else { + pkScript = s.htlcP2WSH.PkScript + } htlcTx = wire.MsgTx{ TxOut: []*wire.TxOut{ { - PkScript: swap.htlc.PkScript, + PkScript: pkScript, Value: externalValue, }, }, @@ -191,6 +210,7 @@ func testLoopInTimeout(t *testing.T, externalValue int64) { // Expect register for htlc conf. <-ctx.lnd.RegisterConfChannel + <-ctx.lnd.RegisterConfChannel // Confirm htlc. ctx.lnd.ConfChannel <- &chainntnfs.TxConfirmation{ @@ -207,7 +227,7 @@ func testLoopInTimeout(t *testing.T, externalValue int64) { } // Let htlc expire. - ctx.blockEpochChan <- swap.LoopInContract.CltvExpiry + ctx.blockEpochChan <- s.LoopInContract.CltvExpiry // Expect a signing request for the htlc tx output value. signReq := <-ctx.lnd.SignOutputRawChannel @@ -378,6 +398,7 @@ func testLoopInResume(t *testing.T, state loopdb.SwapState, expired bool) { // Expect register for htlc conf. <-ctx.lnd.RegisterConfChannel + <-ctx.lnd.RegisterConfChannel // Confirm htlc. ctx.lnd.ConfChannel <- &chainntnfs.TxConfirmation{ diff --git a/loopout.go b/loopout.go index 15c08b3..7204dc9 100644 --- a/loopout.go +++ b/loopout.go @@ -214,7 +214,7 @@ func (s *loopOutSwap) sendUpdate(ctx context.Context) error { info := s.swapInfo() s.log.Infof("Loop out swap state: %v", info.State) - info.HtlcAddress = s.htlc.Address + info.HtlcAddressP2WSH = s.htlc.Address select { case s.statusChan <- *info: diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index 51bd965..e40bae0 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -379,8 +379,23 @@ type SwapResponse struct { //the Start() call. Currently this is the hash that locks the htlcs. IdBytes []byte `protobuf:"bytes,3,opt,name=id_bytes,json=idBytes,proto3" json:"id_bytes,omitempty"` //* - //The address of the on-chain htlc. - HtlcAddress string `protobuf:"bytes,2,opt,name=htlc_address,json=htlcAddress,proto3" json:"htlc_address,omitempty"` + //DEPRECATED. This field stores the address of the onchain htlc, but + //depending on the request, the semantics are different. + //- For internal loop-in htlc_address contains the address of the + //native segwit (P2WSH) htlc. + //- For external loop-in htlc_address contains the address of the + //nested segwit (NP2WSH) htlc. + //- For loop-out htlc_address always contains the native segwit (P2WSH) + //htlc address. + HtlcAddress string `protobuf:"bytes,2,opt,name=htlc_address,json=htlcAddress,proto3" json:"htlc_address,omitempty"` // Deprecated: Do not use. + //* + //The nested segwit address of the on-chain htlc. + //This field remains empty for loop-out. + HtlcAddressNp2Wsh string `protobuf:"bytes,4,opt,name=htlc_address_np2wsh,json=htlcAddressNp2wsh,proto3" json:"htlc_address_np2wsh,omitempty"` + //* + //The native segwit address of the on-chain htlc. + //Used for both loop-in and loop-out. + HtlcAddressP2Wsh string `protobuf:"bytes,5,opt,name=htlc_address_p2wsh,json=htlcAddressP2wsh,proto3" json:"htlc_address_p2wsh,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -426,6 +441,7 @@ func (m *SwapResponse) GetIdBytes() []byte { return nil } +// Deprecated: Do not use. func (m *SwapResponse) GetHtlcAddress() string { if m != nil { return m.HtlcAddress @@ -433,6 +449,20 @@ func (m *SwapResponse) GetHtlcAddress() string { return "" } +func (m *SwapResponse) GetHtlcAddressNp2Wsh() string { + if m != nil { + return m.HtlcAddressNp2Wsh + } + return "" +} + +func (m *SwapResponse) GetHtlcAddressP2Wsh() string { + if m != nil { + return m.HtlcAddressP2Wsh + } + return "" +} + type MonitorRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -492,8 +522,18 @@ type SwapStatus struct { //Initiation time of the swap. LastUpdateTime int64 `protobuf:"varint,6,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"` //* - //Htlc address. - HtlcAddress string `protobuf:"bytes,7,opt,name=htlc_address,json=htlcAddress,proto3" json:"htlc_address,omitempty"` + //DEPRECATED: This field stores the address of the onchain htlc. + //- For internal loop-in htlc_address contains the address of the + //native segwit (P2WSH) htlc. + //- For external loop-in htlc_address contains the nested segwit (NP2WSH) + //address. + //- For loop-out htlc_address always contains the native segwit (P2WSH) + //htlc address. + HtlcAddress string `protobuf:"bytes,7,opt,name=htlc_address,json=htlcAddress,proto3" json:"htlc_address,omitempty"` // Deprecated: Do not use. + // HTLC address (native segwit), used in loop-in and loop-out swaps. + HtlcAddressP2Wsh string `protobuf:"bytes,12,opt,name=htlc_address_p2wsh,json=htlcAddressP2wsh,proto3" json:"htlc_address_p2wsh,omitempty"` + // HTLC address (nested segwit), used in loop-in swaps only. + HtlcAddressNp2Wsh string `protobuf:"bytes,13,opt,name=htlc_address_np2wsh,json=htlcAddressNp2wsh,proto3" json:"htlc_address_np2wsh,omitempty"` /// Swap server cost CostServer int64 `protobuf:"varint,8,opt,name=cost_server,json=costServer,proto3" json:"cost_server,omitempty"` // On-chain transaction cost @@ -580,6 +620,7 @@ func (m *SwapStatus) GetLastUpdateTime() int64 { return 0 } +// Deprecated: Do not use. func (m *SwapStatus) GetHtlcAddress() string { if m != nil { return m.HtlcAddress @@ -587,6 +628,20 @@ func (m *SwapStatus) GetHtlcAddress() string { return "" } +func (m *SwapStatus) GetHtlcAddressP2Wsh() string { + if m != nil { + return m.HtlcAddressP2Wsh + } + return "" +} + +func (m *SwapStatus) GetHtlcAddressNp2Wsh() string { + if m != nil { + return m.HtlcAddressNp2Wsh + } + return "" +} + func (m *SwapStatus) GetCostServer() int64 { if m != nil { return m.CostServer @@ -1180,98 +1235,101 @@ func init() { func init() { proto.RegisterFile("client.proto", fileDescriptor_014de31d7ac8c57c) } var fileDescriptor_014de31d7ac8c57c = []byte{ - // 1448 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcb, 0x6e, 0xdb, 0x46, - 0x14, 0x0d, 0x25, 0x59, 0x8f, 0x2b, 0x8a, 0xa2, 0xc7, 0x89, 0x2d, 0xab, 0x0d, 0xe2, 0xb0, 0x4d, - 0xeb, 0x78, 0x11, 0x35, 0xce, 0xaa, 0x41, 0x51, 0xc0, 0x91, 0x95, 0x58, 0x86, 0x5f, 0xa5, 0xe4, - 0x00, 0xc9, 0x86, 0x19, 0x8b, 0x63, 0x9b, 0xa8, 0xc8, 0x61, 0x38, 0xa3, 0xc4, 0x46, 0x90, 0x4d, - 0x7f, 0xa1, 0xbb, 0x2e, 0xfb, 0x07, 0x5d, 0xf7, 0x2b, 0x8a, 0xfe, 0x42, 0x3f, 0xa1, 0xdb, 0x02, - 0xc5, 0x3c, 0x44, 0x91, 0x96, 0x9d, 0x45, 0x76, 0xe6, 0x99, 0x33, 0x67, 0xee, 0xdc, 0xc7, 0x19, - 0x19, 0xcc, 0xd1, 0x38, 0x20, 0x11, 0x7f, 0x14, 0x27, 0x94, 0x53, 0x54, 0x19, 0x53, 0x1a, 0x27, - 0xf1, 0xa8, 0xfd, 0xe5, 0x19, 0xa5, 0x67, 0x63, 0xd2, 0xc1, 0x71, 0xd0, 0xc1, 0x51, 0x44, 0x39, - 0xe6, 0x01, 0x8d, 0x98, 0xa2, 0x39, 0xbf, 0x15, 0xc1, 0xda, 0xa3, 0x34, 0x3e, 0x9c, 0x70, 0x97, - 0xbc, 0x9d, 0x10, 0xc6, 0x91, 0x0d, 0x45, 0x1c, 0xf2, 0x96, 0xb1, 0x66, 0xac, 0x17, 0x5d, 0xf1, - 0x27, 0x42, 0x50, 0xf2, 0x09, 0xe3, 0xad, 0xc2, 0x9a, 0xb1, 0x5e, 0x73, 0xe5, 0xdf, 0xa8, 0x03, - 0xb7, 0x43, 0x7c, 0xe1, 0xb1, 0xf7, 0x38, 0xf6, 0x12, 0x3a, 0xe1, 0x41, 0x74, 0xe6, 0x9d, 0x12, - 0xd2, 0x2a, 0xca, 0x6d, 0x8b, 0x21, 0xbe, 0x18, 0xbc, 0xc7, 0xb1, 0xab, 0x56, 0x9e, 0x13, 0x82, - 0x9e, 0xc0, 0xb2, 0xd8, 0x10, 0x27, 0x24, 0xc6, 0x97, 0xb9, 0x2d, 0x25, 0xb9, 0x65, 0x29, 0xc4, - 0x17, 0x47, 0x72, 0x31, 0xb3, 0x69, 0x0d, 0xcc, 0xf4, 0x14, 0x41, 0x5d, 0x90, 0x54, 0xd0, 0xea, - 0x82, 0xf1, 0x35, 0x58, 0x19, 0x59, 0x11, 0x78, 0x59, 0x72, 0xcc, 0x54, 0x6e, 0x2b, 0xe4, 0xc8, - 0x81, 0x86, 0x60, 0x85, 0x41, 0x44, 0x12, 0x29, 0x54, 0x91, 0xa4, 0x7a, 0x88, 0x2f, 0xf6, 0x05, - 0x26, 0x94, 0xd6, 0xc1, 0x16, 0x39, 0xf3, 0xe8, 0x84, 0x7b, 0xa3, 0x73, 0x1c, 0x45, 0x64, 0xdc, - 0xaa, 0xae, 0x19, 0xeb, 0x25, 0xd7, 0x1a, 0xab, 0x0c, 0x75, 0x15, 0x8a, 0x36, 0x60, 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x21, 0x89, 0xb8, 0x27, 0x1f, 0x18, 0x65, 0x3d, 0x4d, 0x19, 0x9c, 0xc2, 0xb7, 0x45, - 0xa2, 0xee, 0x02, 0x8c, 0xc6, 0xfc, 0x9d, 0xe7, 0x93, 0x31, 0xc7, 0xb2, 0x44, 0x0b, 0x6e, 0x4d, - 0x20, 0xdb, 0x02, 0x70, 0x9a, 0xd0, 0x18, 0xd2, 0x9f, 0x49, 0x94, 0x16, 0xfa, 0x07, 0xb0, 0xa6, - 0x80, 0xbe, 0xc4, 0x06, 0x94, 0xb9, 0x44, 0x74, 0x67, 0xcd, 0x66, 0x71, 0x8f, 0x61, 0x2e, 0xc9, - 0xae, 0x66, 0x38, 0x7f, 0x16, 0xa0, 0x96, 0xa2, 0x22, 0xe3, 0x27, 0x98, 0x11, 0x2f, 0xc4, 0x23, - 0x9c, 0x50, 0x1a, 0xe9, 0xfe, 0x32, 0x05, 0xb8, 0xaf, 0x31, 0x31, 0x28, 0xd3, 0x7b, 0x9c, 0x63, - 0x76, 0x2e, 0x53, 0x61, 0xba, 0x75, 0x8d, 0xed, 0x60, 0x76, 0x8e, 0x1e, 0x82, 0x3d, 0xa5, 0xc4, - 0x09, 0x09, 0x42, 0x7c, 0x46, 0xb4, 0xb7, 0x35, 0x35, 0x7e, 0xa4, 0x61, 0x31, 0xe4, 0xaa, 0xcb, - 0xbc, 0x18, 0x07, 0xbe, 0x17, 0x32, 0xcc, 0xf5, 0x1b, 0x69, 0x29, 0xfc, 0x08, 0x07, 0xfe, 0x3e, - 0xc3, 0x1c, 0x3d, 0x86, 0x3b, 0x99, 0x87, 0x34, 0x43, 0x57, 0x6d, 0x8c, 0x92, 0xf4, 0x25, 0x4d, - 0xb7, 0xdc, 0x07, 0x53, 0xb8, 0x86, 0x37, 0x4a, 0x08, 0xe6, 0xc4, 0xd7, 0x8d, 0x5c, 0x17, 0x58, - 0x57, 0x41, 0xa8, 0x05, 0x15, 0x72, 0x11, 0x07, 0x09, 0xf1, 0xa5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, 0xac, 0x76, 0x36, 0xfa, 0x57, 0xd0, 0x10, 0x27, 0x4c, 0x7d, - 0x8f, 0x65, 0xfa, 0x37, 0x67, 0xae, 0xed, 0x95, 0x39, 0x3c, 0x3f, 0x13, 0xa8, 0x29, 0x8f, 0x60, - 0x98, 0x77, 0x94, 0xa1, 0x9e, 0x94, 0xe5, 0xbf, 0x1a, 0x4f, 0xfe, 0x0f, 0x00, 0x00, 0xff, 0xff, - 0xc7, 0x1e, 0x66, 0x37, 0xa1, 0x0c, 0x00, 0x00, + // 1504 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcb, 0x72, 0xdb, 0x46, + 0x16, 0x35, 0xf8, 0xe6, 0x25, 0x08, 0x82, 0x2d, 0x5b, 0xa2, 0x38, 0xe3, 0xb2, 0x8c, 0x19, 0xcf, + 0xc8, 0xaa, 0x29, 0x71, 0x2c, 0xaf, 0xc6, 0x35, 0x95, 0x2a, 0x99, 0xa2, 0x2d, 0xaa, 0xf4, 0x60, + 0x40, 0xca, 0x55, 0xf6, 0x06, 0x69, 0x11, 0x2d, 0x11, 0x15, 0xe2, 0x61, 0x74, 0xd3, 0x92, 0xca, + 0xe5, 0x4d, 0x7e, 0x21, 0xbb, 0x2c, 0xf3, 0x07, 0x59, 0x67, 0x97, 0x3f, 0x48, 0xe5, 0x03, 0xb2, + 0xc9, 0x27, 0xe4, 0x03, 0x52, 0xfd, 0x20, 0x08, 0x48, 0x94, 0x17, 0xde, 0x11, 0xa7, 0x4f, 0x9f, + 0xbe, 0x7d, 0xef, 0xed, 0xd3, 0x4d, 0xd0, 0xc7, 0x53, 0x8f, 0x04, 0x6c, 0x3b, 0x8a, 0x43, 0x16, + 0xa2, 0xf2, 0x34, 0x0c, 0xa3, 0x38, 0x1a, 0xb7, 0xff, 0x7e, 0x11, 0x86, 0x17, 0x53, 0xd2, 0xc1, + 0x91, 0xd7, 0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 0x5a, + 0x1b, 0x42, 0xba, 0x8d, 0x5a, 0x19, 0xe9, 0xf7, 0x9c, 0xd3, 0xf9, 0x88, 0x7d, 0xf6, 0x09, 0xbd, + 0x03, 0xe3, 0x35, 0x61, 0xb2, 0xd8, 0x5f, 0x14, 0xfd, 0xba, 0x58, 0x62, 0x05, 0x35, 0x53, 0x2d, + 0xa0, 0x82, 0xff, 0x26, 0xa5, 0xfd, 0x45, 0xe1, 0x3f, 0x12, 0xda, 0xeb, 0x68, 0x2d, 0xad, 0x9d, + 0x8e, 0xfe, 0x2d, 0xd4, 0xf9, 0x0a, 0x73, 0xdf, 0xa3, 0xa9, 0xfe, 0xcd, 0x98, 0x6b, 0x7b, 0xed, + 0x16, 0x9e, 0x3d, 0x13, 0xa8, 0x21, 0x96, 0xa0, 0x98, 0x75, 0xa4, 0xa1, 0x9e, 0x95, 0xc4, 0xff, + 0xa5, 0xe7, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x46, 0x6c, 0x13, 0xa0, 0x66, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/looprpc/client.proto b/looprpc/client.proto index 0e58de7..8d3d38b 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -242,9 +242,28 @@ message SwapResponse { bytes id_bytes = 3; /** - The address of the on-chain htlc. + DEPRECATED. This field stores the address of the onchain htlc, but + depending on the request, the semantics are different. + - For internal loop-in htlc_address contains the address of the + native segwit (P2WSH) htlc. + - For external loop-in htlc_address contains the address of the + nested segwit (NP2WSH) htlc. + - For loop-out htlc_address always contains the native segwit (P2WSH) + htlc address. */ - string htlc_address = 2; + string htlc_address = 2 [deprecated = true]; + + /** + The nested segwit address of the on-chain htlc. + This field remains empty for loop-out. + */ + string htlc_address_np2wsh = 4; + + /** + The native segwit address of the on-chain htlc. + Used for both loop-in and loop-out. + */ + string htlc_address_p2wsh = 5; } message MonitorRequest { @@ -292,9 +311,21 @@ message SwapStatus { int64 last_update_time = 6; /** - Htlc address. + DEPRECATED: This field stores the address of the onchain htlc. + - For internal loop-in htlc_address contains the address of the + native segwit (P2WSH) htlc. + - For external loop-in htlc_address contains the nested segwit (NP2WSH) + address. + - For loop-out htlc_address always contains the native segwit (P2WSH) + htlc address. */ - string htlc_address = 7; + string htlc_address = 7 [deprecated = true]; + + // HTLC address (native segwit), used in loop-in and loop-out swaps. + string htlc_address_p2wsh = 12; + + // HTLC address (nested segwit), used in loop-in swaps only. + string htlc_address_np2wsh = 13; /// Swap server cost int64 cost_server = 8; diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index 388cda6..75875ff 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -457,7 +457,15 @@ }, "htlc_address": { "type": "string", - "description": "*\nThe address of the on-chain htlc." + "description": "*\nDEPRECATED. This field stores the address of the onchain htlc, but\ndepending on the request, the semantics are different.\n- For internal loop-in htlc_address contains the address of the\nnative segwit (P2WSH) htlc.\n- For external loop-in htlc_address contains the address of the\nnested segwit (NP2WSH) htlc.\n- For loop-out htlc_address always contains the native segwit (P2WSH)\nhtlc address." + }, + "htlc_address_np2wsh": { + "type": "string", + "description": "*\nThe nested segwit address of the on-chain htlc.\nThis field remains empty for loop-out." + }, + "htlc_address_p2wsh": { + "type": "string", + "description": "*\nThe native segwit address of the on-chain htlc.\nUsed for both loop-in and loop-out." } } }, @@ -511,7 +519,15 @@ }, "htlc_address": { "type": "string", - "description": "*\nHtlc address." + "description": "*\nDEPRECATED: This field stores the address of the onchain htlc.\n- For internal loop-in htlc_address contains the address of the\nnative segwit (P2WSH) htlc.\n- For external loop-in htlc_address contains the nested segwit (NP2WSH)\naddress.\n- For loop-out htlc_address always contains the native segwit (P2WSH)\nhtlc address." + }, + "htlc_address_p2wsh": { + "type": "string", + "description": "HTLC address (native segwit), used in loop-in and loop-out swaps." + }, + "htlc_address_np2wsh": { + "type": "string", + "description": "HTLC address (nested segwit), used in loop-in swaps only." }, "cost_server": { "type": "string",