multi: add bumpforceclosefee rpc endpoint.
Add a new bumpforceclosefee rpc endpoint to the wallet server. Move the logic from the lncli level to the wallet server rpc level. This is more in line with a proper client-server design. wallet lncli: use new bumpforceclosefee endpoint. Besides using the new bumpforceclosefee rpc endpoint we also enable the bumping of taproot anchor channels.
This commit is contained in:
12 files changed
+1233
-621
No files matched your search
@@ -16,6 +16,39 @@
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/v2/wallet/BumpForceCloseFee": {
|
||||
"post": {
|
||||
"summary": "lncli: `wallet bumpforceclosefee`\nBumpForceCloseFee is an endpoint that allows users to bump the fee of a\nchannel force close. This only works for channels with option_anchors.",
|
||||
"operationId": "WalletKit_BumpForceCloseFee",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/walletrpcBumpForceCloseFeeResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/walletrpcBumpForceCloseFeeRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"WalletKit"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v2/wallet/accounts": {
|
||||
"get": {
|
||||
"summary": "lncli: `wallet accounts list`\nListAccounts retrieves all accounts belonging to the wallet by default. A\nname and key scope filter can be provided to filter through all of the\nwallet accounts and return only those matching.",
|
||||
@@ -949,6 +982,25 @@
|
||||
"description": "- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)\n- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)\n- `p2tr`: Pay to taproot pubkey (`TAPROOT_PUBKEY` = 4)",
|
||||
"title": "`AddressType` has to be one of:"
|
||||
},
|
||||
"lnrpcChannelPoint": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"funding_txid_bytes": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "Txid of the funding transaction. When using REST, this field must be\nencoded as base64."
|
||||
},
|
||||
"funding_txid_str": {
|
||||
"type": "string",
|
||||
"description": "Hex-encoded string representing the byte-reversed hash of the funding\ntransaction."
|
||||
},
|
||||
"output_index": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"title": "The index of the output of the funding transaction"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lnrpcCoinSelectionStrategy": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -1396,6 +1448,43 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"walletrpcBumpForceCloseFeeRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"chan_point": {
|
||||
"$ref": "#/definitions/lnrpcChannelPoint",
|
||||
"description": "The channel point which force close transaction we are attempting to\nbump the fee rate for."
|
||||
},
|
||||
"deadline_delta": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "Optional. The deadline delta in number of blocks that the anchor output\nshould be spent within to bump the closing transaction."
|
||||
},
|
||||
"starting_feerate": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"description": "Optional. The starting fee rate, expressed in sat/vbyte. This value will be\nused by the sweeper's fee function as its starting fee rate. When not set,\nthe sweeper will use the estimated fee rate using the target_conf as the\nstarting fee rate."
|
||||
},
|
||||
"immediate": {
|
||||
"type": "boolean",
|
||||
"description": "Optional. Whether this cpfp transaction will be triggered immediately. When\nset to true, the sweeper will consider all currently registered sweeps and\ntrigger new batch transactions including the sweeping of the anchor output\nrelated to the selected force close transaction."
|
||||
},
|
||||
"budget": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"description": "Optional. The max amount in sats that can be used as the fees. For already\nregistered anchor outputs if not set explicitly the old value will be used.\nFor channel force closes which have no HTLCs in their commitment transaction\nthis value has to be set to an appropriate amount to pay for the cpfp\ntransaction of the force closed channel otherwise the fee bumping will fail."
|
||||
}
|
||||
}
|
||||
},
|
||||
"walletrpcBumpForceCloseFeeResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "The status of the force close fee bump operation."
|
||||
}
|
||||
}
|
||||
},
|
||||
"walletrpcChangeAddressType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
||||
Reference in new issue
Block a user