Skip to content

Commit 5df268b

Browse files
committed
proto: update lit protos for channel creation
1 parent 5d5e888 commit 5df268b

File tree

7 files changed

+87
-5
lines changed

7 files changed

+87
-5
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ export interface AddAutopilotSessionRequest {
2929
noPrivacyMapper: boolean;
3030
/** Set to the ID of the group to link this session to, if any. */
3131
linkedGroupId: Uint8Array | string;
32+
/**
33+
* The privacy flags used by this session. If set, then privacy_flags_set must
34+
* be set.
35+
*/
36+
privacyFlags: string;
37+
/** Indicates whether privacy flags are set. */
38+
privacyFlagsSet: boolean;
3239
}
3340

3441
export interface AddAutopilotSessionRequest_FeaturesEntry {
@@ -102,6 +109,11 @@ export interface Feature {
102109
requiresUpgrade: boolean;
103110
/** The JSON-marshaled representation of a feature's default configuration. */
104111
defaultConfig: string;
112+
/**
113+
* This feature may require relaxed privacy obfuscation that can be enabled
114+
* with these flags.
115+
*/
116+
privacyFlags: string;
105117
}
106118

107119
export interface Feature_RulesEntry {

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ export interface Session {
139139
* a JSON-serialized configuration.
140140
*/
141141
featureConfigs: { [key: string]: string };
142+
/**
143+
* Privacy flags used for the session that determine how the privacy mapper
144+
* operates.
145+
*/
146+
privacyFlags: string;
142147
}
143148

144149
export interface Session_AutopilotFeatureInfoEntry {
@@ -197,6 +202,7 @@ export interface RuleValue {
197202
sendToSelf: SendToSelf | undefined;
198203
channelRestrict: ChannelRestrict | undefined;
199204
peerRestrict: PeerRestrict | undefined;
205+
channelConstraint: ChannelConstraint | undefined;
200206
}
201207

202208
export interface RateLimit {
@@ -274,6 +280,19 @@ export interface PeerRestrict {
274280
peerIds: string[];
275281
}
276282

283+
export interface ChannelConstraint {
284+
/** The minimum channel size autopilot has to set for a channel. */
285+
minCapacitySat: string;
286+
/** The maximum channel size autopilot can set for a channel. */
287+
maxCapacitySat: string;
288+
/** The maximum push amount for a channel. */
289+
maxPushSat: string;
290+
/** Indicates whether opening of private channels is allowed. */
291+
privateAllowed: boolean;
292+
/** Indicates whether opening of public channels is allowed. */
293+
publicAllowed: boolean;
294+
}
295+
277296
/**
278297
* Sessions is a service that gives access to the core functionalities of the
279298
* daemon's session system.

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.3.3",
13-
"lit_release_tag": "v0.12.3-alpha",
13+
"lit_release_tag": "v0.12.x-alpha",
1414
"protoc_version": "21.9"
1515
},
1616
"scripts": {

protos/lit/v0.12.3-alpha/firewall.proto renamed to protos/lit/v0.12.x-alpha/firewall.proto

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ message ListActionsRequest {
8888
The index of an action that will be used as the start of a query to
8989
determine which actions should be returned in the response.
9090
*/
91-
uint64 index_offset = 5;
91+
uint64 index_offset = 5 [jstype = JS_STRING];
9292

9393
/*
9494
The max number of actions to return in the response to this query.
9595
*/
96-
uint64 max_num_actions = 6;
96+
uint64 max_num_actions = 6 [jstype = JS_STRING];
9797

9898
/*
9999
If set, the actions returned will result from seeking backwards from the
@@ -143,13 +143,13 @@ message ListActionsResponse {
143143
The index of the last item in the set of returned actions. This can be used
144144
to seek further, pagination style.
145145
*/
146-
uint64 last_index_offset = 2;
146+
uint64 last_index_offset = 2 [jstype = JS_STRING];
147147

148148
/*
149149
The total number of actions that matched the filter in the request. It is
150150
only set if count_total was set in the request.
151151
*/
152-
uint64 total_count = 3;
152+
uint64 total_count = 3 [jstype = JS_STRING];
153153
}
154154

155155
message Action {

protos/lit/v0.12.3-alpha/lit-autopilot.proto renamed to protos/lit/v0.12.x-alpha/lit-autopilot.proto

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ message AddAutopilotSessionRequest {
7878
Set to the ID of the group to link this session to, if any.
7979
*/
8080
bytes linked_group_id = 8;
81+
82+
/*
83+
The privacy flags used by this session. If set, then privacy_flags_set must
84+
be set.
85+
*/
86+
uint64 privacy_flags = 9 [jstype = JS_STRING];
87+
88+
/*
89+
Indicates whether privacy flags are set.
90+
*/
91+
bool privacy_flags_set = 10;
8192
}
8293

8394
message FeatureConfig {
@@ -166,6 +177,12 @@ message Feature {
166177
The JSON-marshaled representation of a feature's default configuration.
167178
*/
168179
string default_config = 6;
180+
181+
/*
182+
This feature may require relaxed privacy obfuscation that can be enabled
183+
with these flags.
184+
*/
185+
uint64 privacy_flags = 7 [jstype = JS_STRING];
169186
}
170187

171188
message RuleValues {

protos/lit/v0.12.3-alpha/lit-sessions.proto renamed to protos/lit/v0.12.x-alpha/lit-sessions.proto

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ message Session {
212212
a JSON-serialized configuration.
213213
*/
214214
map<string, string> feature_configs = 18;
215+
216+
/*
217+
Privacy flags used for the session that determine how the privacy mapper
218+
operates.
219+
*/
220+
uint64 privacy_flags = 19 [jstype = JS_STRING];
215221
}
216222

217223
message MacaroonRecipe {
@@ -265,6 +271,7 @@ message RuleValue {
265271
SendToSelf send_to_self = 6;
266272
ChannelRestrict channel_restrict = 7;
267273
PeerRestrict peer_restrict = 8;
274+
ChannelConstraint channel_constraint = 9;
268275
}
269276
}
270277

@@ -389,3 +396,30 @@ message PeerRestrict {
389396
*/
390397
repeated string peer_ids = 1;
391398
}
399+
400+
message ChannelConstraint {
401+
/*
402+
The minimum channel size autopilot has to set for a channel.
403+
*/
404+
uint64 min_capacity_sat = 1 [jstype = JS_STRING];
405+
406+
/*
407+
The maximum channel size autopilot can set for a channel.
408+
*/
409+
uint64 max_capacity_sat = 2 [jstype = JS_STRING];
410+
411+
/*
412+
The maximum push amount for a channel.
413+
*/
414+
uint64 max_push_sat = 3 [jstype = JS_STRING];
415+
416+
/*
417+
Indicates whether opening of private channels is allowed.
418+
*/
419+
bool private_allowed = 4;
420+
421+
/*
422+
Indicates whether opening of public channels is allowed.
423+
*/
424+
bool public_allowed = 5;
425+
}

0 commit comments

Comments
 (0)