Skip to content

Commit b4337a0

Browse files
authored
Merge pull request #29 from lightninglabs/bump-litd-0.12.0
Bump litd to v0.12.0-alpha
2 parents bf6a037 + fb84496 commit b4337a0

File tree

9 files changed

+99
-4
lines changed

9 files changed

+99
-4
lines changed

lib/types/proto/lit/firewall.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@ export interface PrivacyMapConversionRequest {
2323
* string will be assumed to be the pseudo value.
2424
*/
2525
realToPseudo: boolean;
26-
/** The session ID under which to search for the real-pseudo pair. */
26+
/**
27+
* Deprecated, use group_id.
28+
* The session ID under which to search for the real-pseudo pair.
29+
*
30+
* @deprecated
31+
*/
2732
sessionId: Uint8Array | string;
2833
/** The input to be converted into the real or pseudo value. */
2934
input: string;
35+
/** The group ID under which to search for the real-pseudo pair. */
36+
groupId: Uint8Array | string;
3037
}
3138

3239
export interface PrivacyMapConversionResponse {
@@ -89,6 +96,8 @@ export interface ListActionsRequest {
8996
* considered.
9097
*/
9198
endTimestamp: string;
99+
/** If specified, then only actions under the given group will be queried. */
100+
groupId: Uint8Array | string;
92101
}
93102

94103
export interface ListActionsResponse {

lib/types/proto/lit/lit-autopilot.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export interface AddAutopilotSessionRequest {
2727
sessionRules: RulesMap | undefined;
2828
/** Set to true of the session should not make use of the privacy mapper. */
2929
noPrivacyMapper: boolean;
30+
/** Set to the ID of the group to link this session to, if any. */
31+
linkedGroupId: Uint8Array | string;
3032
}
3133

3234
export interface AddAutopilotSessionRequest_FeaturesEntry {
@@ -98,6 +100,8 @@ export interface Feature {
98100
* feature rules set contains a rule that Litd is unaware of.
99101
*/
100102
requiresUpgrade: boolean;
103+
/** The JSON-marshaled representation of a feature's default configuration. */
104+
defaultConfig: string;
101105
}
102106

103107
export interface Feature_RulesEntry {

lib/types/proto/lit/lit-sessions.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,29 @@ export interface Session {
128128
* not revoked. Readers should instead first check the session_state field.
129129
*/
130130
revokedAt: string;
131+
/**
132+
* The ID of the group of Session's that this Session is linked to. If this
133+
* session is not linked to any older Session, then this value will be the
134+
* same as the ID.
135+
*/
136+
groupId: Uint8Array | string;
137+
/**
138+
* Configurations for each individual feature mapping from the feature name to
139+
* a JSON-serialized configuration.
140+
*/
141+
featureConfigs: { [key: string]: string };
131142
}
132143

133144
export interface Session_AutopilotFeatureInfoEntry {
134145
key: string;
135146
value: RulesMap | undefined;
136147
}
137148

149+
export interface Session_FeatureConfigsEntry {
150+
key: string;
151+
value: string;
152+
}
153+
138154
export interface MacaroonRecipe {
139155
/** A list of permissions that should be included in the macaroon. */
140156
permissions: MacaroonPermission[];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"pool_release_tag": "v0.6.4-beta",
1111
"faraday_release_tag": "v0.2.11-alpha",
1212
"tapd_release_tag": "v0.2.3",
13-
"lit_release_tag": "v0.10.5-alpha",
13+
"lit_release_tag": "v0.12.0-alpha",
1414
"protoc_version": "21.9"
1515
},
1616
"scripts": {

protos/lit/v0.10.5-alpha/firewall.proto renamed to protos/lit/v0.12.0-alpha/firewall.proto

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,20 @@ message PrivacyMapConversionRequest {
3636
bool real_to_pseudo = 1;
3737

3838
/*
39+
Deprecated, use group_id.
3940
The session ID under which to search for the real-pseudo pair.
4041
*/
41-
bytes session_id = 2;
42+
bytes session_id = 2 [deprecated = true];
4243

4344
/*
4445
The input to be converted into the real or pseudo value.
4546
*/
4647
string input = 3;
48+
49+
/*
50+
The group ID under which to search for the real-pseudo pair.
51+
*/
52+
bytes group_id = 4;
4753
}
4854

4955
message PrivacyMapConversionResponse {
@@ -120,6 +126,11 @@ message ListActionsRequest {
120126
considered.
121127
*/
122128
uint64 end_timestamp = 11 [jstype = JS_STRING];
129+
130+
/*
131+
If specified, then only actions under the given group will be queried.
132+
*/
133+
bytes group_id = 12;
123134
}
124135

125136
message ListActionsResponse {

protos/lit/v0.10.5-alpha/lit-autopilot.proto renamed to protos/lit/v0.12.0-alpha/lit-autopilot.proto

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ message AddAutopilotSessionRequest {
7373
Set to true of the session should not make use of the privacy mapper.
7474
*/
7575
bool no_privacy_mapper = 7;
76+
77+
/*
78+
Set to the ID of the group to link this session to, if any.
79+
*/
80+
bytes linked_group_id = 8;
7681
}
7782

7883
message FeatureConfig {
@@ -156,6 +161,11 @@ message Feature {
156161
feature rules set contains a rule that Litd is unaware of.
157162
*/
158163
bool requires_upgrade = 5;
164+
165+
/*
166+
The JSON-marshaled representation of a feature's default configuration.
167+
*/
168+
string default_config = 6;
159169
}
160170

161171
message RuleValues {
@@ -191,4 +201,4 @@ message Permissions {
191201
A list of the permissions required for this method.
192202
*/
193203
repeated MacaroonPermission operations = 2;
194-
}
204+
}

protos/lit/v0.10.5-alpha/lit-sessions.proto renamed to protos/lit/v0.12.0-alpha/lit-sessions.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,19 @@ message Session {
199199
not revoked. Readers should instead first check the session_state field.
200200
*/
201201
uint64 revoked_at = 16 [jstype = JS_STRING];
202+
203+
/*
204+
The ID of the group of Session's that this Session is linked to. If this
205+
session is not linked to any older Session, then this value will be the
206+
same as the ID.
207+
*/
208+
bytes group_id = 17;
209+
210+
/*
211+
Configurations for each individual feature mapping from the feature name to
212+
a JSON-serialized configuration.
213+
*/
214+
map<string, string> feature_configs = 18;
202215
}
203216

204217
message MacaroonRecipe {
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
syntax = "proto3";
2+
3+
package litrpc;
4+
5+
option go_package = "github.com/lightninglabs/lightning-terminal/litrpc";
6+
7+
// The Status server can be used to query the state of various LiT sub-servers.
8+
service Status {
9+
rpc SubServerStatus (SubServerStatusReq) returns (SubServerStatusResp);
10+
}
11+
12+
message SubServerStatusReq {
13+
}
14+
15+
message SubServerStatusResp {
16+
// A map of sub-server names to their status.
17+
map<string, SubServerStatus> sub_servers = 1;
18+
}
19+
20+
message SubServerStatus {
21+
// disabled is true if the sub-server is available in the LiT package but
22+
// has explicitly been disabled.
23+
bool disabled = 1;
24+
25+
// running is true if the sub-server is currently running.
26+
bool running = 2;
27+
28+
// error describes an error that might have resulted in the sub-server not
29+
// starting up properly.
30+
string error = 3;
31+
}

scripts/update_protos.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ curl ${TAPD_URL}/${TAPD_RELEASE_TAG}/taprpc/universerpc/universe.proto --create-
5353

5454
curl ${LIT_URL}/${LIT_RELEASE_TAG}/litrpc/firewall.proto --create-dirs -o protos/lit/${LIT_RELEASE_TAG}/firewall.proto
5555
curl ${LIT_URL}/${LIT_RELEASE_TAG}/litrpc/lit-sessions.proto --create-dirs -o protos/lit/${LIT_RELEASE_TAG}/lit-sessions.proto
56+
curl ${LIT_URL}/${LIT_RELEASE_TAG}/litrpc/lit-status.proto --create-dirs -o protos/lit/${LIT_RELEASE_TAG}/lit-status.proto
5657
curl ${LIT_URL}/${LIT_RELEASE_TAG}/litrpc/lit-autopilot.proto --create-dirs -o protos/lit/${LIT_RELEASE_TAG}/lit-autopilot.proto

0 commit comments

Comments
 (0)