Skip to content

Commit 5facbb2

Browse files
committed
proto: update Loop protos to v0.24.1-beta
1 parent b37fae6 commit 5facbb2

File tree

6 files changed

+145
-1
lines changed

6 files changed

+145
-1
lines changed

lib/types/proto/loop/client.ts

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,40 @@ export interface LsatToken {
559559
storageName: string;
560560
}
561561

562+
export interface LoopStats {
563+
/** Number of currently pending swaps. */
564+
pendingCount: string;
565+
/** Number of succeeded swaps. */
566+
successCount: string;
567+
/** Number failed swaps. */
568+
failCount: string;
569+
/** The sum of all pending swap amounts. */
570+
sumPendingAmt: string;
571+
/** The sum of all succeeded swap amounts. */
572+
sumSucceededAmt: string;
573+
}
574+
575+
export interface GetInfoRequest {}
576+
577+
export interface GetInfoResponse {
578+
/** The current daemon version. */
579+
version: string;
580+
/** The network the daemon is running on. */
581+
network: string;
582+
/** Host and port of the loopd grpc server. */
583+
rpcListen: string;
584+
/** Host and port of the loopd rest server. */
585+
restListen: string;
586+
/** Loop's macaroon path that clients use to talk to the daemon. */
587+
macaroonPath: string;
588+
/** Loop's tls cert path */
589+
tlsCertPath: string;
590+
/** Statistics about loop outs. */
591+
loopOutStats: LoopStats | undefined;
592+
/** Statistics about loop ins. */
593+
loopInStats: LoopStats | undefined;
594+
}
595+
562596
export interface GetLiquidityParamsRequest {}
563597

564598
export interface LiquidityParameters {
@@ -668,6 +702,19 @@ export interface LiquidityParameters {
668702
* UNIX timestamp in seconds.
669703
*/
670704
autoloopBudgetLastRefresh: string;
705+
/**
706+
* Set to true to enable easy autoloop. If set, all channel/peer rules will be
707+
* overridden and the client will automatically dispatch swaps in order to meet
708+
* the configured local balance target size. Currently only loop out is
709+
* supported, meaning that easy autoloop can only reduce the funds that are
710+
* held as balance in channels.
711+
*/
712+
easyAutoloop: boolean;
713+
/**
714+
* The local balance target size, expressed in satoshis. This is used by easy
715+
* autoloop to determine how much liquidity should be maintained in channels.
716+
*/
717+
easyAutoloopLocalTargetSat: string;
671718
}
672719

673720
export interface LiquidityRule {
@@ -821,6 +868,11 @@ export interface SwapClient {
821868
getLsatTokens(
822869
request?: DeepPartial<TokensRequest>
823870
): Promise<TokensResponse>;
871+
/**
872+
* loop: `getinfo`
873+
* GetInfo gets basic information about the loop daemon.
874+
*/
875+
getInfo(request?: DeepPartial<GetInfoRequest>): Promise<GetInfoResponse>;
824876
/**
825877
* loop: `getparams`
826878
* GetLiquidityParams gets the parameters that the daemon's liquidity manager

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"types": "./dist/index.d.ts",
77
"config": {
88
"lnd_release_tag": "v0.16.3-beta",
9-
"loop_release_tag": "v0.22.0-beta",
9+
"loop_release_tag": "v0.24.1-beta",
1010
"pool_release_tag": "v0.6.2-beta",
1111
"faraday_release_tag": "v0.2.9-alpha",
1212
"tapd_release_tag": "v0.2.0-lit-0",

protos/loop/v0.22.0-beta/client.proto renamed to protos/loop/v0.24.1-beta/client.proto

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ service SwapClient {
7575
*/
7676
rpc GetLsatTokens (TokensRequest) returns (TokensResponse);
7777

78+
/* loop: `getinfo`
79+
GetInfo gets basic information about the loop daemon.
80+
*/
81+
rpc GetInfo (GetInfoRequest) returns (GetInfoResponse);
82+
7883
/* loop: `getparams`
7984
GetLiquidityParams gets the parameters that the daemon's liquidity manager
8085
is currently configured with. This may be nil if nothing is configured.
@@ -740,6 +745,78 @@ message LsatToken {
740745
string storage_name = 8;
741746
}
742747

748+
message LoopStats {
749+
/*
750+
Number of currently pending swaps.
751+
*/
752+
uint64 pending_count = 1;
753+
754+
/*
755+
Number of succeeded swaps.
756+
*/
757+
uint64 success_count = 2;
758+
759+
/*
760+
Number failed swaps.
761+
*/
762+
uint64 fail_count = 3;
763+
764+
/*
765+
The sum of all pending swap amounts.
766+
*/
767+
int64 sum_pending_amt = 4;
768+
769+
/*
770+
The sum of all succeeded swap amounts.
771+
*/
772+
int64 sum_succeeded_amt = 5;
773+
}
774+
775+
message GetInfoRequest {
776+
}
777+
778+
message GetInfoResponse {
779+
/*
780+
The current daemon version.
781+
*/
782+
string version = 1;
783+
784+
/*
785+
The network the daemon is running on.
786+
*/
787+
string network = 2;
788+
789+
/*
790+
Host and port of the loopd grpc server.
791+
*/
792+
string rpc_listen = 3;
793+
794+
/*
795+
Host and port of the loopd rest server.
796+
*/
797+
string rest_listen = 4;
798+
799+
/*
800+
Loop's macaroon path that clients use to talk to the daemon.
801+
*/
802+
string macaroon_path = 5;
803+
804+
/*
805+
Loop's tls cert path
806+
*/
807+
string tls_cert_path = 6;
808+
809+
/*
810+
Statistics about loop outs.
811+
*/
812+
LoopStats loop_out_stats = 7;
813+
814+
/*
815+
Statistics about loop ins.
816+
*/
817+
LoopStats loop_in_stats = 8;
818+
}
819+
743820
message GetLiquidityParamsRequest {
744821
}
745822

@@ -873,6 +950,21 @@ message LiquidityParameters {
873950
UNIX timestamp in seconds.
874951
*/
875952
uint64 autoloop_budget_last_refresh = 20;
953+
954+
/*
955+
Set to true to enable easy autoloop. If set, all channel/peer rules will be
956+
overridden and the client will automatically dispatch swaps in order to meet
957+
the configured local balance target size. Currently only loop out is
958+
supported, meaning that easy autoloop can only reduce the funds that are
959+
held as balance in channels.
960+
*/
961+
bool easy_autoloop = 21;
962+
963+
/*
964+
The local balance target size, expressed in satoshis. This is used by easy
965+
autoloop to determine how much liquidity should be maintained in channels.
966+
*/
967+
uint64 easy_autoloop_local_target_sat = 22;
876968
}
877969

878970
enum LiquidityRuleType {
File renamed without changes.

0 commit comments

Comments
 (0)