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.

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

EXAMPLES

Example 1:

Request:

lightning-cli setpsbtversion -k "psbt"="cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbAA==" "version"=0
{
  "id": "example:setpsbtversion#1",
  "method": "setpsbtversion",
  "params": {
    "psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbAA==",
    "version": 0
  }
}

Response:

{
  "psbt": "cHNidP8BADUCAAAAAAFAQg8AAAAAACJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbbwAAAAAA"
}

Example 2:

Request:

lightning-cli setpsbtversion "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEDAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbAAEDCNXcMgAAAAAAAQQiUSA2cYCeVGcxdSZII2urHpalr5osmF2lPbYRaw1nKyPcmQABAwjV3DIAAAAAAAEEIlEgoqAceWUonu5Wtc/N25hWxw+kdsJk0h9xHGppr3dq5AMA" "2"
{
  "id": "example:setpsbtversion#2",
  "method": "setpsbtversion",
  "params": [
    "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEDAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbAAEDCNXcMgAAAAAAAQQiUSA2cYCeVGcxdSZII2urHpalr5osmF2lPbYRaw1nKyPcmQABAwjV3DIAAAAAAAEEIlEgoqAceWUonu5Wtc/N25hWxw+kdsJk0h9xHGppr3dq5AMA",
    2
  ]
}

Response:

{
  "psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEDAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIO7yw3zIUblRUcdhCLSjdFxJsYHu2s0Y29bT0bGAGdcbAAEDCNXcMgAAAAAAAQQiUSA2cYCeVGcxdSZII2urHpalr5osmF2lPbYRaw1nKyPcmQABAwjV3DIAAAAAAAEEIlEgoqAceWUonu5Wtc/N25hWxw+kdsJk0h9xHGppr3dq5AMA"
}

Core Lightning (previously c-lightning) is a lightweight, highly customizable and standard compliant implementation of the Lightning Network protocol.

© 2023 Core Lightning
All rights reserved.

Discussion Forum

The official Core Lightning forum is hosted at discuss.corelightning.org

BuildonL2 Community

The official BuildOnL2 community lives at community.corelightning.org. Join us and build the future of bitcoin on lightning.

Mailing List

For general discussions about CLN implementation, use [email protected]. For the Lightning Network, use [email protected]

Telegram

Community-driven telegram group where most of the node operators hang out. Go to https://t.me/lightningd to join.

Discord

Community-driven discord server where the devs flock together. Go to https://discord.gg/w27fMFESMN to join.

Internet Relay Chat

Don't hesitate to reach out to us on IRC at #lightning-dev @ libera.chat, #c-lightning @ libera.chat.