Skip to content

Commit

Permalink
proto: update lit protos for channel creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jamaljsr committed May 9, 2024
1 parent 5d5e888 commit 151d08e
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 1 deletion.
12 changes: 12 additions & 0 deletions lib/types/proto/lit/lit-autopilot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ export interface AddAutopilotSessionRequest {
noPrivacyMapper: boolean;
/** Set to the ID of the group to link this session to, if any. */
linkedGroupId: Uint8Array | string;
/**
* The privacy flags used by this session. If set, then privacy_flags_set must
* be set.
*/
privacyFlags: string;
/** Indicates whether privacy flags are set. */
privacyFlagsSet: boolean;
}

export interface AddAutopilotSessionRequest_FeaturesEntry {
Expand Down Expand Up @@ -102,6 +109,11 @@ export interface Feature {
requiresUpgrade: boolean;
/** The JSON-marshaled representation of a feature's default configuration. */
defaultConfig: string;
/**
* This feature may require relaxed privacy obfuscation that can be enabled
* with these flags.
*/
privacyFlags: string;
}

export interface Feature_RulesEntry {
Expand Down
15 changes: 15 additions & 0 deletions lib/types/proto/lit/lit-sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ export interface Session {
* a JSON-serialized configuration.
*/
featureConfigs: { [key: string]: string };
/**
* Privacy flags used for the session that determine how the privacy mapper
* operates.
*/
privacyFlags: string;
}

export interface Session_AutopilotFeatureInfoEntry {
Expand Down Expand Up @@ -197,6 +202,7 @@ export interface RuleValue {
sendToSelf: SendToSelf | undefined;
channelRestrict: ChannelRestrict | undefined;
peerRestrict: PeerRestrict | undefined;
channelConstraint: ChannelConstraint | undefined;
}

export interface RateLimit {
Expand Down Expand Up @@ -274,6 +280,15 @@ export interface PeerRestrict {
peerIds: string[];
}

export interface ChannelConstraint {
/** The minimum channel size autopilot has to set for a channel. */
minCapacitySat: string;
/** The maximum channel size autopilot can set for a channel. */
maxCapacitySat: string;
/** The maximum push amount for a channel. */
maxPushSat: string;
}

/**
* Sessions is a service that gives access to the core functionalities of the
* daemon's session system.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"pool_release_tag": "v0.6.4-beta",
"faraday_release_tag": "v0.2.11-alpha",
"tapd_release_tag": "v0.3.3",
"lit_release_tag": "v0.12.3-alpha",
"lit_release_tag": "v0.12.x-alpha",
"protoc_version": "21.9"
},
"scripts": {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ message AddAutopilotSessionRequest {
Set to the ID of the group to link this session to, if any.
*/
bytes linked_group_id = 8;

/*
The privacy flags used by this session. If set, then privacy_flags_set must
be set.
*/
uint64 privacy_flags = 9;

/*
Indicates whether privacy flags are set.
*/
bool privacy_flags_set = 10;
}

message FeatureConfig {
Expand Down Expand Up @@ -166,6 +177,12 @@ message Feature {
The JSON-marshaled representation of a feature's default configuration.
*/
string default_config = 6;

/*
This feature may require relaxed privacy obfuscation that can be enabled
with these flags.
*/
uint64 privacy_flags = 7;
}

message RuleValues {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ message Session {
a JSON-serialized configuration.
*/
map<string, string> feature_configs = 18;

/*
Privacy flags used for the session that determine how the privacy mapper
operates.
*/
uint64 privacy_flags = 19;
}

message MacaroonRecipe {
Expand Down Expand Up @@ -265,6 +271,7 @@ message RuleValue {
SendToSelf send_to_self = 6;
ChannelRestrict channel_restrict = 7;
PeerRestrict peer_restrict = 8;
ChannelConstraint channel_constraint = 9;
}
}

Expand Down Expand Up @@ -389,3 +396,20 @@ message PeerRestrict {
*/
repeated string peer_ids = 1;
}

message ChannelConstraint {
/*
The minimum channel size autopilot has to set for a channel.
*/
uint64 min_capacity_sat = 1 [jstype = JS_STRING];

/*
The maximum channel size autopilot can set for a channel.
*/
uint64 max_capacity_sat = 2 [jstype = JS_STRING];

/*
The maximum push amount for a channel.
*/
uint64 max_push_sat = 3 [jstype = JS_STRING];
}
File renamed without changes.

0 comments on commit 151d08e

Please sign in to comment.