walletrpc: return meaningful responses instead of empty
This commit is contained in:
4 files changed
+562
-496
No files matched your search
+524
-490
File diff suppressed because it is too large.
Load diff
@@ -414,6 +414,8 @@ message ReleaseOutputRequest {
|
||||
}
|
||||
|
||||
message ReleaseOutputResponse {
|
||||
// The status of the release operation.
|
||||
string status = 1;
|
||||
}
|
||||
|
||||
message KeyReq {
|
||||
@@ -699,6 +701,8 @@ message ImportPublicKeyRequest {
|
||||
AddressType address_type = 2;
|
||||
}
|
||||
message ImportPublicKeyResponse {
|
||||
// The status of the import operation.
|
||||
string status = 1;
|
||||
}
|
||||
|
||||
message ImportTapscriptRequest {
|
||||
@@ -1318,6 +1322,8 @@ message LabelTransactionRequest {
|
||||
}
|
||||
|
||||
message LabelTransactionResponse {
|
||||
// The status of the label operation.
|
||||
string status = 1;
|
||||
}
|
||||
|
||||
// The possible change address types for default accounts and single imported
|
||||
|
||||
@@ -1692,7 +1692,13 @@
|
||||
}
|
||||
},
|
||||
"walletrpcImportPublicKeyResponse": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "The status of the import operation."
|
||||
}
|
||||
}
|
||||
},
|
||||
"walletrpcImportTapscriptRequest": {
|
||||
"type": "object",
|
||||
@@ -1764,7 +1770,13 @@
|
||||
}
|
||||
},
|
||||
"walletrpcLabelTransactionResponse": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "The status of the label operation."
|
||||
}
|
||||
}
|
||||
},
|
||||
"walletrpcLeaseOutputRequest": {
|
||||
"type": "object",
|
||||
@@ -2002,7 +2014,13 @@
|
||||
}
|
||||
},
|
||||
"walletrpcReleaseOutputResponse": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "The status of the release operation."
|
||||
}
|
||||
}
|
||||
},
|
||||
"walletrpcRemoveTransactionResponse": {
|
||||
"type": "object",
|
||||
|
||||
@@ -536,7 +536,9 @@ func (w *WalletKit) ReleaseOutput(ctx context.Context,
|
||||
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.
|
||||
@@ -1443,7 +1445,10 @@ func (w *WalletKit) LabelTransaction(ctx context.Context,
|
||||
}
|
||||
|
||||
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
|
||||
@@ -2896,7 +2901,10 @@ func (w *WalletKit) ImportPublicKey(_ context.Context,
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user