mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-05 12:39:54 +02:00
lnrpc: WalletBalanceRequest adds account
This commit is contained in:
parent
f64ebfb975
commit
442f1ac4d4
File diff suppressed because it is too large
Load Diff
@ -31,10 +31,21 @@ var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = metadata.Join
|
||||
|
||||
var (
|
||||
filter_Lightning_WalletBalance_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
||||
func request_Lightning_WalletBalance_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq WalletBalanceRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_WalletBalance_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.WalletBalance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
@ -44,6 +55,13 @@ func local_request_Lightning_WalletBalance_0(ctx context.Context, marshaler runt
|
||||
var protoReq WalletBalanceRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_WalletBalance_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.WalletBalance(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
|
@ -2828,6 +2828,9 @@ message WalletAccountBalance {
|
||||
}
|
||||
|
||||
message WalletBalanceRequest {
|
||||
// The wallet account the balance is shown for.
|
||||
// If this is not specified, the balance of the "default" account is shown.
|
||||
string account = 1;
|
||||
}
|
||||
|
||||
message WalletBalanceResponse {
|
||||
|
@ -57,6 +57,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "account",
|
||||
"description": "The wallet account the balance is shown for.\nIf this is not specified, the balance of the \"default\" account is shown.",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Lightning"
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user