core-lightning/doc/schemas/lightning-setpsbtversion.json
2024-04-04 13:16:27 +10:30

88 lines
2.1 KiB
JSON

{
"$schema": "../rpc-schema-draft.json",
"type": "object",
"additionalProperties": false,
"rpc": "setpsbtversion",
"title": "Command for setting PSBT version",
"description": [
"The **setpsbtversion** RPC command converts the provided PSBT to the given version, and returns the base64 result of the conversion. Returns an error if version is invalid."
],
"request": {
"required": [
"psbt",
"version"
],
"properties": {
"psbt": {
"type": "string",
"description": [
"The PSBT to change versions."
]
},
"version": {
"type": "u32",
"description": [
"The version to set."
]
}
}
},
"response": {
"required": [
"psbt"
],
"properties": {
"psbt": {
"type": "string",
"description": [
"A converted PSBT of the requested version."
]
}
}
},
"json_example": [
{
"request": {
"id": "example:setpsbtversion#1",
"method": "setpsbtversion",
"params": {
"psbt": "cHNidP8BAAoCAAAAAAAAAAAAAA==",
"version": "2"
}
},
"response": {
"psbt": "cHNidP8BAgQCAAAAAQQBAAEFAQABBgEDAfsEAgAAAAA="
}
},
{
"request": {
"id": "example:setpsbtversion#2",
"method": "setpsbtversion",
"params": [
"cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIJd6ICNAQALFOMhoUHuSVSuzcaUdkDKlk4K+A+DR9+4uAA==",
0
]
},
"response": {
"psbt": "cHNidP8BADUCAAAAAAFAQg8AAAAAACJRIJd6ICNAQALFOMhoUHuSVSuzcaUdkDKlk4K+A+DR9+4ubwAAAAAA"
}
}
],
"errors": [
"The following error codes may occur:",
"",
"- -32602: Parameter missed or malformed."
],
"author": [
"Gregory Sanders <<gsanders87@gmail.com>> is mainly responsible."
],
"see_also": [
"lightning-fundpsbt(7)",
"lightning-utxopsbt(7)",
"lightning-signpsbt(7)"
],
"resources": [
"Main web site: <https://github.com/ElementsProject/lightning>"
]
}