mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
PSBTv2 support is quite low in the ecosystem, so having a call to convert log messages and the like should be useful since they'll often be in v2. Changelog-Added: Added setpsbtversion RPC to aid debugging and compatibility
63 lines
1.2 KiB
Markdown
63 lines
1.2 KiB
Markdown
lightning-setpsbtversion -- Command for setting PSBT version
|
|
============================================================
|
|
|
|
SYNOPSIS
|
|
--------
|
|
|
|
**setpsbtversion** *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.
|
|
|
|
- *psbt*: The PSBT to change versions.
|
|
- *version*: The version to set.
|
|
|
|
EXAMPLE JSON REQUEST
|
|
------------
|
|
```json
|
|
{
|
|
"id": 82,
|
|
"method": "setpsbtversion",
|
|
"params": {
|
|
"psbt": "cHNidP8BAAoCAAAAAAAAAAAAAA==",
|
|
"version": "2"
|
|
}
|
|
}
|
|
```
|
|
|
|
RETURN VALUE
|
|
------------
|
|
|
|
If successful the command returns a converted PSBT of the requested version.
|
|
|
|
On failure, an error is returned.
|
|
|
|
The following error codes may occur:
|
|
|
|
- -32602: Parameter missed or malformed;
|
|
|
|
EXAMPLE JSON RESPONSE
|
|
-----
|
|
```json
|
|
{
|
|
"psbt": "cHNidP8BAgQCAAAAAQQBAAEFAQABBgEDAfsEAgAAAAA="
|
|
}
|
|
```
|
|
|
|
|
|
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>
|