lnrpc+rpcserver: verbose result in ChannelBalance

This commit is contained in:
yyforyongyu committed 2020-09-24 20:26:08 +08:00
1 parent cc29e1cce8
commit f8c1bee637
4 files changed
+1101 -869

No files matched your search

+966 -851
View File
File diff suppressed because it is too large. Load diff
+33 -6
View File
@@ -32,8 +32,9 @@ service Lightning {
rpc WalletBalance (WalletBalanceRequest) returns (WalletBalanceResponse);
/* lncli: `channelbalance`
ChannelBalance returns the total funds available across all open channels
in satoshis.
ChannelBalance returns a report on the total funds across all open channels,
categorized in local/remote, pending local/remote and unsettled local/remote
balances.
*/
rpc ChannelBalance (ChannelBalanceRequest) returns (ChannelBalanceResponse);
@@ -2133,14 +2134,40 @@ message WalletBalanceResponse {
int64 unconfirmed_balance = 3;
}
message Amount {
// Value denominated in satoshis.
uint64 sat = 1;
// Value denominated in milli-satoshis.
uint64 msat = 2;
}
message ChannelBalanceRequest {
}
message ChannelBalanceResponse {
// Sum of channels balances denominated in satoshis
int64 balance = 1;
// Deprecated. Sum of channels balances denominated in satoshis
int64 balance = 1 [deprecated = true];
// Sum of channels pending balances denominated in satoshis
int64 pending_open_balance = 2;
// Deprecated. Sum of channels pending balances denominated in satoshis
int64 pending_open_balance = 2 [deprecated = true];
// Sum of channels local balances.
Amount local_balance = 3;
// Sum of channels remote balances.
Amount remote_balance = 4;
// Sum of channels local unsettled balances.
Amount unsettled_local_balance = 5;
// Sum of channels remote unsettled balances.
Amount unsettled_remote_balance = 6;
// Sum of channels pending local balances.
Amount pending_open_local_balance = 7;
// Sum of channels pending remote balances.
Amount pending_open_remote_balance = 8;
}
message QueryRoutesRequest {
+42 -3
View File
@@ -36,7 +36,7 @@
},
"/v1/balance/channels": {
"get": {
"summary": "lncli: `channelbalance`\nChannelBalance returns the total funds available across all open channels\nin satoshis.",
"summary": "lncli: `channelbalance`\nChannelBalance returns a report on the total funds across all open channels,\ncategorized in local/remote, pending local/remote and unsettled local/remote\nbalances.",
"operationId": "ChannelBalance",
"responses": {
"200": {
@@ -2476,6 +2476,21 @@
"description": "- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)\n- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)",
"title": "`AddressType` has to be one of:"
},
"lnrpcAmount": {
"type": "object",
"properties": {
"sat": {
"type": "string",
"format": "uint64",
"description": "Value denominated in satoshis."
},
"msat": {
"type": "string",
"format": "uint64",
"description": "Value denominated in milli-satoshis."
}
}
},
"lnrpcBakeMacaroonRequest": {
"type": "object",
"properties": {
@@ -2813,12 +2828,36 @@
"balance": {
"type": "string",
"format": "int64",
"title": "Sum of channels balances denominated in satoshis"
"title": "Deprecated. Sum of channels balances denominated in satoshis"
},
"pending_open_balance": {
"type": "string",
"format": "int64",
"title": "Sum of channels pending balances denominated in satoshis"
"title": "Deprecated. Sum of channels pending balances denominated in satoshis"
},
"local_balance": {
"$ref": "#/definitions/lnrpcAmount",
"description": "Sum of channels local balances."
},
"remote_balance": {
"$ref": "#/definitions/lnrpcAmount",
"description": "Sum of channels remote balances."
},
"unsettled_local_balance": {
"$ref": "#/definitions/lnrpcAmount",
"description": "Sum of channels local unsettled balances."
},
"unsettled_remote_balance": {
"$ref": "#/definitions/lnrpcAmount",
"description": "Sum of channels remote unsettled balances."
},
"pending_open_local_balance": {
"$ref": "#/definitions/lnrpcAmount",
"description": "Sum of channels pending local balances."
},
"pending_open_remote_balance": {
"$ref": "#/definitions/lnrpcAmount",
"description": "Sum of channels pending remote balances."
}
}
},