lightning-setpsbtversion

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 (string): The PSBT to change versions.
  • version (u32): The version to set.

RETURN VALUE

On success, an object is returned, containing:

  • psbt (string): A converted PSBT of the requested version.

ERRORS

The following error codes may occur:

  • -32602: Parameter missed or malformed.

JSON EXAMPLE

Example 1:

Request:

{
  "id": "example:setpsbtversion#1",
  "method": "setpsbtversion",
  "params": {
    "psbt": "cHNidP8BAAoCAAAAAAAAAAAAAA==",
    "version": "2"
  }
}

Response:

{
  "psbt": "cHNidP8BAgQCAAAAAQQBAAEFAQABBgEDAfsEAgAAAAA="
}

Example 2:

Request:

{
  "id": "example:setpsbtversion#2",
  "method": "setpsbtversion",
  "params": [
    "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIJd6ICNAQALFOMhoUHuSVSuzcaUdkDKlk4K+A+DR9+4uAA==",
    0
  ]
}

Response:

{
  "psbt": "cHNidP8BADUCAAAAAAFAQg8AAAAAACJRIJd6ICNAQALFOMhoUHuSVSuzcaUdkDKlk4K+A+DR9+4ubwAAAAAA"
}

AUTHOR

Gregory Sanders <[email protected]> is mainly responsible.

SEE ALSO

lightning-fundpsbt(7), lightning-utxopsbt(7), lightning-signpsbt(7)

RESOURCES

Main web site: https://github.com/ElementsProject/lightning