2024-01-15 13:35:14 -08:00
{
"$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."
]
}
}
} ,
2024-06-20 14:57:02 -07:00
"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>"
] ,
"examples" : [
2024-01-15 13:35:14 -08:00
{
2024-03-27 18:45:18 -07:00
"request" : {
"id" : "example:setpsbtversion#1" ,
"method" : "setpsbtversion" ,
"params" : {
2024-07-18 00:28:22 -07:00
"psbt" : "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbAA==" ,
"version" : 0
2024-03-27 18:45:18 -07:00
}
} ,
"response" : {
2024-07-18 00:28:22 -07:00
"psbt" : "cHNidP8BADUCAAAAAAFAQg8AAAAAACJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbbwAAAAAA"
2024-01-15 13:35:14 -08:00
}
} ,
{
2024-03-27 18:45:18 -07:00
"request" : {
"id" : "example:setpsbtversion#2" ,
"method" : "setpsbtversion" ,
"params" : [
2024-07-18 00:28:22 -07:00
"cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEDAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbAAEDCNXcMgAAAAAAAQQiUSA2cYCeVGcxdSZII2urHpalr5osmF2lPbYRaw1nKyPcmQABAwjV3DIAAAAAAAEEIlEgoqAceWUonu5Wtc/N25hWxw+kdsJk0h9xHGppr3dq5AMA" ,
2
2024-03-27 18:45:18 -07:00
]
} ,
"response" : {
2024-07-18 00:28:22 -07:00
"psbt" : "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEDAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbAAEDCNXcMgAAAAAAAQQiUSA2cYCeVGcxdSZII2urHpalr5osmF2lPbYRaw1nKyPcmQABAwjV3DIAAAAAAAEEIlEgoqAceWUonu5Wtc/N25hWxw+kdsJk0h9xHGppr3dq5AMA"
2024-03-27 18:45:18 -07:00
}
2024-01-15 13:35:14 -08:00
}
]
}