Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proto: update lit protos for autopilot channel creation #35

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
19 changes: 19 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,19 @@ 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;
/** Indicates whether opening of private channels is allowed. */
privateAllowed: boolean;
/** Indicates whether opening of public channels is allowed. */
publicAllowed: boolean;
}

/**
* 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
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ message ListActionsRequest {
The index of an action that will be used as the start of a query to
determine which actions should be returned in the response.
*/
uint64 index_offset = 5;
uint64 index_offset = 5 [jstype = JS_STRING];

/*
The max number of actions to return in the response to this query.
*/
uint64 max_num_actions = 6;
uint64 max_num_actions = 6 [jstype = JS_STRING];

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

/*
The total number of actions that matched the filter in the request. It is
only set if count_total was set in the request.
*/
uint64 total_count = 3;
uint64 total_count = 3 [jstype = JS_STRING];
}

message Action {
Expand Down
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 [jstype = JS_STRING];

/*
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 [jstype = JS_STRING];
}

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 [jstype = JS_STRING];
}

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,30 @@ 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];

/*
Indicates whether opening of private channels is allowed.
*/
bool private_allowed = 4;

/*
Indicates whether opening of public channels is allowed.
*/
bool public_allowed = 5;
}
Loading