Skip to content

Commit

Permalink
Update proto files
Browse files Browse the repository at this point in the history
  • Loading branch information
Github committed Jun 1, 2022
1 parent c85acbe commit 3cf505c
Show file tree
Hide file tree
Showing 4 changed files with 490 additions and 9 deletions.
88 changes: 82 additions & 6 deletions proto/lightning.proto
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,38 @@ message Utxo {
int64 confirmations = 6;
}

enum OutputScriptType {
SCRIPT_TYPE_PUBKEY_HASH = 0;
SCRIPT_TYPE_SCRIPT_HASH = 1;
SCRIPT_TYPE_WITNESS_V0_PUBKEY_HASH = 2;
SCRIPT_TYPE_WITNESS_V0_SCRIPT_HASH = 3;
SCRIPT_TYPE_PUBKEY = 4;
SCRIPT_TYPE_MULTISIG = 5;
SCRIPT_TYPE_NULLDATA = 6;
SCRIPT_TYPE_NON_STANDARD = 7;
SCRIPT_TYPE_WITNESS_UNKNOWN = 8;
}

message OutputDetail {
// The type of the output
OutputScriptType output_type = 1;

// The address
string address = 2;

// The pkscript in hex
string pk_script = 3;

// The output index used in the raw transaction
int64 output_index = 4;

// The value of the output coin in satoshis
int64 amount = 5;

// Denotes if the output is controlled by the internal wallet
bool is_our_address = 6;
}

message Transaction {
// The transaction hash
string tx_hash = 1;
Expand All @@ -642,8 +674,12 @@ message Transaction {
// Fees paid for this transaction
int64 total_fees = 7;

// Addresses that received funds for this transaction
repeated string dest_addresses = 8;
// Addresses that received funds for this transaction. Deprecated as it is
// now incorporated in the output_details field.
repeated string dest_addresses = 8 [deprecated = true];

// Outputs that received funds for this transaction
repeated OutputDetail output_details = 11;

// The raw transaction hex.
string raw_tx_hex = 9;
Expand Down Expand Up @@ -1102,12 +1138,15 @@ message ListUnspentResponse {
- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)
- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)
- `p2tr`: Pay to taproot pubkey (`TAPROOT_PUBKEY` = 4)
*/
enum AddressType {
WITNESS_PUBKEY_HASH = 0;
NESTED_PUBKEY_HASH = 1;
UNUSED_WITNESS_PUBKEY_HASH = 2;
UNUSED_NESTED_PUBKEY_HASH = 3;
TAPROOT_PUBKEY = 4;
UNUSED_TAPROOT_PUBKEY = 5;
}

message NewAddressRequest {
Expand Down Expand Up @@ -1770,6 +1809,11 @@ message GetInfoResponse {
announcements and invoices.
*/
map<uint32, Feature> features = 19;

/*
Indicates whether the HTLC interceptor API is in always-on mode.
*/
bool require_htlc_interceptor = 21;
}

message GetRecoveryInfoRequest {
Expand Down Expand Up @@ -2316,15 +2360,15 @@ message PendingChannelsResponse {

// A set of flags showing the current state of the channel.
string chan_status_flags = 11;

// Whether this channel is advertised to the network or not.
bool private = 12;
}

message PendingOpenChannel {
// The pending channel
PendingChannel channel = 1;

// The height at which this channel will be confirmed
uint32 confirmation_height = 2;

/*
The amount calculated to be paid in fees for the current set of
commitment transactions. The fee amount is persisted with the channel
Expand All @@ -2343,6 +2387,9 @@ message PendingChannelsResponse {
transaction. This value can later be updated once the channel is open.
*/
int64 fee_per_kw = 6;

// Previously used for confirmation_height. Do not reuse.
reserved 2;
}

message WaitingCloseChannel {
Expand Down Expand Up @@ -2499,6 +2546,10 @@ message WalletBalanceResponse {
// The unconfirmed balance of a wallet(with 0 confirmations)
int64 unconfirmed_balance = 3;

// The total amount of wallet UTXOs held in outputs that are locked for
// other usage.
int64 locked_balance = 5;

// A mapping of each wallet account's name to its balance.
map<string, WalletAccountBalance> account_balance = 4;
}
Expand Down Expand Up @@ -2646,6 +2697,12 @@ message QueryRoutesRequest {
fallback.
*/
repeated lnrpc.FeatureBit dest_features = 17;

/*
The time preference for this payment. Set to -1 to optimize for fees
only, to 1 to optimize for reliability only or a value inbetween for a mix.
*/
double time_pref = 18;
}

message NodePair {
Expand Down Expand Up @@ -2714,7 +2771,7 @@ message Hop {
TLV format. Note that if any custom tlv_records below are specified, then
this field MUST be set to true for them to be encoded properly.
*/
bool tlv_payload = 9;
bool tlv_payload = 9 [deprecated = true];

/*
An optional TLV record that signals the use of an MPP payment. If present,
Expand All @@ -2740,6 +2797,9 @@ message Hop {
to drop off at each hop within the onion.
*/
map<uint64, bytes> custom_records = 11;

// The payment metadata to send along with the payment to the payee.
bytes metadata = 13;
}

message MPPRecord {
Expand Down Expand Up @@ -3573,6 +3633,14 @@ message ListPaymentsRequest {
of the returned payments is always oldest first (ascending index order).
*/
bool reversed = 4;

/*
If set, all payments (complete and incomplete, independent of the
max_payments parameter) will be counted. Note that setting this to true will
increase the run time of the call significantly on systems that have a lot
of payments, as all of them have to be iterated through to be counted.
*/
bool count_total_payments = 5;
}

message ListPaymentsResponse {
Expand All @@ -3590,6 +3658,14 @@ message ListPaymentsResponse {
as the index_offset to continue seeking forwards in the next request.
*/
uint64 last_index_offset = 3;

/*
Will only be set if count_total_payments in the request was set. Represents
the total number of payments (complete and incomplete, independent of the
number of payments requested in the query) currently present in the payments
database.
*/
uint64 total_num_payments = 4;
}

message DeletePaymentRequest {
Expand Down
21 changes: 21 additions & 0 deletions proto/router.proto
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,12 @@ message SendPaymentRequest {
If set, an AMP-payment will be attempted.
*/
bool amp = 22;

/*
The time preference for this payment. Set to -1 to optimize for fees
only, to 1 to optimize for reliability only or a value inbetween for a mix.
*/
double time_pref = 23;
}

message TrackPaymentRequest {
Expand Down Expand Up @@ -781,6 +787,21 @@ message ForwardHtlcInterceptResponse {

// The preimage in case the resolve action is Settle.
bytes preimage = 3;

// Encrypted failure message in case the resolve action is Fail.
//
// If failure_message is specified, the failure_code field must be set
// to zero.
bytes failure_message = 4;

// Return the specified failure code in case the resolve action is Fail. The
// message data fields are populated automatically.
//
// If a non-zero failure_code is specified, failure_message must not be set.
//
// For backwards-compatibility reasons, TEMPORARY_CHANNEL_FAILURE is the
// default value for this field.
lnrpc.Failure.FailureCode failure_code = 5;
}

enum ResolveHoldForwardAction {
Expand Down
Loading

0 comments on commit 3cf505c

Please sign in to comment.