looprpc: add get and set liquidity parameters endpoints

pull/265/head
carla 4 years ago
parent ce10cc7959
commit 6fcbf54c02
No known key found for this signature in database
GPG Key ID: 4CA7FE54A6213C91

@ -8,18 +8,17 @@ import (
"sync"
"time"
"github.com/lightninglabs/loop/liquidity"
"github.com/lightningnetwork/lnd/lntypes"
"github.com/lightningnetwork/lnd/queue"
"github.com/lightningnetwork/lnd/routing/route"
"github.com/btcsuite/btcutil"
"github.com/lightninglabs/lndclient"
"github.com/lightninglabs/loop"
"github.com/lightninglabs/loop/liquidity"
"github.com/lightninglabs/loop/loopdb"
"github.com/lightninglabs/loop/swap"
"github.com/btcsuite/btcutil"
"github.com/lightninglabs/loop/looprpc"
"github.com/lightninglabs/loop/swap"
"github.com/lightningnetwork/lnd/lntypes"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/queue"
"github.com/lightningnetwork/lnd/routing/route"
)
const (
@ -549,6 +548,90 @@ func (s *swapClientServer) GetLsatTokens(ctx context.Context,
return &looprpc.TokensResponse{Tokens: rpcTokens}, nil
}
// GetLiquidityParams gets our current liquidity manager's parameters.
func (s *swapClientServer) GetLiquidityParams(_ context.Context,
_ *looprpc.GetLiquidityParamsRequest) (*looprpc.LiquidityParameters,
error) {
cfg := s.liquidityMgr.GetParameters()
rpcCfg := &looprpc.LiquidityParameters{
Rules: make(
[]*looprpc.LiquidityRule, 0, len(cfg.ChannelRules),
),
}
for channel, rule := range cfg.ChannelRules {
rpcRule := &looprpc.LiquidityRule{
ChannelId: channel.ToUint64(),
Type: looprpc.LiquidityRuleType_THRESHOLD,
IncomingThreshold: uint32(rule.MinimumIncoming),
OutgoingThreshold: uint32(rule.MinimumOutgoing),
}
rpcCfg.Rules = append(rpcCfg.Rules, rpcRule)
}
return rpcCfg, nil
}
// SetLiquidityParams attempts to set our current liquidity manager's
// parameters.
func (s *swapClientServer) SetLiquidityParams(_ context.Context,
in *looprpc.SetLiquidityParamsRequest) (*looprpc.SetLiquidityParamsResponse,
error) {
params := liquidity.Parameters{
ChannelRules: make(
map[lnwire.ShortChannelID]*liquidity.ThresholdRule,
len(in.Parameters.Rules),
),
}
for _, rule := range in.Parameters.Rules {
var (
shortID = lnwire.NewShortChanIDFromInt(rule.ChannelId)
err error
)
// Make sure that there are not multiple rules set for a single
// channel.
if _, ok := params.ChannelRules[shortID]; ok {
return nil, fmt.Errorf("multiple rules set for "+
"channel: %v", shortID)
}
params.ChannelRules[shortID], err = rpcToRule(rule)
if err != nil {
return nil, err
}
}
if err := s.liquidityMgr.SetParameters(params); err != nil {
return nil, err
}
return &looprpc.SetLiquidityParamsResponse{}, nil
}
// rpcToRule switches on rpc rule type to convert to our rule interface.
func rpcToRule(rule *looprpc.LiquidityRule) (*liquidity.ThresholdRule, error) {
switch rule.Type {
case looprpc.LiquidityRuleType_UNKNOWN:
return nil, fmt.Errorf("rule type field must be set")
case looprpc.LiquidityRuleType_THRESHOLD:
return liquidity.NewThresholdRule(
int(rule.IncomingThreshold),
int(rule.OutgoingThreshold),
), nil
default:
return nil, fmt.Errorf("unknown rule: %T", rule)
}
}
// processStatusUpdates reads updates on the status channel and processes them.
//
// NOTE: This must run inside a goroutine as it blocks until the main context

@ -175,6 +175,31 @@ func (FailureReason) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_014de31d7ac8c57c, []int{2}
}
type LiquidityRuleType int32
const (
LiquidityRuleType_UNKNOWN LiquidityRuleType = 0
LiquidityRuleType_THRESHOLD LiquidityRuleType = 1
)
var LiquidityRuleType_name = map[int32]string{
0: "UNKNOWN",
1: "THRESHOLD",
}
var LiquidityRuleType_value = map[string]int32{
"UNKNOWN": 0,
"THRESHOLD": 1,
}
func (x LiquidityRuleType) String() string {
return proto.EnumName(LiquidityRuleType_name, int32(x))
}
func (LiquidityRuleType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_014de31d7ac8c57c, []int{3}
}
type LoopOutRequest struct {
//*
//Requested swap amount in sat. This does not include the swap and miner fee.
@ -1484,10 +1509,234 @@ func (m *LsatToken) GetStorageName() string {
return ""
}
type GetLiquidityParamsRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetLiquidityParamsRequest) Reset() { *m = GetLiquidityParamsRequest{} }
func (m *GetLiquidityParamsRequest) String() string { return proto.CompactTextString(m) }
func (*GetLiquidityParamsRequest) ProtoMessage() {}
func (*GetLiquidityParamsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_014de31d7ac8c57c, []int{17}
}
func (m *GetLiquidityParamsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetLiquidityParamsRequest.Unmarshal(m, b)
}
func (m *GetLiquidityParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetLiquidityParamsRequest.Marshal(b, m, deterministic)
}
func (m *GetLiquidityParamsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetLiquidityParamsRequest.Merge(m, src)
}
func (m *GetLiquidityParamsRequest) XXX_Size() int {
return xxx_messageInfo_GetLiquidityParamsRequest.Size(m)
}
func (m *GetLiquidityParamsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetLiquidityParamsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetLiquidityParamsRequest proto.InternalMessageInfo
type LiquidityParameters struct {
//
//A set of liquidity rules that describe the desired liquidity balance.
Rules []*LiquidityRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LiquidityParameters) Reset() { *m = LiquidityParameters{} }
func (m *LiquidityParameters) String() string { return proto.CompactTextString(m) }
func (*LiquidityParameters) ProtoMessage() {}
func (*LiquidityParameters) Descriptor() ([]byte, []int) {
return fileDescriptor_014de31d7ac8c57c, []int{18}
}
func (m *LiquidityParameters) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LiquidityParameters.Unmarshal(m, b)
}
func (m *LiquidityParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LiquidityParameters.Marshal(b, m, deterministic)
}
func (m *LiquidityParameters) XXX_Merge(src proto.Message) {
xxx_messageInfo_LiquidityParameters.Merge(m, src)
}
func (m *LiquidityParameters) XXX_Size() int {
return xxx_messageInfo_LiquidityParameters.Size(m)
}
func (m *LiquidityParameters) XXX_DiscardUnknown() {
xxx_messageInfo_LiquidityParameters.DiscardUnknown(m)
}
var xxx_messageInfo_LiquidityParameters proto.InternalMessageInfo
func (m *LiquidityParameters) GetRules() []*LiquidityRule {
if m != nil {
return m.Rules
}
return nil
}
type LiquidityRule struct {
//
//The short channel ID of the channel that this rule should be applied to.
ChannelId uint64 `protobuf:"varint,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
//
//Type indicates the type of rule that this message rule represents. Setting
//this value will determine which fields are used in the message. The comments
//on each field in this message will be prefixed with the LiquidityRuleType
//they belong to.
Type LiquidityRuleType `protobuf:"varint,2,opt,name=type,proto3,enum=looprpc.LiquidityRuleType" json:"type,omitempty"`
//
//THRESHOLD: The percentage of total capacity that incoming capacity should
//not drop beneath.
IncomingThreshold uint32 `protobuf:"varint,3,opt,name=incoming_threshold,json=incomingThreshold,proto3" json:"incoming_threshold,omitempty"`
//
//THRESHOLD: The percentage of total capacity that outgoing capacity should
//not drop beneath.
OutgoingThreshold uint32 `protobuf:"varint,4,opt,name=outgoing_threshold,json=outgoingThreshold,proto3" json:"outgoing_threshold,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LiquidityRule) Reset() { *m = LiquidityRule{} }
func (m *LiquidityRule) String() string { return proto.CompactTextString(m) }
func (*LiquidityRule) ProtoMessage() {}
func (*LiquidityRule) Descriptor() ([]byte, []int) {
return fileDescriptor_014de31d7ac8c57c, []int{19}
}
func (m *LiquidityRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LiquidityRule.Unmarshal(m, b)
}
func (m *LiquidityRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LiquidityRule.Marshal(b, m, deterministic)
}
func (m *LiquidityRule) XXX_Merge(src proto.Message) {
xxx_messageInfo_LiquidityRule.Merge(m, src)
}
func (m *LiquidityRule) XXX_Size() int {
return xxx_messageInfo_LiquidityRule.Size(m)
}
func (m *LiquidityRule) XXX_DiscardUnknown() {
xxx_messageInfo_LiquidityRule.DiscardUnknown(m)
}
var xxx_messageInfo_LiquidityRule proto.InternalMessageInfo
func (m *LiquidityRule) GetChannelId() uint64 {
if m != nil {
return m.ChannelId
}
return 0
}
func (m *LiquidityRule) GetType() LiquidityRuleType {
if m != nil {
return m.Type
}
return LiquidityRuleType_UNKNOWN
}
func (m *LiquidityRule) GetIncomingThreshold() uint32 {
if m != nil {
return m.IncomingThreshold
}
return 0
}
func (m *LiquidityRule) GetOutgoingThreshold() uint32 {
if m != nil {
return m.OutgoingThreshold
}
return 0
}
type SetLiquidityParamsRequest struct {
//
//Parameters is the desired new set of parameters for the liquidity management
//subsystem. Note that the current set of parameters will be completely
//overwritten by the parameters provided (if they are valid), so the full set
//of parameters should be provided for each call.
Parameters *LiquidityParameters `protobuf:"bytes,1,opt,name=parameters,proto3" json:"parameters,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SetLiquidityParamsRequest) Reset() { *m = SetLiquidityParamsRequest{} }
func (m *SetLiquidityParamsRequest) String() string { return proto.CompactTextString(m) }
func (*SetLiquidityParamsRequest) ProtoMessage() {}
func (*SetLiquidityParamsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_014de31d7ac8c57c, []int{20}
}
func (m *SetLiquidityParamsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetLiquidityParamsRequest.Unmarshal(m, b)
}
func (m *SetLiquidityParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SetLiquidityParamsRequest.Marshal(b, m, deterministic)
}
func (m *SetLiquidityParamsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SetLiquidityParamsRequest.Merge(m, src)
}
func (m *SetLiquidityParamsRequest) XXX_Size() int {
return xxx_messageInfo_SetLiquidityParamsRequest.Size(m)
}
func (m *SetLiquidityParamsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SetLiquidityParamsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SetLiquidityParamsRequest proto.InternalMessageInfo
func (m *SetLiquidityParamsRequest) GetParameters() *LiquidityParameters {
if m != nil {
return m.Parameters
}
return nil
}
type SetLiquidityParamsResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SetLiquidityParamsResponse) Reset() { *m = SetLiquidityParamsResponse{} }
func (m *SetLiquidityParamsResponse) String() string { return proto.CompactTextString(m) }
func (*SetLiquidityParamsResponse) ProtoMessage() {}
func (*SetLiquidityParamsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_014de31d7ac8c57c, []int{21}
}
func (m *SetLiquidityParamsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetLiquidityParamsResponse.Unmarshal(m, b)
}
func (m *SetLiquidityParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SetLiquidityParamsResponse.Marshal(b, m, deterministic)
}
func (m *SetLiquidityParamsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_SetLiquidityParamsResponse.Merge(m, src)
}
func (m *SetLiquidityParamsResponse) XXX_Size() int {
return xxx_messageInfo_SetLiquidityParamsResponse.Size(m)
}
func (m *SetLiquidityParamsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SetLiquidityParamsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_SetLiquidityParamsResponse proto.InternalMessageInfo
func init() {
proto.RegisterEnum("looprpc.SwapType", SwapType_name, SwapType_value)
proto.RegisterEnum("looprpc.SwapState", SwapState_name, SwapState_value)
proto.RegisterEnum("looprpc.FailureReason", FailureReason_name, FailureReason_value)
proto.RegisterEnum("looprpc.LiquidityRuleType", LiquidityRuleType_name, LiquidityRuleType_value)
proto.RegisterType((*LoopOutRequest)(nil), "looprpc.LoopOutRequest")
proto.RegisterType((*LoopInRequest)(nil), "looprpc.LoopInRequest")
proto.RegisterType((*SwapResponse)(nil), "looprpc.SwapResponse")
@ -1505,128 +1754,147 @@ func init() {
proto.RegisterType((*TokensRequest)(nil), "looprpc.TokensRequest")
proto.RegisterType((*TokensResponse)(nil), "looprpc.TokensResponse")
proto.RegisterType((*LsatToken)(nil), "looprpc.LsatToken")
proto.RegisterType((*GetLiquidityParamsRequest)(nil), "looprpc.GetLiquidityParamsRequest")
proto.RegisterType((*LiquidityParameters)(nil), "looprpc.LiquidityParameters")
proto.RegisterType((*LiquidityRule)(nil), "looprpc.LiquidityRule")
proto.RegisterType((*SetLiquidityParamsRequest)(nil), "looprpc.SetLiquidityParamsRequest")
proto.RegisterType((*SetLiquidityParamsResponse)(nil), "looprpc.SetLiquidityParamsResponse")
}
func init() { proto.RegisterFile("client.proto", fileDescriptor_014de31d7ac8c57c) }
var fileDescriptor_014de31d7ac8c57c = []byte{
// 1846 bytes of a gzipped FileDescriptorProto
// 2073 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xdd, 0x6e, 0x23, 0x49,
0x15, 0x1e, 0xff, 0xc5, 0xf6, 0x71, 0xbb, 0xdd, 0xa9, 0xcc, 0x4c, 0x1c, 0x33, 0x68, 0x3c, 0xbd,
0x3b, 0x90, 0x0d, 0xcb, 0x98, 0xcd, 0x5e, 0xb1, 0x02, 0x24,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, 0x82, 0xb7, 0x39, 0x6a,
0xbb, 0x4c, 0xb4, 0xe3, 0xec, 0x4e, 0x69, 0x4f, 0x6f, 0x41, 0x59, 0xed, 0x99, 0x29, 0xaf, 0xef,
0xa3, 0xf6, 0x16, 0x69, 0x66, 0xb4, 0xbf, 0x13, 0x9c, 0xf6, 0xb7, 0xd4, 0xe1, 0xc2, 0x02, 0x55,
0xb4, 0x6e, 0x0c, 0xf9, 0x83, 0x36, 0x2c, 0xbd, 0xb6, 0xb2, 0xd3, 0xea, 0xbb, 0x78, 0xc9, 0x16,
0xd9, 0x4c, 0xa5, 0x42, 0x62, 0xc1, 0x52, 0xfb, 0x83, 0x36, 0xa4, 0xb5, 0x67, 0x4d, 0x78, 0x82,
0xda, 0x77, 0xc9, 0x4e, 0x5a, 0x7b, 0xda, 0x82, 0xb7, 0x50, 0x17, 0x77, 0xc4, 0xc3, 0x3b, 0x4c,
0x65, 0x72, 0x66, 0x43, 0x68, 0xed, 0xdc, 0xc1, 0xb3, 0xd5, 0x41, 0x1a, 0x78, 0x45, 0x48, 0x79,
0x5b, 0x6e, 0x05, 0x84, 0x03, 0xb9, 0x3b, 0xd7, 0x88, 0x9e, 0xe8, 0xb9, 0x77, 0xe8, 0xb5, 0x1e,
0xec, 0xdf, 0xfa, 0x1e, 0x5e, 0xb8, 0x4d, 0x1e, 0xe3, 0x85, 0x31, 0xa1, 0xed, 0x4b, 0xfd, 0xbf,
0x01, 0x32, 0x7e, 0xe8, 0xd6, 0x7b, 0x27, 0x49, 0xeb, 0xd9, 0x83, 0x9c, 0xac, 0x43, 0xf5, 0xb5,
0x97, 0xbf, 0xcc, 0x1d, 0x5e, 0x6e, 0xe0, 0x7f, 0xdd, 0xbe, 0xfc, 0x4f, 0x00, 0x00, 0x00, 0xff,
0xff, 0x46, 0x7a, 0xcd, 0x4b, 0xac, 0x13, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1679,6 +1947,17 @@ type SwapClientClient interface {
//* loop: `listauth`
//GetLsatTokens returns all LSAT tokens the daemon ever paid for.
GetLsatTokens(ctx context.Context, in *TokensRequest, opts ...grpc.CallOption) (*TokensResponse, error)
//
//GetLiquidityParams gets the parameters that the daemon's liquidity manager
//is currently configured with. This may be nil if nothing is configured.
//[EXPERIMENTAL]: endpoint is subject to change.
GetLiquidityParams(ctx context.Context, in *GetLiquidityParamsRequest, opts ...grpc.CallOption) (*LiquidityParameters, error)
//
//SetLiquidityParams sets a new set of parameters for the daemon's liquidity
//manager. Note that the full set of parameters must be provided, because
//this call fully overwrites our existing parameters.
//[EXPERIMENTAL]: endpoint is subject to change.
SetLiquidityParams(ctx context.Context, in *SetLiquidityParamsRequest, opts ...grpc.CallOption) (*SetLiquidityParamsResponse, error)
}
type swapClientClient struct {
@ -1802,6 +2081,24 @@ func (c *swapClientClient) GetLsatTokens(ctx context.Context, in *TokensRequest,
return out, nil
}
func (c *swapClientClient) GetLiquidityParams(ctx context.Context, in *GetLiquidityParamsRequest, opts ...grpc.CallOption) (*LiquidityParameters, error) {
out := new(LiquidityParameters)
err := c.cc.Invoke(ctx, "/looprpc.SwapClient/GetLiquidityParams", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *swapClientClient) SetLiquidityParams(ctx context.Context, in *SetLiquidityParamsRequest, opts ...grpc.CallOption) (*SetLiquidityParamsResponse, error) {
out := new(SetLiquidityParamsResponse)
err := c.cc.Invoke(ctx, "/looprpc.SwapClient/SetLiquidityParams", 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`
@ -1842,6 +2139,17 @@ type SwapClientServer interface {
//* loop: `listauth`
//GetLsatTokens returns all LSAT tokens the daemon ever paid for.
GetLsatTokens(context.Context, *TokensRequest) (*TokensResponse, error)
//
//GetLiquidityParams gets the parameters that the daemon's liquidity manager
//is currently configured with. This may be nil if nothing is configured.
//[EXPERIMENTAL]: endpoint is subject to change.
GetLiquidityParams(context.Context, *GetLiquidityParamsRequest) (*LiquidityParameters, error)
//
//SetLiquidityParams sets a new set of parameters for the daemon's liquidity
//manager. Note that the full set of parameters must be provided, because
//this call fully overwrites our existing parameters.
//[EXPERIMENTAL]: endpoint is subject to change.
SetLiquidityParams(context.Context, *SetLiquidityParamsRequest) (*SetLiquidityParamsResponse, error)
}
// UnimplementedSwapClientServer can be embedded to have forward compatible implementations.
@ -1878,6 +2186,12 @@ func (*UnimplementedSwapClientServer) GetLoopInQuote(ctx context.Context, req *Q
func (*UnimplementedSwapClientServer) GetLsatTokens(ctx context.Context, req *TokensRequest) (*TokensResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetLsatTokens not implemented")
}
func (*UnimplementedSwapClientServer) GetLiquidityParams(ctx context.Context, req *GetLiquidityParamsRequest) (*LiquidityParameters, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetLiquidityParams not implemented")
}
func (*UnimplementedSwapClientServer) SetLiquidityParams(ctx context.Context, req *SetLiquidityParamsRequest) (*SetLiquidityParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetLiquidityParams not implemented")
}
func RegisterSwapClientServer(s *grpc.Server, srv SwapClientServer) {
s.RegisterService(&_SwapClient_serviceDesc, srv)
@ -2066,6 +2380,42 @@ func _SwapClient_GetLsatTokens_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _SwapClient_GetLiquidityParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLiquidityParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapClientServer).GetLiquidityParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapClient/GetLiquidityParams",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapClientServer).GetLiquidityParams(ctx, req.(*GetLiquidityParamsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SwapClient_SetLiquidityParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetLiquidityParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapClientServer).SetLiquidityParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapClient/SetLiquidityParams",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapClientServer).SetLiquidityParams(ctx, req.(*SetLiquidityParamsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _SwapClient_serviceDesc = grpc.ServiceDesc{
ServiceName: "looprpc.SwapClient",
HandlerType: (*SwapClientServer)(nil),
@ -2106,6 +2456,14 @@ var _SwapClient_serviceDesc = grpc.ServiceDesc{
MethodName: "GetLsatTokens",
Handler: _SwapClient_GetLsatTokens_Handler,
},
{
MethodName: "GetLiquidityParams",
Handler: _SwapClient_GetLiquidityParams_Handler,
},
{
MethodName: "SetLiquidityParams",
Handler: _SwapClient_SetLiquidityParams_Handler,
},
},
Streams: []grpc.StreamDesc{
{

@ -363,6 +363,58 @@ func local_request_SwapClient_GetLsatTokens_0(ctx context.Context, marshaler run
}
func request_SwapClient_GetLiquidityParams_0(ctx context.Context, marshaler runtime.Marshaler, client SwapClientClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetLiquidityParamsRequest
var metadata runtime.ServerMetadata
msg, err := client.GetLiquidityParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_SwapClient_GetLiquidityParams_0(ctx context.Context, marshaler runtime.Marshaler, server SwapClientServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetLiquidityParamsRequest
var metadata runtime.ServerMetadata
msg, err := server.GetLiquidityParams(ctx, &protoReq)
return msg, metadata, err
}
func request_SwapClient_SetLiquidityParams_0(ctx context.Context, marshaler runtime.Marshaler, client SwapClientClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SetLiquidityParamsRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.SetLiquidityParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_SwapClient_SetLiquidityParams_0(ctx context.Context, marshaler runtime.Marshaler, server SwapClientServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SetLiquidityParamsRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.SetLiquidityParams(ctx, &protoReq)
return msg, metadata, err
}
// RegisterSwapClientHandlerServer registers the http handlers for service SwapClient to "mux".
// UnaryRPC :call SwapClientServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@ -548,6 +600,46 @@ func RegisterSwapClientHandlerServer(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("GET", pattern_SwapClient_GetLiquidityParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_SwapClient_GetLiquidityParams_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_SwapClient_GetLiquidityParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_SwapClient_SetLiquidityParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_SwapClient_SetLiquidityParams_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_SwapClient_SetLiquidityParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@ -769,6 +861,46 @@ func RegisterSwapClientHandlerClient(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("GET", pattern_SwapClient_GetLiquidityParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_SwapClient_GetLiquidityParams_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_SwapClient_GetLiquidityParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_SwapClient_SetLiquidityParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_SwapClient_SetLiquidityParams_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_SwapClient_SetLiquidityParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@ -790,6 +922,10 @@ var (
pattern_SwapClient_GetLoopInQuote_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "loop", "in", "quote", "amt"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_SwapClient_GetLsatTokens_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "lsat", "tokens"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_SwapClient_GetLiquidityParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "liquidity", "params"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_SwapClient_SetLiquidityParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "liquidity", "params"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (
@ -810,4 +946,8 @@ var (
forward_SwapClient_GetLoopInQuote_0 = runtime.ForwardResponseMessage
forward_SwapClient_GetLsatTokens_0 = runtime.ForwardResponseMessage
forward_SwapClient_GetLiquidityParams_0 = runtime.ForwardResponseMessage
forward_SwapClient_SetLiquidityParams_0 = runtime.ForwardResponseMessage
)

@ -104,6 +104,30 @@ service SwapClient {
get: "/v1/lsat/tokens"
};
}
/*
GetLiquidityParams gets the parameters that the daemon's liquidity manager
is currently configured with. This may be nil if nothing is configured.
[EXPERIMENTAL]: endpoint is subject to change.
*/
rpc GetLiquidityParams(GetLiquidityParamsRequest) returns (LiquidityParameters){
option (google.api.http) = {
get: "/v1/liquidity/params"
};
}
/*
SetLiquidityParams sets a new set of parameters for the daemon's liquidity
manager. Note that the full set of parameters must be provided, because
this call fully overwrites our existing parameters.
[EXPERIMENTAL]: endpoint is subject to change.
*/
rpc SetLiquidityParams(SetLiquidityParamsRequest) returns (SetLiquidityParamsResponse){
option (google.api.http) = {
post: "/v1/liquidity/params"
body: "*"
};
}
}
message LoopOutRequest {
@ -666,3 +690,56 @@ message LsatToken {
*/
string storage_name = 8;
}
message GetLiquidityParamsRequest{}
message LiquidityParameters{
/*
A set of liquidity rules that describe the desired liquidity balance.
*/
repeated LiquidityRule rules = 1;
}
enum LiquidityRuleType{
UNKNOWN = 0;
THRESHOLD = 1;
}
message LiquidityRule{
/*
The short channel ID of the channel that this rule should be applied to.
*/
uint64 channel_id = 1;
/*
Type indicates the type of rule that this message rule represents. Setting
this value will determine which fields are used in the message. The comments
on each field in this message will be prefixed with the LiquidityRuleType
they belong to.
*/
LiquidityRuleType type = 2;
/*
THRESHOLD: The percentage of total capacity that incoming capacity should
not drop beneath.
*/
uint32 incoming_threshold = 3;
/*
THRESHOLD: The percentage of total capacity that outgoing capacity should
not drop beneath.
*/
uint32 outgoing_threshold = 4;
}
message SetLiquidityParamsRequest{
/*
Parameters is the desired new set of parameters for the liquidity management
subsystem. Note that the current set of parameters will be completely
overwritten by the parameters provided (if they are valid), so the full set
of parameters should be provided for each call.
*/
LiquidityParameters parameters = 1;
}
message SetLiquidityParamsResponse{}

@ -11,6 +11,60 @@
"application/json"
],
"paths": {
"/v1/liquidity/params": {
"get": {
"summary": "GetLiquidityParams gets the parameters that the daemon's liquidity manager\nis currently configured with. This may be nil if nothing is configured.\n[EXPERIMENTAL]: endpoint is subject to change.",
"operationId": "GetLiquidityParams",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/looprpcLiquidityParameters"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"tags": [
"SwapClient"
]
},
"post": {
"summary": "SetLiquidityParams sets a new set of parameters for the daemon's liquidity\nmanager. Note that the full set of parameters must be provided, because\nthis call fully overwrites our existing parameters.\n[EXPERIMENTAL]: endpoint is subject to change.",
"operationId": "SetLiquidityParams",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/looprpcSetLiquidityParamsResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/looprpcSetLiquidityParamsRequest"
}
}
],
"tags": [
"SwapClient"
]
}
},
"/v1/loop/in": {
"post": {
"summary": "* loop: `in`\nLoopIn initiates a loop in swap with the given parameters. The call\nreturns after the swap has been set up with the swap server. From that\npoint onwards, progress can be tracked via the SwapStatus stream\nthat is returned from Monitor().",
@ -367,6 +421,50 @@
}
}
},
"looprpcLiquidityParameters": {
"type": "object",
"properties": {
"rules": {
"type": "array",
"items": {
"$ref": "#/definitions/looprpcLiquidityRule"
},
"description": "A set of liquidity rules that describe the desired liquidity balance."
}
}
},
"looprpcLiquidityRule": {
"type": "object",
"properties": {
"channel_id": {
"type": "string",
"format": "uint64",
"description": "The short channel ID of the channel that this rule should be applied to."
},
"type": {
"$ref": "#/definitions/looprpcLiquidityRuleType",
"description": "Type indicates the type of rule that this message rule represents. Setting\nthis value will determine which fields are used in the message. The comments\non each field in this message will be prefixed with the LiquidityRuleType\nthey belong to."
},
"incoming_threshold": {
"type": "integer",
"format": "int64",
"description": "THRESHOLD: The percentage of total capacity that incoming capacity should\nnot drop beneath."
},
"outgoing_threshold": {
"type": "integer",
"format": "int64",
"description": "THRESHOLD: The percentage of total capacity that outgoing capacity should\nnot drop beneath."
}
}
},
"looprpcLiquidityRuleType": {
"type": "string",
"enum": [
"UNKNOWN",
"THRESHOLD"
],
"default": "UNKNOWN"
},
"looprpcListSwapsResponse": {
"type": "object",
"properties": {
@ -588,6 +686,18 @@
}
}
},
"looprpcSetLiquidityParamsRequest": {
"type": "object",
"properties": {
"parameters": {
"$ref": "#/definitions/looprpcLiquidityParameters",
"description": "Parameters is the desired new set of parameters for the liquidity management\nsubsystem. Note that the current set of parameters will be completely\noverwritten by the parameters provided (if they are valid), so the full set\nof parameters should be provided for each call."
}
}
},
"looprpcSetLiquidityParamsResponse": {
"type": "object"
},
"looprpcSwapResponse": {
"type": "object",
"properties": {

Loading…
Cancel
Save