Skip to content

Commit 151d08e

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

File tree

7 files changed

+69
-1
lines changed

7 files changed

+69
-1
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: 15 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,15 @@ 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+
}
291+
277292
/**
278293
* Sessions is a service that gives access to the core functionalities of the
279294
* 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/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;
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;
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: 24 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;
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,20 @@ 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+
}

0 commit comments

Comments
 (0)