Merge pull request #8955 from yyforyongyu/cr-8516-240729-sendcoins
Allow selecting coins in `sendcoins`
This commit is contained in:
20 files changed
+3538
-3104
No files matched your search
+3006
-2994
File diff suppressed because it is too large.
Load diff
@@ -1190,9 +1190,8 @@ message SendCoinsRequest {
|
||||
int64 sat_per_byte = 5 [deprecated = true];
|
||||
|
||||
/*
|
||||
If set, then the amount field will be ignored, and lnd will attempt to
|
||||
send all the coins under control of the internal wallet to the specified
|
||||
address.
|
||||
If set, the amount field should be unset. It indicates lnd will send all
|
||||
wallet coins or all selected coins to the specified address.
|
||||
*/
|
||||
bool send_all = 6;
|
||||
|
||||
@@ -1208,6 +1207,9 @@ message SendCoinsRequest {
|
||||
|
||||
// The strategy to use for selecting coins.
|
||||
CoinSelectionStrategy coin_selection_strategy = 10;
|
||||
|
||||
// A list of selected outpoints as inputs for the transaction.
|
||||
repeated OutPoint outpoints = 11;
|
||||
}
|
||||
message SendCoinsResponse {
|
||||
// The transaction ID of the transaction
|
||||
|
||||
@@ -6965,7 +6965,7 @@
|
||||
},
|
||||
"send_all": {
|
||||
"type": "boolean",
|
||||
"description": "If set, then the amount field will be ignored, and lnd will attempt to\nsend all the coins under control of the internal wallet to the specified\naddress."
|
||||
"description": "If set, the amount field should be unset. It indicates lnd will send all\nwallet coins or all selected coins to the specified address."
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
@@ -6983,6 +6983,13 @@
|
||||
"coin_selection_strategy": {
|
||||
"$ref": "#/definitions/lnrpcCoinSelectionStrategy",
|
||||
"description": "The strategy to use for selecting coins."
|
||||
},
|
||||
"outpoints": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/lnrpcOutPoint"
|
||||
},
|
||||
"description": "A list of selected outpoints as inputs for the transaction."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -811,8 +811,8 @@ func (w *WalletKit) SendOutputs(ctx context.Context,
|
||||
// requirement, we can request that the wallet attempts to create this
|
||||
// transaction.
|
||||
tx, err := w.cfg.Wallet.SendOutputs(
|
||||
outputsToCreate, chainfee.SatPerKWeight(req.SatPerKw), minConfs,
|
||||
label, coinSelectionStrategy,
|
||||
nil, outputsToCreate, chainfee.SatPerKWeight(req.SatPerKw),
|
||||
minConfs, label, coinSelectionStrategy,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user