mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
multi: loop in swap
This commit is contained in:
parent
6a0a9556a0
commit
3e960b8b54
28 changed files with 2376 additions and 273 deletions
|
|
@ -29,20 +29,24 @@ type SwapType int32
|
|||
const (
|
||||
// LOOP_OUT indicates an loop out swap (off-chain to on-chain)
|
||||
SwapType_LOOP_OUT SwapType = 0
|
||||
// LOOP_IN indicates a loop in swap (on-chain to off-chain)
|
||||
SwapType_LOOP_IN SwapType = 1
|
||||
)
|
||||
|
||||
var SwapType_name = map[int32]string{
|
||||
0: "LOOP_OUT",
|
||||
1: "LOOP_IN",
|
||||
}
|
||||
var SwapType_value = map[string]int32{
|
||||
"LOOP_OUT": 0,
|
||||
"LOOP_IN": 1,
|
||||
}
|
||||
|
||||
func (x SwapType) String() string {
|
||||
return proto.EnumName(SwapType_name, int32(x))
|
||||
}
|
||||
func (SwapType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_client_ecf1f0d12250b1cb, []int{0}
|
||||
return fileDescriptor_client_e75b35e98d3b3b20, []int{0}
|
||||
}
|
||||
|
||||
type SwapState int32
|
||||
|
|
@ -61,6 +65,10 @@ const (
|
|||
// case where we wait for fees to come down before we sweep.
|
||||
SwapState_PREIMAGE_REVEALED SwapState = 1
|
||||
// *
|
||||
// HTLC_PUBLISHED is reached when the htlc tx has been published in a loop in
|
||||
// swap.
|
||||
SwapState_HTLC_PUBLISHED SwapState = 2
|
||||
// *
|
||||
// SUCCESS is the final swap state that is reached when the sweep tx has
|
||||
// the required confirmation depth.
|
||||
SwapState_SUCCESS SwapState = 3
|
||||
|
|
@ -73,12 +81,14 @@ const (
|
|||
var SwapState_name = map[int32]string{
|
||||
0: "INITIATED",
|
||||
1: "PREIMAGE_REVEALED",
|
||||
2: "HTLC_PUBLISHED",
|
||||
3: "SUCCESS",
|
||||
4: "FAILED",
|
||||
}
|
||||
var SwapState_value = map[string]int32{
|
||||
"INITIATED": 0,
|
||||
"PREIMAGE_REVEALED": 1,
|
||||
"HTLC_PUBLISHED": 2,
|
||||
"SUCCESS": 3,
|
||||
"FAILED": 4,
|
||||
}
|
||||
|
|
@ -87,7 +97,7 @@ func (x SwapState) String() string {
|
|||
return proto.EnumName(SwapState_name, int32(x))
|
||||
}
|
||||
func (SwapState) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_client_ecf1f0d12250b1cb, []int{1}
|
||||
return fileDescriptor_client_e75b35e98d3b3b20, []int{1}
|
||||
}
|
||||
|
||||
type LoopOutRequest struct {
|
||||
|
|
@ -145,7 +155,7 @@ func (m *LoopOutRequest) Reset() { *m = LoopOutRequest{} }
|
|||
func (m *LoopOutRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LoopOutRequest) ProtoMessage() {}
|
||||
func (*LoopOutRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_client_ecf1f0d12250b1cb, []int{0}
|
||||
return fileDescriptor_client_e75b35e98d3b3b20, []int{0}
|
||||
}
|
||||
func (m *LoopOutRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LoopOutRequest.Unmarshal(m, b)
|
||||
|
|
@ -221,6 +231,85 @@ func (m *LoopOutRequest) GetLoopOutChannel() uint64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
type LoopInRequest struct {
|
||||
// *
|
||||
// Requested swap amount in sat. This does not include the swap and miner
|
||||
// fee.
|
||||
Amt int64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
|
||||
// *
|
||||
// Maximum we are willing to pay the server for the swap. This value is not
|
||||
// disclosed in the swap initiation call, but if the server asks for a
|
||||
// higher fee, we abort the swap. Typically this value is taken from the
|
||||
// response of the GetQuote call. It includes the prepay amount.
|
||||
MaxSwapFee int64 `protobuf:"varint,2,opt,name=max_swap_fee,json=maxSwapFee,proto3" json:"max_swap_fee,omitempty"`
|
||||
// *
|
||||
// Maximum in on-chain fees that we are willing to spent. If we want to
|
||||
// publish the on-chain htlc and the fee estimate turns out higher than this
|
||||
// value, we cancel the swap.
|
||||
//
|
||||
// max_miner_fee is typically taken from the response of the GetQuote call.
|
||||
MaxMinerFee int64 `protobuf:"varint,3,opt,name=max_miner_fee,json=maxMinerFee,proto3" json:"max_miner_fee,omitempty"`
|
||||
// *
|
||||
// The channel to loop in. If zero, the channel to loop in is selected based
|
||||
// on the lowest routing fee for the swap payment from the server.
|
||||
LoopInChannel uint64 `protobuf:"varint,4,opt,name=loop_in_channel,json=loopInChannel,proto3" json:"loop_in_channel,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LoopInRequest) Reset() { *m = LoopInRequest{} }
|
||||
func (m *LoopInRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LoopInRequest) ProtoMessage() {}
|
||||
func (*LoopInRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_client_e75b35e98d3b3b20, []int{1}
|
||||
}
|
||||
func (m *LoopInRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LoopInRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LoopInRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LoopInRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *LoopInRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LoopInRequest.Merge(dst, src)
|
||||
}
|
||||
func (m *LoopInRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_LoopInRequest.Size(m)
|
||||
}
|
||||
func (m *LoopInRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LoopInRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LoopInRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *LoopInRequest) GetAmt() int64 {
|
||||
if m != nil {
|
||||
return m.Amt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *LoopInRequest) GetMaxSwapFee() int64 {
|
||||
if m != nil {
|
||||
return m.MaxSwapFee
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *LoopInRequest) GetMaxMinerFee() int64 {
|
||||
if m != nil {
|
||||
return m.MaxMinerFee
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *LoopInRequest) GetLoopInChannel() uint64 {
|
||||
if m != nil {
|
||||
return m.LoopInChannel
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SwapResponse struct {
|
||||
// *
|
||||
// Swap identifier to track status in the update stream that is returned from
|
||||
|
|
@ -235,7 +324,7 @@ func (m *SwapResponse) Reset() { *m = SwapResponse{} }
|
|||
func (m *SwapResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SwapResponse) ProtoMessage() {}
|
||||
func (*SwapResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_client_ecf1f0d12250b1cb, []int{1}
|
||||
return fileDescriptor_client_e75b35e98d3b3b20, []int{2}
|
||||
}
|
||||
func (m *SwapResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SwapResponse.Unmarshal(m, b)
|
||||
|
|
@ -272,7 +361,7 @@ func (m *MonitorRequest) Reset() { *m = MonitorRequest{} }
|
|||
func (m *MonitorRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*MonitorRequest) ProtoMessage() {}
|
||||
func (*MonitorRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_client_ecf1f0d12250b1cb, []int{2}
|
||||
return fileDescriptor_client_e75b35e98d3b3b20, []int{3}
|
||||
}
|
||||
func (m *MonitorRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MonitorRequest.Unmarshal(m, b)
|
||||
|
|
@ -325,7 +414,7 @@ func (m *SwapStatus) Reset() { *m = SwapStatus{} }
|
|||
func (m *SwapStatus) String() string { return proto.CompactTextString(m) }
|
||||
func (*SwapStatus) ProtoMessage() {}
|
||||
func (*SwapStatus) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_client_ecf1f0d12250b1cb, []int{3}
|
||||
return fileDescriptor_client_e75b35e98d3b3b20, []int{4}
|
||||
}
|
||||
func (m *SwapStatus) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SwapStatus.Unmarshal(m, b)
|
||||
|
|
@ -404,7 +493,7 @@ func (m *TermsRequest) Reset() { *m = TermsRequest{} }
|
|||
func (m *TermsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*TermsRequest) ProtoMessage() {}
|
||||
func (*TermsRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_client_ecf1f0d12250b1cb, []int{4}
|
||||
return fileDescriptor_client_e75b35e98d3b3b20, []int{5}
|
||||
}
|
||||
func (m *TermsRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TermsRequest.Unmarshal(m, b)
|
||||
|
|
@ -446,10 +535,7 @@ type TermsResponse struct {
|
|||
MaxSwapAmount int64 `protobuf:"varint,6,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"`
|
||||
// *
|
||||
// On-chain cltv expiry delta
|
||||
CltvDelta int32 `protobuf:"varint,7,opt,name=cltv_delta,json=cltvDelta,proto3" json:"cltv_delta,omitempty"`
|
||||
// *
|
||||
// Maximum cltv expiry delta
|
||||
MaxCltv int32 `protobuf:"varint,8,opt,name=max_cltv,json=maxCltv,proto3" json:"max_cltv,omitempty"`
|
||||
CltvDelta int32 `protobuf:"varint,7,opt,name=cltv_delta,json=cltvDelta,proto3" json:"cltv_delta,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
|
|
@ -459,7 +545,7 @@ func (m *TermsResponse) Reset() { *m = TermsResponse{} }
|
|||
func (m *TermsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*TermsResponse) ProtoMessage() {}
|
||||
func (*TermsResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_client_ecf1f0d12250b1cb, []int{5}
|
||||
return fileDescriptor_client_e75b35e98d3b3b20, []int{6}
|
||||
}
|
||||
func (m *TermsResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TermsResponse.Unmarshal(m, b)
|
||||
|
|
@ -528,13 +614,6 @@ func (m *TermsResponse) GetCltvDelta() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (m *TermsResponse) GetMaxCltv() int32 {
|
||||
if m != nil {
|
||||
return m.MaxCltv
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type QuoteRequest struct {
|
||||
// *
|
||||
// The amount to swap in satoshis.
|
||||
|
|
@ -548,7 +627,7 @@ func (m *QuoteRequest) Reset() { *m = QuoteRequest{} }
|
|||
func (m *QuoteRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QuoteRequest) ProtoMessage() {}
|
||||
func (*QuoteRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_client_ecf1f0d12250b1cb, []int{6}
|
||||
return fileDescriptor_client_e75b35e98d3b3b20, []int{7}
|
||||
}
|
||||
func (m *QuoteRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_QuoteRequest.Unmarshal(m, b)
|
||||
|
|
@ -594,7 +673,7 @@ func (m *QuoteResponse) Reset() { *m = QuoteResponse{} }
|
|||
func (m *QuoteResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QuoteResponse) ProtoMessage() {}
|
||||
func (*QuoteResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_client_ecf1f0d12250b1cb, []int{7}
|
||||
return fileDescriptor_client_e75b35e98d3b3b20, []int{8}
|
||||
}
|
||||
func (m *QuoteResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_QuoteResponse.Unmarshal(m, b)
|
||||
|
|
@ -637,6 +716,7 @@ func (m *QuoteResponse) GetMinerFee() int64 {
|
|||
|
||||
func init() {
|
||||
proto.RegisterType((*LoopOutRequest)(nil), "looprpc.LoopOutRequest")
|
||||
proto.RegisterType((*LoopInRequest)(nil), "looprpc.LoopInRequest")
|
||||
proto.RegisterType((*SwapResponse)(nil), "looprpc.SwapResponse")
|
||||
proto.RegisterType((*MonitorRequest)(nil), "looprpc.MonitorRequest")
|
||||
proto.RegisterType((*SwapStatus)(nil), "looprpc.SwapStatus")
|
||||
|
|
@ -666,6 +746,12 @@ type SwapClientClient interface {
|
|||
// point onwards, progress can be tracked via the SwapStatus stream that is
|
||||
// returned from Monitor().
|
||||
LoopOut(ctx context.Context, in *LoopOutRequest, opts ...grpc.CallOption) (*SwapResponse, error)
|
||||
// *
|
||||
// LoopIn initiates a loop in swap with the given parameters. The call
|
||||
// returns after the swap has been set up with the swap server. From that
|
||||
// point onwards, progress can be tracked via the SwapStatus stream
|
||||
// that is returned from Monitor().
|
||||
LoopIn(ctx context.Context, in *LoopInRequest, opts ...grpc.CallOption) (*SwapResponse, error)
|
||||
// * loop: `monitor`
|
||||
// Monitor will return a stream of swap updates for currently active swaps.
|
||||
// TODO: add MonitorSync version for REST clients.
|
||||
|
|
@ -677,6 +763,12 @@ type SwapClientClient interface {
|
|||
// LoopOutQuote returns a quote for a loop out swap with the provided
|
||||
// parameters.
|
||||
LoopOutQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*QuoteResponse, error)
|
||||
// *
|
||||
// GetTerms returns the terms that the server enforces for swaps.
|
||||
GetLoopInTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*TermsResponse, error)
|
||||
// *
|
||||
// GetQuote returns a quote for a swap with the provided parameters.
|
||||
GetLoopInQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*QuoteResponse, error)
|
||||
}
|
||||
|
||||
type swapClientClient struct {
|
||||
|
|
@ -696,6 +788,15 @@ func (c *swapClientClient) LoopOut(ctx context.Context, in *LoopOutRequest, opts
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *swapClientClient) LoopIn(ctx context.Context, in *LoopInRequest, opts ...grpc.CallOption) (*SwapResponse, error) {
|
||||
out := new(SwapResponse)
|
||||
err := c.cc.Invoke(ctx, "/looprpc.SwapClient/LoopIn", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *swapClientClient) Monitor(ctx context.Context, in *MonitorRequest, opts ...grpc.CallOption) (SwapClient_MonitorClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_SwapClient_serviceDesc.Streams[0], "/looprpc.SwapClient/Monitor", opts...)
|
||||
if err != nil {
|
||||
|
|
@ -746,6 +847,24 @@ func (c *swapClientClient) LoopOutQuote(ctx context.Context, in *QuoteRequest, o
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *swapClientClient) GetLoopInTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*TermsResponse, error) {
|
||||
out := new(TermsResponse)
|
||||
err := c.cc.Invoke(ctx, "/looprpc.SwapClient/GetLoopInTerms", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *swapClientClient) GetLoopInQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*QuoteResponse, error) {
|
||||
out := new(QuoteResponse)
|
||||
err := c.cc.Invoke(ctx, "/looprpc.SwapClient/GetLoopInQuote", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SwapClientServer is the server API for SwapClient service.
|
||||
type SwapClientServer interface {
|
||||
// * loop: `out`
|
||||
|
|
@ -754,6 +873,12 @@ type SwapClientServer interface {
|
|||
// point onwards, progress can be tracked via the SwapStatus stream that is
|
||||
// returned from Monitor().
|
||||
LoopOut(context.Context, *LoopOutRequest) (*SwapResponse, error)
|
||||
// *
|
||||
// LoopIn initiates a loop in swap with the given parameters. The call
|
||||
// returns after the swap has been set up with the swap server. From that
|
||||
// point onwards, progress can be tracked via the SwapStatus stream
|
||||
// that is returned from Monitor().
|
||||
LoopIn(context.Context, *LoopInRequest) (*SwapResponse, error)
|
||||
// * loop: `monitor`
|
||||
// Monitor will return a stream of swap updates for currently active swaps.
|
||||
// TODO: add MonitorSync version for REST clients.
|
||||
|
|
@ -765,6 +890,12 @@ type SwapClientServer interface {
|
|||
// LoopOutQuote returns a quote for a loop out swap with the provided
|
||||
// parameters.
|
||||
LoopOutQuote(context.Context, *QuoteRequest) (*QuoteResponse, error)
|
||||
// *
|
||||
// GetTerms returns the terms that the server enforces for swaps.
|
||||
GetLoopInTerms(context.Context, *TermsRequest) (*TermsResponse, error)
|
||||
// *
|
||||
// GetQuote returns a quote for a swap with the provided parameters.
|
||||
GetLoopInQuote(context.Context, *QuoteRequest) (*QuoteResponse, error)
|
||||
}
|
||||
|
||||
func RegisterSwapClientServer(s *grpc.Server, srv SwapClientServer) {
|
||||
|
|
@ -789,6 +920,24 @@ func _SwapClient_LoopOut_Handler(srv interface{}, ctx context.Context, dec func(
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SwapClient_LoopIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LoopInRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SwapClientServer).LoopIn(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/looprpc.SwapClient/LoopIn",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SwapClientServer).LoopIn(ctx, req.(*LoopInRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SwapClient_Monitor_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(MonitorRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
|
|
@ -846,6 +995,42 @@ func _SwapClient_LoopOutQuote_Handler(srv interface{}, ctx context.Context, dec
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SwapClient_GetLoopInTerms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TermsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SwapClientServer).GetLoopInTerms(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/looprpc.SwapClient/GetLoopInTerms",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SwapClientServer).GetLoopInTerms(ctx, req.(*TermsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SwapClient_GetLoopInQuote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QuoteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SwapClientServer).GetLoopInQuote(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/looprpc.SwapClient/GetLoopInQuote",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SwapClientServer).GetLoopInQuote(ctx, req.(*QuoteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _SwapClient_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "looprpc.SwapClient",
|
||||
HandlerType: (*SwapClientServer)(nil),
|
||||
|
|
@ -854,6 +1039,10 @@ var _SwapClient_serviceDesc = grpc.ServiceDesc{
|
|||
MethodName: "LoopOut",
|
||||
Handler: _SwapClient_LoopOut_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "LoopIn",
|
||||
Handler: _SwapClient_LoopIn_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "LoopOutTerms",
|
||||
Handler: _SwapClient_LoopOutTerms_Handler,
|
||||
|
|
@ -862,6 +1051,14 @@ var _SwapClient_serviceDesc = grpc.ServiceDesc{
|
|||
MethodName: "LoopOutQuote",
|
||||
Handler: _SwapClient_LoopOutQuote_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetLoopInTerms",
|
||||
Handler: _SwapClient_GetLoopInTerms_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetLoopInQuote",
|
||||
Handler: _SwapClient_GetLoopInQuote_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
|
|
@ -873,60 +1070,65 @@ var _SwapClient_serviceDesc = grpc.ServiceDesc{
|
|||
Metadata: "client.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("client.proto", fileDescriptor_client_ecf1f0d12250b1cb) }
|
||||
func init() { proto.RegisterFile("client.proto", fileDescriptor_client_e75b35e98d3b3b20) }
|
||||
|
||||
var fileDescriptor_client_ecf1f0d12250b1cb = []byte{
|
||||
// 825 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0xcb, 0x72, 0xe3, 0x44,
|
||||
0x14, 0x1d, 0xc9, 0x4e, 0x6c, 0xdd, 0xc8, 0x8a, 0xdd, 0xf3, 0xf2, 0x18, 0x86, 0x32, 0x2a, 0x1e,
|
||||
0xae, 0x2c, 0x22, 0xc8, 0xac, 0x60, 0x67, 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 0x91, 0xcd, 0x5c, 0x6f, 0x56, 0x8a, 0x86, 0xe0, 0xef, 0x4f, 0x51, 0xd4,
|
||||
0x03, 0x4d, 0x05, 0xab, 0xae, 0x18, 0x9f, 0x40, 0x50, 0x91, 0x55, 0x17, 0x3f, 0xd4, 0x1c, 0x7f,
|
||||
0x2f, 0x37, 0x66, 0x12, 0x85, 0xd0, 0x51, 0x2c, 0x96, 0x64, 0xb4, 0xd0, 0x42, 0x2d, 0x4d, 0x3a,
|
||||
0x62, 0x64, 0x73, 0xa9, 0x30, 0xa5, 0x34, 0x82, 0xae, 0xf2, 0x2c, 0xe6, 0xa5, 0x8c, 0x57, 0x6f,
|
||||
0x48, 0x96, 0xd1, 0xb4, 0xdf, 0x1e, 0x3a, 0xa3, 0x26, 0x0e, 0x52, 0xe3, 0xd0, 0xc4, 0xa0, 0xe1,
|
||||
0x47, 0xe0, 0xeb, 0xc7, 0x51, 0x91, 0xf3, 0x4c, 0x50, 0x14, 0x80, 0x9b, 0xac, 0xb5, 0x61, 0x1e,
|
||||
0x76, 0x93, 0x75, 0xd8, 0x85, 0xe0, 0x92, 0x67, 0x89, 0xe4, 0x85, 0xf5, 0x34, 0xfc, 0xc7, 0x01,
|
||||
0x50, 0x25, 0x0b, 0x49, 0x64, 0x29, 0xfe, 0xc7, 0x62, 0x23, 0xe1, 0xee, 0x24, 0xd0, 0xa7, 0xd0,
|
||||
0x94, 0xdb, 0xdc, 0xd8, 0x19, 0x9c, 0xf5, 0x4e, 0x6d, 0x37, 0x4f, 0x95, 0xc8, 0x72, 0x9b, 0x53,
|
||||
0xac, 0xb7, 0xd1, 0x08, 0x0e, 0x84, 0x24, 0xd2, 0x78, 0x18, 0x9c, 0xa1, 0x1a, 0x4f, 0x1d, 0x46,
|
||||
0xb1, 0x21, 0xa0, 0xcf, 0xe1, 0x38, 0xc9, 0x12, 0x99, 0xe8, 0xee, 0xc7, 0x32, 0x61, 0x3b, 0x33,
|
||||
0x83, 0x3b, 0x78, 0x99, 0x30, 0x63, 0x03, 0x11, 0x32, 0x2e, 0xf3, 0x35, 0x91, 0xd4, 0x30, 0x8d,
|
||||
0xa5, 0x81, 0xc2, 0xaf, 0x35, 0xac, 0x99, 0x1f, 0x83, 0xff, 0x46, 0xa6, 0xab, 0x98, 0xac, 0xd7,
|
||||
0x05, 0x15, 0x42, 0x7b, 0xea, 0xe1, 0x23, 0x85, 0x8d, 0x0d, 0x14, 0x06, 0xe0, 0x2f, 0x69, 0xc1,
|
||||
0xc4, 0xce, 0x87, 0xdf, 0x5d, 0xe8, 0x58, 0xc0, 0x7a, 0x77, 0x02, 0x3d, 0xdd, 0xdd, 0x9c, 0x6c,
|
||||
0x19, 0xcd, 0x64, 0xac, 0x83, 0x66, 0xac, 0x3c, 0x56, 0x1b, 0x73, 0x83, 0x9f, 0xab, 0xcc, 0x85,
|
||||
0xd0, 0xd9, 0x25, 0x21, 0x7e, 0x45, 0x04, 0xd5, 0x7e, 0x35, 0xf0, 0x91, 0x30, 0x59, 0xf8, 0x86,
|
||||
0x08, 0x5a, 0xe3, 0x14, 0xca, 0x99, 0x46, 0x8d, 0x83, 0x95, 0x17, 0xcf, 0x01, 0x2a, 0x79, 0x31,
|
||||
0xf1, 0xf3, 0xf2, 0x7d, 0x58, 0x3e, 0x83, 0x63, 0x96, 0x64, 0x26, 0x74, 0x84, 0xf1, 0x32, 0x93,
|
||||
0xd6, 0xaa, 0x0e, 0x4b, 0x32, 0x65, 0xec, 0x58, 0x83, 0x9a, 0xb7, 0x0b, 0xa7, 0xe5, 0x1d, 0x5a,
|
||||
0x9e, 0xc9, 0xa7, 0xe5, 0x3d, 0x07, 0x58, 0xa5, 0xf2, 0x36, 0x5e, 0xd3, 0x54, 0x12, 0xed, 0xd2,
|
||||
0x01, 0xf6, 0x14, 0x72, 0xae, 0x00, 0xf4, 0x0c, 0xda, 0x4a, 0x46, 0x01, 0x3a, 0x6f, 0x07, 0xb8,
|
||||
0xc5, 0xc8, 0x66, 0x92, 0xca, 0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, 0x9a, 0xf5, 0x69, 0x1d, 0x3c, 0xfc, 0xcf, 0x18, 0x95, 0xe2, 0x0b, 0x07, 0xfd, 0x04, 0xbe,
|
||||
0x3d, 0x5c, 0x47, 0x18, 0xdd, 0x1d, 0x5d, 0xcd, 0xf8, 0xe0, 0xc9, 0x7d, 0xd8, 0x5e, 0x69, 0xa0,
|
||||
0xaf, 0xf4, 0x08, 0xa1, 0xea, 0x95, 0x22, 0xa9, 0xa5, 0xe2, 0xbd, 0xb4, 0xee, 0x66, 0x45, 0xba,
|
||||
0xda, 0xff, 0x8a, 0x74, 0xad, 0xe9, 0xe1, 0x50, 0x4b, 0x0f, 0x50, 0xbf, 0x26, 0xfd, 0x56, 0x71,
|
||||
0xa2, 0x9f, 0x09, 0x93, 0xbf, 0xbc, 0x3a, 0xd4, 0xdf, 0xfd, 0x8b, 0x7f, 0x03, 0x00, 0x00, 0xff,
|
||||
0xff, 0x2d, 0xba, 0xce, 0x65, 0x25, 0x06, 0x00, 0x00,
|
||||
var fileDescriptor_client_e75b35e98d3b3b20 = []byte{
|
||||
// 901 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xdd, 0x72, 0xdb, 0x44,
|
||||
0x18, 0xad, 0x64, 0xc7, 0x3f, 0x5f, 0x64, 0x45, 0xde, 0xb6, 0xa9, 0x31, 0x94, 0x31, 0x1a, 0x5a,
|
||||
0x3c, 0xb9, 0x88, 0x21, 0xbd, 0x60, 0xe0, 0x86, 0x71, 0x6d, 0xb7, 0xf5, 0x8c, 0xd3, 0x18, 0xd9,
|
||||
0x61, 0x86, 0x1b, 0x34, 0x5b, 0x7b, 0x9b, 0x6a, 0x46, 0xda, 0x55, 0xa5, 0x55, 0x9b, 0x0c, 0xc3,
|
||||
0x0d, 0x2f, 0xc0, 0x00, 0x6f, 0xc2, 0xab, 0xf0, 0x0a, 0xbc, 0x02, 0xf7, 0xcc, 0xfe, 0x48, 0x95,
|
||||
0x1c, 0x72, 0x93, 0x3b, 0xf9, 0xdb, 0xb3, 0x67, 0xcf, 0x9e, 0xef, 0x7c, 0x6b, 0xb0, 0x36, 0x61,
|
||||
0x40, 0x28, 0x3f, 0x8e, 0x13, 0xc6, 0x19, 0x6a, 0x86, 0x8c, 0xc5, 0x49, 0xbc, 0xe9, 0x7f, 0x72,
|
||||
0xc1, 0xd8, 0x45, 0x48, 0x46, 0x38, 0x0e, 0x46, 0x98, 0x52, 0xc6, 0x31, 0x0f, 0x18, 0x4d, 0x15,
|
||||
0xcc, 0xfd, 0xcb, 0x04, 0x7b, 0xc1, 0x58, 0x7c, 0x96, 0x71, 0x8f, 0xbc, 0xcd, 0x48, 0xca, 0x91,
|
||||
0x03, 0x35, 0x1c, 0xf1, 0x9e, 0x31, 0x30, 0x86, 0x35, 0x4f, 0x7c, 0x22, 0x04, 0xf5, 0x2d, 0x49,
|
||||
0x79, 0xcf, 0x1c, 0x18, 0xc3, 0xb6, 0x27, 0xbf, 0xd1, 0x08, 0xee, 0x45, 0xf8, 0xd2, 0x4f, 0xdf,
|
||||
0xe3, 0xd8, 0x4f, 0x58, 0xc6, 0x03, 0x7a, 0xe1, 0xbf, 0x26, 0xa4, 0x57, 0x93, 0xdb, 0xba, 0x11,
|
||||
0xbe, 0x5c, 0xbd, 0xc7, 0xb1, 0xa7, 0x56, 0x9e, 0x11, 0x82, 0x9e, 0xc0, 0xa1, 0xd8, 0x10, 0x27,
|
||||
0x24, 0xc6, 0x57, 0x95, 0x2d, 0x75, 0xb9, 0xe5, 0x6e, 0x84, 0x2f, 0x97, 0x72, 0xb1, 0xb4, 0x69,
|
||||
0x00, 0x56, 0x71, 0x8a, 0x80, 0xee, 0x49, 0x28, 0x68, 0x76, 0x81, 0xf8, 0x1c, 0xec, 0x12, 0xad,
|
||||
0x10, 0xde, 0x90, 0x18, 0xab, 0xa0, 0x1b, 0x47, 0x1c, 0xb9, 0xd0, 0x11, 0xa8, 0x28, 0xa0, 0x24,
|
||||
0x91, 0x44, 0x4d, 0x09, 0xda, 0x8f, 0xf0, 0xe5, 0xa9, 0xa8, 0x09, 0xa6, 0x21, 0x38, 0xc2, 0x33,
|
||||
0x9f, 0x65, 0xdc, 0xdf, 0xbc, 0xc1, 0x94, 0x92, 0xb0, 0xd7, 0x1a, 0x18, 0xc3, 0xba, 0x67, 0x87,
|
||||
0xca, 0xa1, 0x89, 0xaa, 0xba, 0xbf, 0x19, 0xd0, 0x11, 0xa6, 0xcd, 0xe9, 0xcd, 0x9e, 0xed, 0x2a,
|
||||
0x37, 0xaf, 0x29, 0xbf, 0xa6, 0xa9, 0x76, 0x5d, 0xd3, 0x63, 0x38, 0x90, 0x9a, 0x02, 0x5a, 0x48,
|
||||
0xaa, 0x4b, 0x49, 0x9d, 0x50, 0x9e, 0x9f, 0x2b, 0xfa, 0x14, 0x2c, 0x69, 0x37, 0x49, 0x63, 0x46,
|
||||
0x53, 0x82, 0x6c, 0x30, 0x83, 0xad, 0x94, 0xd3, 0xf6, 0xcc, 0x60, 0xeb, 0x3a, 0x60, 0x9f, 0x32,
|
||||
0x1a, 0x70, 0x96, 0x68, 0xc5, 0xee, 0xbf, 0x06, 0x80, 0xd8, 0xb2, 0xe2, 0x98, 0x67, 0xe9, 0xff,
|
||||
0x5c, 0x40, 0x51, 0x98, 0x39, 0x05, 0x7a, 0x04, 0x75, 0x7e, 0x15, 0x2b, 0x95, 0xf6, 0x49, 0xf7,
|
||||
0x58, 0xe7, 0xeb, 0x58, 0x90, 0xac, 0xaf, 0x62, 0xe2, 0xc9, 0x65, 0x34, 0x84, 0xbd, 0x94, 0x63,
|
||||
0xae, 0xba, 0x6a, 0x9f, 0xa0, 0x0a, 0x4e, 0x1c, 0x46, 0x3c, 0x05, 0x40, 0x5f, 0xc0, 0x41, 0x40,
|
||||
0x03, 0x1e, 0xc8, 0x3c, 0xfa, 0x3c, 0x88, 0xf2, 0xf6, 0xda, 0x1f, 0xca, 0xeb, 0x20, 0x52, 0x8d,
|
||||
0xc1, 0x29, 0xf7, 0xb3, 0x78, 0x8b, 0x39, 0x51, 0x48, 0xd5, 0x64, 0x5b, 0xd4, 0xcf, 0x65, 0x59,
|
||||
0x22, 0x3f, 0x03, 0xeb, 0x0d, 0x0f, 0x37, 0x3e, 0xde, 0x6e, 0x13, 0x92, 0xa6, 0xb2, 0xcb, 0x6d,
|
||||
0x6f, 0x5f, 0xd4, 0xc6, 0xaa, 0xe4, 0xda, 0x60, 0xad, 0x49, 0x12, 0xa5, 0xb9, 0x0f, 0xbf, 0x9b,
|
||||
0xd0, 0xd1, 0x05, 0xed, 0xdd, 0x11, 0x74, 0x65, 0xd7, 0x62, 0x7c, 0x15, 0x11, 0xca, 0x7d, 0x19,
|
||||
0x7d, 0x65, 0xe5, 0x81, 0x58, 0x58, 0xaa, 0xfa, 0x54, 0xf4, 0xdd, 0x85, 0x4e, 0xde, 0x61, 0xff,
|
||||
0x15, 0x4e, 0xf3, 0x36, 0xef, 0xa7, 0xaa, 0xc7, 0x4f, 0x71, 0x4a, 0x2a, 0x98, 0x44, 0x38, 0x53,
|
||||
0xab, 0x60, 0x3c, 0xe1, 0xc5, 0x43, 0x80, 0x52, 0x82, 0xd5, 0x40, 0xb4, 0xe3, 0x22, 0xbe, 0x8f,
|
||||
0xe1, 0x20, 0x0a, 0xa8, 0x0a, 0x13, 0x8e, 0x58, 0x46, 0xb9, 0xb6, 0xaa, 0x13, 0x05, 0x54, 0x18,
|
||||
0x3b, 0x96, 0x45, 0x89, 0xcb, 0x43, 0xa7, 0x71, 0x0d, 0x8d, 0x53, 0xb9, 0xd3, 0xb8, 0x87, 0x00,
|
||||
0x9b, 0x90, 0xbf, 0xf3, 0xb7, 0x24, 0xe4, 0x58, 0xba, 0xb4, 0xe7, 0xb5, 0x45, 0x65, 0x2a, 0x0a,
|
||||
0xee, 0x00, 0xac, 0xef, 0x33, 0xc6, 0xc9, 0x8d, 0xe9, 0x76, 0x5f, 0x43,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, 0x8d, 0x23, 0xf4, 0x35, 0x34, 0xd4, 0x93, 0x82,
|
||||
0x0e, 0x2b, 0x94, 0xc5, 0x1b, 0x73, 0x03, 0x23, 0xfa, 0x06, 0x9a, 0x7a, 0xb4, 0x4b, 0x62, 0xaa,
|
||||
0xc3, 0xde, 0xbf, 0x7b, 0x6d, 0x0a, 0xb3, 0xf4, 0x4b, 0x03, 0xfd, 0x08, 0x96, 0x56, 0x2d, 0x27,
|
||||
0x00, 0x7d, 0x38, 0xa1, 0x3c, 0x22, 0xfd, 0xc3, 0xdd, 0xb2, 0xbe, 0x4b, 0x5f, 0xde, 0xe5, 0x1e,
|
||||
0x42, 0xe5, 0xbb, 0x8c, 0xb8, 0xa4, 0xf2, 0x0b, 0x6a, 0x99, 0x93, 0x12, 0x75, 0x39, 0x59, 0x25,
|
||||
0xea, 0x4a, 0x9c, 0xdc, 0x81, 0xa4, 0xee, 0xa3, 0x5e, 0x85, 0xfa, 0xad, 0xc0, 0x8c, 0x7e, 0xc6,
|
||||
0x11, 0xff, 0x05, 0x7d, 0x07, 0xf6, 0x73, 0xc2, 0x95, 0x43, 0xb7, 0x51, 0x5f, 0x21, 0xb8, 0x8d,
|
||||
0xc6, 0x57, 0x0d, 0xf9, 0x0f, 0xfa, 0xe4, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x17, 0x23, 0x70,
|
||||
0x9a, 0x78, 0x07, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,14 @@ service SwapClient {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
LoopIn initiates a loop in swap with the given parameters. The call
|
||||
returns after the swap has been set up with the swap server. From that
|
||||
point onwards, progress can be tracked via the SwapStatus stream
|
||||
that is returned from Monitor().
|
||||
*/
|
||||
rpc LoopIn(LoopInRequest) returns (SwapResponse);
|
||||
|
||||
/** loop: `monitor`
|
||||
Monitor will return a stream of swap updates for currently active swaps.
|
||||
TODO: add MonitorSync version for REST clients.
|
||||
|
|
@ -46,6 +54,16 @@ service SwapClient {
|
|||
get: "/v1/loop/out/quote/{amt}"
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
GetTerms returns the terms that the server enforces for swaps.
|
||||
*/
|
||||
rpc GetLoopInTerms(TermsRequest) returns(TermsResponse);
|
||||
|
||||
/**
|
||||
GetQuote returns a quote for a swap with the provided parameters.
|
||||
*/
|
||||
rpc GetLoopInQuote(QuoteRequest) returns(QuoteResponse);
|
||||
}
|
||||
|
||||
message LoopOutRequest {
|
||||
|
|
@ -111,6 +129,36 @@ message LoopOutRequest {
|
|||
uint64 loop_out_channel = 8;
|
||||
}
|
||||
|
||||
message LoopInRequest {
|
||||
/**
|
||||
Requested swap amount in sat. This does not include the swap and miner
|
||||
fee.
|
||||
*/
|
||||
int64 amt = 1;
|
||||
|
||||
/**
|
||||
Maximum we are willing to pay the server for the swap. This value is not
|
||||
disclosed in the swap initiation call, but if the server asks for a
|
||||
higher fee, we abort the swap. Typically this value is taken from the
|
||||
response of the GetQuote call.
|
||||
*/
|
||||
int64 max_swap_fee = 2;
|
||||
|
||||
/**
|
||||
Maximum in on-chain fees that we are willing to spent. If we want to
|
||||
publish the on-chain htlc and the fee estimate turns out higher than this
|
||||
value, we cancel the swap.
|
||||
|
||||
max_miner_fee is typically taken from the response of the GetQuote call.
|
||||
*/
|
||||
int64 max_miner_fee = 3;
|
||||
|
||||
/**
|
||||
The channel to loop in. If zero, the channel to loop in is selected based
|
||||
on the lowest routing fee for the swap payment from the server.
|
||||
*/
|
||||
uint64 loop_in_channel = 4;
|
||||
}
|
||||
|
||||
message SwapResponse {
|
||||
/**
|
||||
|
|
@ -165,6 +213,9 @@ message SwapStatus {
|
|||
enum SwapType {
|
||||
// LOOP_OUT indicates an loop out swap (off-chain to on-chain)
|
||||
LOOP_OUT = 0;
|
||||
|
||||
// LOOP_IN indicates a loop in swap (on-chain to off-chain)
|
||||
LOOP_IN = 1;
|
||||
}
|
||||
|
||||
enum SwapState {
|
||||
|
|
@ -184,6 +235,12 @@ enum SwapState {
|
|||
*/
|
||||
PREIMAGE_REVEALED = 1;
|
||||
|
||||
/**
|
||||
HTLC_PUBLISHED is reached when the htlc tx has been published in a loop in
|
||||
swap.
|
||||
*/
|
||||
HTLC_PUBLISHED = 2;
|
||||
|
||||
/**
|
||||
SUCCESS is the final swap state that is reached when the sweep tx has
|
||||
the required confirmation depth.
|
||||
|
|
@ -236,11 +293,6 @@ message TermsResponse {
|
|||
On-chain cltv expiry delta
|
||||
*/
|
||||
int32 cltv_delta = 7;
|
||||
|
||||
/**
|
||||
Maximum cltv expiry delta
|
||||
*/
|
||||
int32 max_cltv = 8;
|
||||
}
|
||||
|
||||
message QuoteRequest {
|
||||
|
|
|
|||
|
|
@ -165,11 +165,12 @@
|
|||
"enum": [
|
||||
"INITIATED",
|
||||
"PREIMAGE_REVEALED",
|
||||
"HTLC_PUBLISHED",
|
||||
"SUCCESS",
|
||||
"FAILED"
|
||||
],
|
||||
"default": "INITIATED",
|
||||
"description": " - INITIATED: *\nINITIATED is the initial state of a swap. At that point, the initiation\ncall to the server has been made and the payment process has been started\nfor the swap and prepayment invoices.\n - PREIMAGE_REVEALED: *\nPREIMAGE_REVEALED is reached when the sweep tx publication is first\nattempted. From that point on, we should consider the preimage to no\nlonger be secret and we need to do all we can to get the sweep confirmed.\nThis state will mostly coalesce with StateHtlcConfirmed, except in the\ncase where we wait for fees to come down before we sweep.\n - SUCCESS: *\nSUCCESS is the final swap state that is reached when the sweep tx has\nthe required confirmation depth.\n - FAILED: *\nFAILED is the final swap state for a failed swap with or without loss of\nthe swap amount."
|
||||
"description": " - INITIATED: *\nINITIATED is the initial state of a swap. At that point, the initiation\ncall to the server has been made and the payment process has been started\nfor the swap and prepayment invoices.\n - PREIMAGE_REVEALED: *\nPREIMAGE_REVEALED is reached when the sweep tx publication is first\nattempted. From that point on, we should consider the preimage to no\nlonger be secret and we need to do all we can to get the sweep confirmed.\nThis state will mostly coalesce with StateHtlcConfirmed, except in the\ncase where we wait for fees to come down before we sweep.\n - HTLC_PUBLISHED: *\nHTLC_PUBLISHED is reached when the htlc tx has been published in a loop in\nswap.\n - SUCCESS: *\nSUCCESS is the final swap state that is reached when the sweep tx has\nthe required confirmation depth.\n - FAILED: *\nFAILED is the final swap state for a failed swap with or without loss of\nthe swap amount."
|
||||
},
|
||||
"looprpcSwapStatus": {
|
||||
"type": "object",
|
||||
|
|
@ -210,10 +211,11 @@
|
|||
"looprpcSwapType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"LOOP_OUT"
|
||||
"LOOP_OUT",
|
||||
"LOOP_IN"
|
||||
],
|
||||
"default": "LOOP_OUT",
|
||||
"title": "- LOOP_OUT: LOOP_OUT indicates an loop out swap (off-chain to on-chain)"
|
||||
"title": "- LOOP_OUT: LOOP_OUT indicates an loop out swap (off-chain to on-chain)\n - LOOP_IN: LOOP_IN indicates a loop in swap (on-chain to off-chain)"
|
||||
},
|
||||
"looprpcTermsResponse": {
|
||||
"type": "object",
|
||||
|
|
@ -251,11 +253,6 @@
|
|||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "*\nOn-chain cltv expiry delta"
|
||||
},
|
||||
"max_cltv": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "*\nMaximum cltv expiry delta"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ func (m *ServerLoopOutRequest) Reset() { *m = ServerLoopOutRequest{} }
|
|||
func (m *ServerLoopOutRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ServerLoopOutRequest) ProtoMessage() {}
|
||||
func (*ServerLoopOutRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_server_76a33eec530f39a2, []int{0}
|
||||
return fileDescriptor_server_1f6c9db5f7136644, []int{0}
|
||||
}
|
||||
func (m *ServerLoopOutRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ServerLoopOutRequest.Unmarshal(m, b)
|
||||
|
|
@ -92,7 +92,7 @@ func (m *ServerLoopOutResponse) Reset() { *m = ServerLoopOutResponse{} }
|
|||
func (m *ServerLoopOutResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ServerLoopOutResponse) ProtoMessage() {}
|
||||
func (*ServerLoopOutResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_server_76a33eec530f39a2, []int{1}
|
||||
return fileDescriptor_server_1f6c9db5f7136644, []int{1}
|
||||
}
|
||||
func (m *ServerLoopOutResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ServerLoopOutResponse.Unmarshal(m, b)
|
||||
|
|
@ -150,7 +150,7 @@ func (m *ServerLoopOutQuoteRequest) Reset() { *m = ServerLoopOutQuoteReq
|
|||
func (m *ServerLoopOutQuoteRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ServerLoopOutQuoteRequest) ProtoMessage() {}
|
||||
func (*ServerLoopOutQuoteRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_server_76a33eec530f39a2, []int{2}
|
||||
return fileDescriptor_server_1f6c9db5f7136644, []int{2}
|
||||
}
|
||||
func (m *ServerLoopOutQuoteRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ServerLoopOutQuoteRequest.Unmarshal(m, b)
|
||||
|
|
@ -187,7 +187,7 @@ func (m *ServerLoopOutQuote) Reset() { *m = ServerLoopOutQuote{} }
|
|||
func (m *ServerLoopOutQuote) String() string { return proto.CompactTextString(m) }
|
||||
func (*ServerLoopOutQuote) ProtoMessage() {}
|
||||
func (*ServerLoopOutQuote) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_server_76a33eec530f39a2, []int{3}
|
||||
return fileDescriptor_server_1f6c9db5f7136644, []int{3}
|
||||
}
|
||||
func (m *ServerLoopOutQuote) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ServerLoopOutQuote.Unmarshal(m, b)
|
||||
|
|
@ -256,11 +256,223 @@ func (m *ServerLoopOutQuote) GetCltvDelta() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
type ServerLoopInRequest struct {
|
||||
SenderKey []byte `protobuf:"bytes,1,opt,name=sender_key,json=senderKey,proto3" json:"sender_key,omitempty"`
|
||||
SwapHash []byte `protobuf:"bytes,2,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"`
|
||||
Amt uint64 `protobuf:"varint,3,opt,name=amt,proto3" json:"amt,omitempty"`
|
||||
SwapInvoice string `protobuf:"bytes,4,opt,name=swap_invoice,json=swapInvoice,proto3" json:"swap_invoice,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ServerLoopInRequest) Reset() { *m = ServerLoopInRequest{} }
|
||||
func (m *ServerLoopInRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ServerLoopInRequest) ProtoMessage() {}
|
||||
func (*ServerLoopInRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_server_1f6c9db5f7136644, []int{4}
|
||||
}
|
||||
func (m *ServerLoopInRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ServerLoopInRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ServerLoopInRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ServerLoopInRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *ServerLoopInRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ServerLoopInRequest.Merge(dst, src)
|
||||
}
|
||||
func (m *ServerLoopInRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_ServerLoopInRequest.Size(m)
|
||||
}
|
||||
func (m *ServerLoopInRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ServerLoopInRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ServerLoopInRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *ServerLoopInRequest) GetSenderKey() []byte {
|
||||
if m != nil {
|
||||
return m.SenderKey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ServerLoopInRequest) GetSwapHash() []byte {
|
||||
if m != nil {
|
||||
return m.SwapHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ServerLoopInRequest) GetAmt() uint64 {
|
||||
if m != nil {
|
||||
return m.Amt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ServerLoopInRequest) GetSwapInvoice() string {
|
||||
if m != nil {
|
||||
return m.SwapInvoice
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ServerLoopInResponse struct {
|
||||
ReceiverKey []byte `protobuf:"bytes,1,opt,name=receiver_key,json=receiverKey,proto3" json:"receiver_key,omitempty"`
|
||||
Expiry int32 `protobuf:"varint,2,opt,name=expiry,proto3" json:"expiry,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ServerLoopInResponse) Reset() { *m = ServerLoopInResponse{} }
|
||||
func (m *ServerLoopInResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ServerLoopInResponse) ProtoMessage() {}
|
||||
func (*ServerLoopInResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_server_1f6c9db5f7136644, []int{5}
|
||||
}
|
||||
func (m *ServerLoopInResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ServerLoopInResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ServerLoopInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ServerLoopInResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *ServerLoopInResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ServerLoopInResponse.Merge(dst, src)
|
||||
}
|
||||
func (m *ServerLoopInResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_ServerLoopInResponse.Size(m)
|
||||
}
|
||||
func (m *ServerLoopInResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ServerLoopInResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ServerLoopInResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *ServerLoopInResponse) GetReceiverKey() []byte {
|
||||
if m != nil {
|
||||
return m.ReceiverKey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ServerLoopInResponse) GetExpiry() int32 {
|
||||
if m != nil {
|
||||
return m.Expiry
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ServerLoopInQuoteRequest struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ServerLoopInQuoteRequest) Reset() { *m = ServerLoopInQuoteRequest{} }
|
||||
func (m *ServerLoopInQuoteRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ServerLoopInQuoteRequest) ProtoMessage() {}
|
||||
func (*ServerLoopInQuoteRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_server_1f6c9db5f7136644, []int{6}
|
||||
}
|
||||
func (m *ServerLoopInQuoteRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ServerLoopInQuoteRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ServerLoopInQuoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ServerLoopInQuoteRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *ServerLoopInQuoteRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ServerLoopInQuoteRequest.Merge(dst, src)
|
||||
}
|
||||
func (m *ServerLoopInQuoteRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_ServerLoopInQuoteRequest.Size(m)
|
||||
}
|
||||
func (m *ServerLoopInQuoteRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ServerLoopInQuoteRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ServerLoopInQuoteRequest proto.InternalMessageInfo
|
||||
|
||||
type ServerLoopInQuoteResponse struct {
|
||||
SwapFeeBase int64 `protobuf:"varint,1,opt,name=swap_fee_base,json=swapFeeBase,proto3" json:"swap_fee_base,omitempty"`
|
||||
SwapFeeRate int64 `protobuf:"varint,2,opt,name=swap_fee_rate,json=swapFeeRate,proto3" json:"swap_fee_rate,omitempty"`
|
||||
MinSwapAmount uint64 `protobuf:"varint,4,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"`
|
||||
MaxSwapAmount uint64 `protobuf:"varint,5,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"`
|
||||
CltvDelta int32 `protobuf:"varint,6,opt,name=cltv_delta,json=cltvDelta,proto3" json:"cltv_delta,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ServerLoopInQuoteResponse) Reset() { *m = ServerLoopInQuoteResponse{} }
|
||||
func (m *ServerLoopInQuoteResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ServerLoopInQuoteResponse) ProtoMessage() {}
|
||||
func (*ServerLoopInQuoteResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_server_1f6c9db5f7136644, []int{7}
|
||||
}
|
||||
func (m *ServerLoopInQuoteResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ServerLoopInQuoteResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ServerLoopInQuoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ServerLoopInQuoteResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *ServerLoopInQuoteResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ServerLoopInQuoteResponse.Merge(dst, src)
|
||||
}
|
||||
func (m *ServerLoopInQuoteResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_ServerLoopInQuoteResponse.Size(m)
|
||||
}
|
||||
func (m *ServerLoopInQuoteResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ServerLoopInQuoteResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ServerLoopInQuoteResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *ServerLoopInQuoteResponse) GetSwapFeeBase() int64 {
|
||||
if m != nil {
|
||||
return m.SwapFeeBase
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ServerLoopInQuoteResponse) GetSwapFeeRate() int64 {
|
||||
if m != nil {
|
||||
return m.SwapFeeRate
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ServerLoopInQuoteResponse) GetMinSwapAmount() uint64 {
|
||||
if m != nil {
|
||||
return m.MinSwapAmount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ServerLoopInQuoteResponse) GetMaxSwapAmount() uint64 {
|
||||
if m != nil {
|
||||
return m.MaxSwapAmount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ServerLoopInQuoteResponse) GetCltvDelta() int32 {
|
||||
if m != nil {
|
||||
return m.CltvDelta
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*ServerLoopOutRequest)(nil), "looprpc.ServerLoopOutRequest")
|
||||
proto.RegisterType((*ServerLoopOutResponse)(nil), "looprpc.ServerLoopOutResponse")
|
||||
proto.RegisterType((*ServerLoopOutQuoteRequest)(nil), "looprpc.ServerLoopOutQuoteRequest")
|
||||
proto.RegisterType((*ServerLoopOutQuote)(nil), "looprpc.ServerLoopOutQuote")
|
||||
proto.RegisterType((*ServerLoopInRequest)(nil), "looprpc.ServerLoopInRequest")
|
||||
proto.RegisterType((*ServerLoopInResponse)(nil), "looprpc.ServerLoopInResponse")
|
||||
proto.RegisterType((*ServerLoopInQuoteRequest)(nil), "looprpc.ServerLoopInQuoteRequest")
|
||||
proto.RegisterType((*ServerLoopInQuoteResponse)(nil), "looprpc.ServerLoopInQuoteResponse")
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
|
@ -277,6 +489,8 @@ const _ = grpc.SupportPackageIsVersion4
|
|||
type SwapServerClient interface {
|
||||
NewLoopOutSwap(ctx context.Context, in *ServerLoopOutRequest, opts ...grpc.CallOption) (*ServerLoopOutResponse, error)
|
||||
LoopOutQuote(ctx context.Context, in *ServerLoopOutQuoteRequest, opts ...grpc.CallOption) (*ServerLoopOutQuote, error)
|
||||
NewLoopInSwap(ctx context.Context, in *ServerLoopInRequest, opts ...grpc.CallOption) (*ServerLoopInResponse, error)
|
||||
LoopInQuote(ctx context.Context, in *ServerLoopInQuoteRequest, opts ...grpc.CallOption) (*ServerLoopInQuoteResponse, error)
|
||||
}
|
||||
|
||||
type swapServerClient struct {
|
||||
|
|
@ -305,10 +519,30 @@ func (c *swapServerClient) LoopOutQuote(ctx context.Context, in *ServerLoopOutQu
|
|||
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
|
||||
}
|
||||
|
||||
// SwapServerServer is the server API for SwapServer service.
|
||||
type SwapServerServer interface {
|
||||
NewLoopOutSwap(context.Context, *ServerLoopOutRequest) (*ServerLoopOutResponse, error)
|
||||
LoopOutQuote(context.Context, *ServerLoopOutQuoteRequest) (*ServerLoopOutQuote, error)
|
||||
NewLoopInSwap(context.Context, *ServerLoopInRequest) (*ServerLoopInResponse, error)
|
||||
LoopInQuote(context.Context, *ServerLoopInQuoteRequest) (*ServerLoopInQuoteResponse, error)
|
||||
}
|
||||
|
||||
func RegisterSwapServerServer(s *grpc.Server, srv SwapServerServer) {
|
||||
|
|
@ -351,6 +585,42 @@ func _SwapServer_LoopOutQuote_Handler(srv interface{}, ctx context.Context, dec
|
|||
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)
|
||||
}
|
||||
|
||||
var _SwapServer_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "looprpc.SwapServer",
|
||||
HandlerType: (*SwapServerServer)(nil),
|
||||
|
|
@ -363,43 +633,58 @@ var _SwapServer_serviceDesc = grpc.ServiceDesc{
|
|||
MethodName: "LoopOutQuote",
|
||||
Handler: _SwapServer_LoopOutQuote_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "NewLoopInSwap",
|
||||
Handler: _SwapServer_NewLoopInSwap_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "LoopInQuote",
|
||||
Handler: _SwapServer_LoopInQuote_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "server.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("server.proto", fileDescriptor_server_76a33eec530f39a2) }
|
||||
func init() { proto.RegisterFile("server.proto", fileDescriptor_server_1f6c9db5f7136644) }
|
||||
|
||||
var fileDescriptor_server_76a33eec530f39a2 = []byte{
|
||||
// 467 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0xd1, 0x6e, 0xd3, 0x30,
|
||||
0x14, 0x86, 0x95, 0xb6, 0xeb, 0xe8, 0x59, 0xbb, 0x81, 0x05, 0x28, 0xb4, 0x14, 0x95, 0x48, 0x83,
|
||||
0x8a, 0x8b, 0x56, 0x82, 0x27, 0xd8, 0x34, 0x21, 0x10, 0x88, 0x42, 0x76, 0xc7, 0x4d, 0x74, 0xda,
|
||||
0x1e, 0x12, 0x8b, 0xc4, 0x36, 0xb1, 0xd3, 0x36, 0x2f, 0x82, 0x78, 0x0a, 0x9e, 0x11, 0xd9, 0xf1,
|
||||
0x60, 0x85, 0xb1, 0xbb, 0xe4, 0x3f, 0xdf, 0xf1, 0xf9, 0xfd, 0xe7, 0x04, 0xfa, 0x9a, 0xca, 0x0d,
|
||||
0x95, 0x33, 0x55, 0x4a, 0x23, 0xd9, 0x61, 0x2e, 0xa5, 0x2a, 0xd5, 0x6a, 0xf8, 0x38, 0x95, 0x32,
|
||||
0xcd, 0x69, 0x8e, 0x8a, 0xcf, 0x51, 0x08, 0x69, 0xd0, 0x70, 0x29, 0x74, 0x83, 0x45, 0x19, 0xdc,
|
||||
0xbf, 0x74, 0x6d, 0xef, 0xa5, 0x54, 0x8b, 0xca, 0xc4, 0xf4, 0xad, 0x22, 0x6d, 0xd8, 0x53, 0xe8,
|
||||
0x97, 0xb4, 0x22, 0xbe, 0xa1, 0x32, 0xf9, 0x4a, 0x75, 0x18, 0x4c, 0x82, 0x69, 0x3f, 0x3e, 0xba,
|
||||
0xd2, 0xde, 0x51, 0xcd, 0x46, 0xd0, 0xd3, 0x5b, 0x54, 0x49, 0x86, 0x3a, 0x0b, 0x5b, 0xae, 0x7e,
|
||||
0xc7, 0x0a, 0x6f, 0x50, 0x67, 0xec, 0x2e, 0xb4, 0xb1, 0x30, 0x61, 0x7b, 0x12, 0x4c, 0x3b, 0xb1,
|
||||
0x7d, 0x8c, 0x7e, 0x04, 0xf0, 0xe0, 0xaf, 0x51, 0x5a, 0x49, 0xa1, 0xc9, 0xce, 0x72, 0x07, 0x71,
|
||||
0xb1, 0x91, 0x7c, 0x45, 0x6e, 0x56, 0x2f, 0x3e, 0xb2, 0xda, 0xdb, 0x46, 0x62, 0xa7, 0x70, 0xac,
|
||||
0x4a, 0x52, 0x58, 0xff, 0x86, 0x5a, 0x0e, 0x1a, 0x34, 0xea, 0x15, 0x36, 0x06, 0xd0, 0x24, 0xd6,
|
||||
0xde, 0x73, 0xdb, 0x79, 0xea, 0x35, 0x8a, 0x75, 0xfc, 0x10, 0xba, 0xb4, 0x53, 0xbc, 0xac, 0xc3,
|
||||
0xce, 0x24, 0x98, 0x1e, 0xc4, 0xfe, 0x2d, 0x1a, 0xc1, 0xa3, 0x3d, 0x67, 0x9f, 0x2a, 0x69, 0xc8,
|
||||
0x27, 0x11, 0x7d, 0x6f, 0x01, 0xfb, 0xb7, 0xca, 0x5e, 0xc0, 0x3d, 0x67, 0x5a, 0x61, 0x5d, 0x90,
|
||||
0x30, 0xc9, 0x9a, 0xb4, 0xf1, 0xce, 0x4f, 0x6c, 0xe1, 0x63, 0xa3, 0x5f, 0xd8, 0x30, 0x23, 0x18,
|
||||
0x38, 0xf6, 0x0b, 0x51, 0xb2, 0x44, 0xdd, 0x98, 0x6f, 0x37, 0x37, 0x7c, 0x4d, 0x74, 0x8e, 0x9a,
|
||||
0xf6, 0x98, 0x12, 0x0d, 0x39, 0xf7, 0x7f, 0x98, 0x18, 0x8d, 0xbb, 0x9e, 0x4f, 0xc1, 0x66, 0xdb,
|
||||
0x71, 0xd9, 0xf6, 0x1a, 0xe5, 0xac, 0x30, 0xec, 0x19, 0x9c, 0x14, 0x5c, 0x24, 0xee, 0x18, 0x2c,
|
||||
0x64, 0x25, 0x4c, 0x78, 0xe0, 0x98, 0x41, 0xc1, 0xc5, 0xe5, 0x16, 0xd5, 0x99, 0x13, 0x1d, 0x87,
|
||||
0xbb, 0x3d, 0xae, 0xeb, 0x39, 0xdc, 0x5d, 0xe3, 0xc6, 0x00, 0xab, 0xdc, 0x6c, 0x92, 0x35, 0xe5,
|
||||
0x06, 0xc3, 0x43, 0x17, 0x59, 0xcf, 0x2a, 0x17, 0x56, 0x78, 0xf9, 0x33, 0x00, 0xb0, 0x74, 0x13,
|
||||
0x0e, 0x5b, 0xc0, 0xf1, 0x07, 0xda, 0xfa, 0x8c, 0xac, 0xce, 0xc6, 0x33, 0xbf, 0x83, 0xb3, 0x9b,
|
||||
0x56, 0x6c, 0xf8, 0xe4, 0x7f, 0x65, 0xbf, 0x16, 0x0b, 0xe8, 0xef, 0x25, 0x1e, 0xdd, 0xcc, 0x5f,
|
||||
0xff, 0x58, 0xc3, 0xd1, 0x2d, 0xcc, 0xf9, 0xf3, 0xcf, 0xa7, 0x29, 0x37, 0x59, 0xb5, 0x9c, 0xad,
|
||||
0x64, 0x31, 0xcf, 0x79, 0x9a, 0x19, 0xc1, 0x45, 0x9a, 0xe3, 0x52, 0xcf, 0x6d, 0xdb, 0xdc, 0xf7,
|
||||
0x2e, 0xbb, 0xee, 0xdf, 0x78, 0xf5, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x94, 0x23, 0x1c, 0x6e, 0x52,
|
||||
0x03, 0x00, 0x00,
|
||||
var fileDescriptor_server_1f6c9db5f7136644 = []byte{
|
||||
// 589 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x6e, 0xd3, 0x4c,
|
||||
0x14, 0x94, 0x9d, 0x34, 0xfd, 0x72, 0x9a, 0xb4, 0x1f, 0xcb, 0x8f, 0x4c, 0xda, 0xa0, 0xd6, 0x52,
|
||||
0xa1, 0xe2, 0x22, 0x91, 0xe0, 0x09, 0x5a, 0x55, 0x88, 0x8a, 0x8a, 0x52, 0x97, 0x2b, 0x6e, 0xac,
|
||||
0x4d, 0x72, 0x88, 0x2d, 0xec, 0xdd, 0xc5, 0xbb, 0xf9, 0x7b, 0x01, 0x1e, 0x01, 0xf1, 0x5c, 0x7d,
|
||||
0x22, 0xb4, 0xeb, 0x4d, 0x62, 0x27, 0xe9, 0x0f, 0x77, 0xed, 0x9c, 0xf1, 0xd9, 0xd9, 0x99, 0xc9,
|
||||
0x42, 0x43, 0x62, 0x36, 0xc6, 0xac, 0x23, 0x32, 0xae, 0x38, 0xd9, 0x4e, 0x38, 0x17, 0x99, 0xe8,
|
||||
0xb7, 0x0e, 0x86, 0x9c, 0x0f, 0x13, 0xec, 0x52, 0x11, 0x77, 0x29, 0x63, 0x5c, 0x51, 0x15, 0x73,
|
||||
0x26, 0x73, 0x9a, 0x1f, 0xc1, 0xb3, 0x1b, 0xf3, 0xd9, 0x25, 0xe7, 0xe2, 0x6a, 0xa4, 0x02, 0xfc,
|
||||
0x39, 0x42, 0xa9, 0xc8, 0x11, 0x34, 0x32, 0xec, 0x63, 0x3c, 0xc6, 0x2c, 0xfc, 0x81, 0x33, 0xcf,
|
||||
0x39, 0x74, 0x4e, 0x1a, 0xc1, 0xce, 0x1c, 0xfb, 0x84, 0x33, 0xb2, 0x0f, 0x75, 0x39, 0xa1, 0x22,
|
||||
0x8c, 0xa8, 0x8c, 0x3c, 0xd7, 0xcc, 0xff, 0xd3, 0xc0, 0x47, 0x2a, 0x23, 0xf2, 0x3f, 0x54, 0x68,
|
||||
0xaa, 0xbc, 0xca, 0xa1, 0x73, 0x52, 0x0d, 0xf4, 0x9f, 0xfe, 0x1f, 0x07, 0x9e, 0xaf, 0x1c, 0x25,
|
||||
0x05, 0x67, 0x12, 0xf5, 0x59, 0x66, 0x51, 0xcc, 0xc6, 0x3c, 0xee, 0xa3, 0x39, 0xab, 0x1e, 0xec,
|
||||
0x68, 0xec, 0x22, 0x87, 0xc8, 0x31, 0xec, 0x8a, 0x0c, 0x05, 0x9d, 0x2d, 0x48, 0xae, 0x21, 0x35,
|
||||
0x73, 0x74, 0x4e, 0x6b, 0x03, 0x48, 0x64, 0x03, 0xab, 0xb9, 0x62, 0x34, 0xd5, 0x73, 0x44, 0x2b,
|
||||
0x7e, 0x01, 0x35, 0x9c, 0x8a, 0x38, 0x9b, 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8, 0xc3, 0xcb, 0x46, 0xb8, 0xa5, 0x46, 0xb4, 0xc0, 0x2b, 0xae, 0x2c,
|
||||
0x15, 0xe2, 0xd6, 0x29, 0xd6, 0x65, 0x31, 0xb4, 0x87, 0xae, 0x65, 0xed, 0x3c, 0x22, 0x6b, 0x77,
|
||||
0x3d, 0xeb, 0x0d, 0x61, 0x56, 0x1f, 0x19, 0xe6, 0xd6, 0xc3, 0x61, 0xd6, 0x56, 0xc2, 0x7c, 0x77,
|
||||
0xeb, 0x02, 0x68, 0x76, 0x7e, 0x31, 0x72, 0x05, 0xbb, 0x9f, 0x71, 0x62, 0x0b, 0xaf, 0x71, 0xd2,
|
||||
0xee, 0xd8, 0x07, 0xa5, 0xb3, 0xe9, 0xbd, 0x68, 0xbd, 0xba, 0x6b, 0x6c, 0x6d, 0xb9, 0x82, 0x46,
|
||||
0xe9, 0xe7, 0xe3, 0x6f, 0xe6, 0x17, 0x8d, 0x6e, 0xed, 0xdf, 0xc3, 0x21, 0x97, 0xd0, 0xb4, 0x0a,
|
||||
0x2f, 0x8c, 0x1d, 0xe4, 0x60, 0x03, 0x7b, 0x51, 0xca, 0x56, 0xfb, 0x8e, 0xa9, 0x95, 0xf7, 0x15,
|
||||
0x76, 0x0a, 0x61, 0x92, 0xa3, 0x8d, 0xec, 0x92, 0x38, 0xff, 0x3e, 0x4a, 0xbe, 0xf5, 0xec, 0xcd,
|
||||
0xb7, 0xe3, 0x61, 0xac, 0xa2, 0x51, 0xaf, 0xd3, 0xe7, 0x69, 0x37, 0x89, 0x87, 0x91, 0x62, 0x31,
|
||||
0x1b, 0x26, 0xb4, 0x27, 0xbb, 0xfa, 0xeb, 0xae, 0x5d, 0xd1, 0xab, 0x99, 0xc7, 0xf8, 0xfd, 0xdf,
|
||||
0x00, 0x00, 0x00, 0xff, 0xff, 0x94, 0xad, 0x2a, 0x29, 0xc3, 0x05, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@ service SwapServer {
|
|||
rpc NewLoopOutSwap(ServerLoopOutRequest) returns (ServerLoopOutResponse);
|
||||
|
||||
rpc LoopOutQuote(ServerLoopOutQuoteRequest) returns (ServerLoopOutQuote);
|
||||
|
||||
rpc NewLoopInSwap(ServerLoopInRequest) returns (ServerLoopInResponse);
|
||||
|
||||
rpc LoopInQuote(ServerLoopInQuoteRequest) returns (ServerLoopInQuoteResponse);
|
||||
}
|
||||
|
||||
message ServerLoopOutRequest {
|
||||
|
|
@ -48,3 +52,26 @@ message ServerLoopOutQuote {
|
|||
|
||||
int32 cltv_delta = 7;
|
||||
}
|
||||
|
||||
message ServerLoopInRequest {
|
||||
bytes sender_key = 1;
|
||||
bytes swap_hash = 2;
|
||||
uint64 amt = 3;
|
||||
string swap_invoice = 4;
|
||||
}
|
||||
|
||||
message ServerLoopInResponse {
|
||||
bytes receiver_key = 1;
|
||||
int32 expiry = 2;
|
||||
}
|
||||
|
||||
message ServerLoopInQuoteRequest {
|
||||
}
|
||||
|
||||
message ServerLoopInQuoteResponse {
|
||||
int64 swap_fee_base = 1;
|
||||
int64 swap_fee_rate = 2;
|
||||
uint64 min_swap_amount = 4;
|
||||
uint64 max_swap_amount = 5;
|
||||
int32 cltv_delta = 6;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue