lnrpc: expose new MPP fields on list payments

This commit is contained in:
Conner Fromknecht 2019-11-19 20:41:27 -08:00
parent 77602451b8
commit d1f245e791
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7
3 changed files with 791 additions and 592 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2478,11 +2478,11 @@ message Payment {
/// Deprecated, use value_sat or value_msat.
int64 value = 2 [json_name = "value", deprecated = true];
/// The date of this payment
int64 creation_date = 3 [json_name = "creation_date"];
/// Deprecated, use creation_time_ns
int64 creation_date = 3 [json_name = "creation_date", deprecated = true];
/// The path this payment took
repeated string path = 4 [ json_name = "path" ];
/// The path this payment took.
repeated string path = 4 [json_name = "path", deprecated = true];
/// Deprecated, use fee_sat or fee_msat.
int64 fee = 5 [json_name = "fee", deprecated = true];
@ -2514,6 +2514,35 @@ message Payment {
/// The fee paid for this payment in milli-satoshis
int64 fee_msat = 12 [json_name = "fee_msat"];
/// The time in UNIX nanoseconds at which the payment was created.
int64 creation_time_ns = 13 [json_name = "creation_time_ns"];
/// The HTLCs made in attempt to settle the payment [EXPERIMENTAL].
repeated HTLCAttempt htlcs = 14 [json_name = "htlcs"];
}
message HTLCAttempt {
enum HTLCStatus {
IN_FLIGHT = 0;
SUCCEEDED = 1;
FAILED = 2;
}
/// The status of the HTLC.
HTLCStatus status = 1 [json_name = "status"];
/// The route taken by this HTLC.
Route route = 2 [json_name = "route"];
/// The time in UNIX nanonseconds at which this HTLC was sent.
int64 attempt_time_ns = 3 [json_name = "attempt_time_ns"];
/**
The time in UNIX nanonseconds at which this HTLC was settled or failed.
This value will not be set if the HTLC is still IN_FLIGHT.
*/
int64 resolve_time_ns = 4 [json_name = "resolve_time_ns"];
}
message ListPaymentsRequest {

View File

@ -1418,6 +1418,15 @@
],
"default": "OPEN_CHANNEL"
},
"HTLCAttemptHTLCStatus": {
"type": "string",
"enum": [
"IN_FLIGHT",
"SUCCEEDED",
"FAILED"
],
"default": "IN_FLIGHT"
},
"InvoiceInvoiceState": {
"type": "string",
"enum": [
@ -2511,6 +2520,29 @@
}
}
},
"lnrpcHTLCAttempt": {
"type": "object",
"properties": {
"status": {
"$ref": "#/definitions/HTLCAttemptHTLCStatus",
"description": "/ The status of the HTLC."
},
"route": {
"$ref": "#/definitions/lnrpcRoute",
"description": "/ The route taken by this HTLC."
},
"attempt_time_ns": {
"type": "string",
"format": "int64",
"description": "/ The time in UNIX nanonseconds at which this HTLC was sent."
},
"resolve_time_ns": {
"type": "string",
"format": "int64",
"description": "*\nThe time in UNIX nanonseconds at which this HTLC was settled or failed.\nThis value will not be set if the HTLC is still IN_FLIGHT."
}
}
},
"lnrpcHop": {
"type": "object",
"properties": {
@ -3231,14 +3263,14 @@
"creation_date": {
"type": "string",
"format": "int64",
"title": "/ The date of this payment"
"title": "/ Deprecated, use creation_time_ns"
},
"path": {
"type": "array",
"items": {
"type": "string"
},
"title": "/ The path this payment took"
"description": "/ The path this payment took."
},
"fee": {
"type": "string",
@ -3276,6 +3308,18 @@
"type": "string",
"format": "int64",
"title": "/ The fee paid for this payment in milli-satoshis"
},
"creation_time_ns": {
"type": "string",
"format": "int64",
"description": "/ The time in UNIX nanoseconds at which the payment was created."
},
"htlcs": {
"type": "array",
"items": {
"$ref": "#/definitions/lnrpcHTLCAttempt"
},
"description": "/ The HTLCs made in attempt to settle the payment [EXPERIMENTAL]."
}
}
},