mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
04884ca664
Merge information from `*.request.json` & `*.schema.json`. Also consolidate remaining details from `*.md` files and create a single file in schemas folder.
108 lines
3.6 KiB
JSON
108 lines
3.6 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"rpc": "upgradewallet",
|
|
"title": "Command to spend all P2SH-wrapped inputs into a Native Segwit output",
|
|
"description": [
|
|
"`upgradewallet` is a convenience RPC which will spend all p2sh-wrapped Segwit deposits in a wallet into a single Native Segwit P2WPKH address."
|
|
],
|
|
"request": {
|
|
"required": [],
|
|
"properties": {
|
|
"feerate": {
|
|
"type": "feerate",
|
|
"description": [
|
|
"Feerate for the upgrade transaction."
|
|
],
|
|
"added": "v23.02",
|
|
"default": "*opening*"
|
|
},
|
|
"reservedok": {
|
|
"type": "boolean",
|
|
"description": [
|
|
"Tells the wallet to include all P2SH-wrapped inputs, including reserved ones."
|
|
],
|
|
"added": "v23.02"
|
|
}
|
|
}
|
|
},
|
|
"response": {
|
|
"required": [
|
|
"upgraded_outs"
|
|
],
|
|
"properties": {
|
|
"upgraded_outs": {
|
|
"type": "u64",
|
|
"description": [
|
|
"Count of spent/upgraded UTXOs."
|
|
],
|
|
"added": "v23.02"
|
|
},
|
|
"psbt": {
|
|
"type": "string",
|
|
"description": [
|
|
"The PSBT that was finalized and sent."
|
|
],
|
|
"added": "v23.02"
|
|
},
|
|
"tx": {
|
|
"type": "hex",
|
|
"description": [
|
|
"The raw transaction which was sent."
|
|
],
|
|
"added": "v23.02"
|
|
},
|
|
"txid": {
|
|
"type": "txid",
|
|
"description": [
|
|
"The txid of the **tx**."
|
|
],
|
|
"added": "v23.02"
|
|
}
|
|
}
|
|
},
|
|
"example_usage": [
|
|
"The caller is trying to buy a liquidity ad but the command keeps failing. They have funds in their wallet, but they're all P2SH-wrapped outputs.",
|
|
"",
|
|
"The caller can call `upgradewallet` to convert their funds to native segwit outputs, which are valid for liquidity ad buys."
|
|
],
|
|
"example_json_request": [
|
|
{
|
|
"id": "example:upgradewallet#1",
|
|
"method": "upgradewallet",
|
|
"params": "{}"
|
|
},
|
|
{
|
|
"id": "example:upgradewallet#2",
|
|
"method": "upgradewallet",
|
|
"params": {
|
|
"feerate": "urgent",
|
|
"reservedok": true
|
|
}
|
|
}
|
|
],
|
|
"example_json_response": [
|
|
{
|
|
"upgraded_outs": 0
|
|
},
|
|
{
|
|
"tx": "0200000001c08ce0a9ea1e00179ea603cb8619ec2a2df990ef931e1ccd87fa7a0e271ed8370100000000fdffffff013514310100000000225120888ab14b6e1655d1d00039b836d70b66e3351543ab6cd2f94166255f3d5e6cb5cf000000",
|
|
"txid": "de5f1d6f0b2f95cfe5cfbf8cc33bd3f279a8f800ee0efc27bbfafb2b6ead9560",
|
|
"psbt": "cHNidP8BAgQCAAAAAQMEzwAAAAEEAQEBBQEBAQYBAwH7BAIAAAAAAQDgAgAAAAABAZRZ0m0kaJA+ubJw1eYurGROu1BYc0i7l9xbyG06R6uZAQAAAAD9////AmQtPCgBAAAAF6kUnoGu9IUv0FGnzol3Lb/BNBNkOViHAC0xAQAAAAAXqRRlVyjzbP420BqlDTI2cERp+EpVQIcCRzBEAiBliJpjBsipwFgsLZMlzbESZ6hMTh+pgKQlXUIL0nLb3wIga/xwr/IJgEc7Ie6ApS4aVDr9xr1TZ3wj+8bRvI6WqScBIQPgYuc48PzUufScX6A6YOsdmJwn+bAQjLZ/g9jhQYduHM4AAAABASAALTEBAAAAABepFGVXKPNs/jbQGqUNMjZwRGn4SlVAhyICArnAxoROEqUxyWjlXFUHjsFtm/dr6SkP2H0cynK0g5oXRzBEAiBlTUNYfS5n5rGRVmoNb0z3AMGJjHijwpXROGIVxfoBnQIgeTx32KY3CcfYTYzXUIRQAMUQB7rlPWRptWMDD3UttkcBAQQWABTWuWnTbf/a2YaRk/Zj7kgN/cc0iCIGArnAxoROEqUxyWjlXFUHjsFtm/dr6SkP2H0cynK0g5oXCNa5adMAAAAAAQ4gwIzgqeoeABeepgPLhhnsKi35kO+THhzNh/p6Dice2DcBDwQBAAAAARAE/f///wABAwg1FDEBAAAAAAEEIlEgiIqxS24WVdHQADm4NtcLZuM1FUOrbNL5QWYlXz1ebLUhByjMj8l44gnxaV+ltWVQYdsaqyMRtSQXaUW/EBXvLUuJCQCftnv8BwAAAAA=",
|
|
"upgraded_outs": 1
|
|
}
|
|
],
|
|
"author": [
|
|
"Lisa Neigut <<niftynei@gmail.com>> is mainly responsible."
|
|
],
|
|
"see_also": [
|
|
"lightning-utxopsbt(7)",
|
|
"lightning-reserveinputs(7)",
|
|
"lightning-unreserveinputs(7)"
|
|
],
|
|
"resources": [
|
|
"Main web site: <https://github.com/ElementsProject/lightning>"
|
|
]
|
|
}
|