mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-18 21:35:24 +01:00
walletrpc: return meaningful responses instead of empty
This commit is contained in:
parent
26216f749a
commit
d89ea2d335
File diff suppressed because it is too large
Load Diff
@ -414,6 +414,8 @@ message ReleaseOutputRequest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message ReleaseOutputResponse {
|
message ReleaseOutputResponse {
|
||||||
|
// The status of the release operation.
|
||||||
|
string status = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message KeyReq {
|
message KeyReq {
|
||||||
@ -699,6 +701,8 @@ message ImportPublicKeyRequest {
|
|||||||
AddressType address_type = 2;
|
AddressType address_type = 2;
|
||||||
}
|
}
|
||||||
message ImportPublicKeyResponse {
|
message ImportPublicKeyResponse {
|
||||||
|
// The status of the import operation.
|
||||||
|
string status = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ImportTapscriptRequest {
|
message ImportTapscriptRequest {
|
||||||
@ -1318,6 +1322,8 @@ message LabelTransactionRequest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message LabelTransactionResponse {
|
message LabelTransactionResponse {
|
||||||
|
// The status of the label operation.
|
||||||
|
string status = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The possible change address types for default accounts and single imported
|
// The possible change address types for default accounts and single imported
|
||||||
|
@ -1692,7 +1692,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"walletrpcImportPublicKeyResponse": {
|
"walletrpcImportPublicKeyResponse": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The status of the import operation."
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"walletrpcImportTapscriptRequest": {
|
"walletrpcImportTapscriptRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -1764,7 +1770,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"walletrpcLabelTransactionResponse": {
|
"walletrpcLabelTransactionResponse": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The status of the label operation."
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"walletrpcLeaseOutputRequest": {
|
"walletrpcLeaseOutputRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -2002,7 +2014,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"walletrpcReleaseOutputResponse": {
|
"walletrpcReleaseOutputResponse": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The status of the release operation."
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"walletrpcRemoveTransactionResponse": {
|
"walletrpcRemoveTransactionResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -536,7 +536,9 @@ func (w *WalletKit) ReleaseOutput(ctx context.Context,
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return &ReleaseOutputResponse{}, nil
|
return &ReleaseOutputResponse{
|
||||||
|
Status: fmt.Sprintf("output %v released", op.String()),
|
||||||
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ListLeases returns a list of all currently locked utxos.
|
// ListLeases returns a list of all currently locked utxos.
|
||||||
@ -1443,7 +1445,10 @@ func (w *WalletKit) LabelTransaction(ctx context.Context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
err = w.cfg.Wallet.LabelTransaction(*hash, req.Label, req.Overwrite)
|
err = w.cfg.Wallet.LabelTransaction(*hash, req.Label, req.Overwrite)
|
||||||
return &LabelTransactionResponse{}, err
|
|
||||||
|
return &LabelTransactionResponse{
|
||||||
|
Status: fmt.Sprintf("transaction label '%s' added", req.Label),
|
||||||
|
}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// FundPsbt creates a fully populated PSBT that contains enough inputs to fund
|
// FundPsbt creates a fully populated PSBT that contains enough inputs to fund
|
||||||
@ -2896,7 +2901,10 @@ func (w *WalletKit) ImportPublicKey(_ context.Context,
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return &ImportPublicKeyResponse{}, nil
|
return &ImportPublicKeyResponse{
|
||||||
|
Status: fmt.Sprintf("public key %x imported",
|
||||||
|
pubKey.SerializeCompressed()),
|
||||||
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ImportTapscript imports a Taproot script and internal key and adds the
|
// ImportTapscript imports a Taproot script and internal key and adds the
|
||||||
|
Loading…
Reference in New Issue
Block a user