GuidesMaintenance

Sign air-gapped

Carry a PSBT to a Coldcard or a Krux on an SD card, and bring the signed file back to Liana.

For now, Liana reads and writes a PSBT only as a file, never as a QR code.

Round trip of one PSBT on an SD card: Liana exports psbt.psbt, the Coldcard or Krux signs it after you approve, and Liana imports the signed file.
One file goes out on the SD card and comes back signed. No cable and no QR code connect Liana to the device.

You will need

  • A drafted transaction: One drafted on the Send screen, as in Send bitcoin.
  • An SD card: One that both the computer and the signing device can read.

Check that your device signs from an SD card

These signing devices sign from an SD card:

  • Coldcard
  • Krux

A Blockstream Jade signs with Liana over USB only. Sign with any other device over USB, as in Send bitcoin.

Register the descriptor from a file

Export the descriptor file

In Liana, select Settings > Import/export. Under Other formats, select Descriptor only - plain-text, and save the file to the top level of the SD card. Liana suggests the name liana-<checksum>.txt.

Save the file as Liana-<checksum>.txt, with a capital L. The Coldcard names the wallet after the file. Over USB, Liana looks for Liana-<checksum>.

The file holds the descriptor in plain text, for the signing device to read. Wizardsardine does not recommend keeping it as a backup, for privacy. Whoever reads it sees your balance, your history and your timelocks, as The descriptor is private, not secret explains.

Liana's Settings > Import/export section, with the Descriptor only - plain-text entry at the bottom, under Other formats.
Export the plain-text descriptor for the signing device, under Other formats.

Load the descriptor on the device

Follow the page of your device. Pick your model from Coldcard, or go to Krux. Read the policy on the device's own screen before you approve it.

A Coldcard Q screen reading Create new miniscript wallet?, Wallet Name: Liana-h5md234p, Segwit P2WSH and the policy with older(52596).
The Coldcard names the wallet after the file and shows the policy. In this example, the Coldcard is a Q.

Export the PSBT

Save the draft

On the draft, select Save, then Save again in the Save this transaction window. Liana turns on Export and Import once the draft is saved.

Export the PSBT to the SD card

In the Signatures card of the draft, select Export. Liana opens your operating system's save dialog with the name psbt.psbt. Save the file to the top level of the SD card.

Eject the SD card

Eject the card in your operating system before you remove it, so that it finishes writing the file.

Sign on the device

The Coldcard is set to Delete PSBTs?

With Settings > Delete PSBTs set to Delete PSBTs, the Coldcard writes no signed PSBT for a transaction it considers complete. It writes only a .txn file, which Liana cannot import. Set it back to Default Keep before you sign.

Open the PSBT on the Coldcard

Insert the SD card into the Coldcard and select Ready To Sign. If the card holds several PSBT files, select psbt.psbt.

Check the transaction on the Coldcard

Compare every address, every amount and the fee with the payment you intended. The Coldcard's screen is the one display that malware on your computer cannot alter.

A Coldcard Q screen titled OK TO SEND?, showing the wallet Liana-h5md234p, Sending 0.10000000 BTC, Network fee 0.00002550 BTC, 1 input and 2 outputs.
The review opens on the amount sent and the network fee. Scroll down to check each destination address.

Approve on the Coldcard

Press OK, or ENTER on a Coldcard Q, when the Coldcard asks OK TO SEND?. The Coldcard writes the signed PSBT next to the original. For a Liana wallet it names the file psbt-part.psbt, even when the transaction has all its signatures. Only a Taproot wallet signed by its single primary key gets psbt-signed.psbt.

A Coldcard Q screen titled PSBT Signed, reading Updated PSBT is: psbt-part.psbt.
The Coldcard names the signed file it wrote to the card. In this example, it is psbt-part.psbt.

Import the signed PSBT

Open the draft

Insert the SD card into the computer. In Liana, select Drafts & approvals, then select the draft.

Import the signed file

In the Signatures card, select Import, then select the signed file on the SD card. Liana shows Import successful. If it shows another message, see Fix a failed import.

Read the Signatures card

The pill next to the transaction's label gives the draft's status:

  • To broadcast: One spending path has all its signatures, and its timelock, if any, has expired. Liana lists the keys that signed after Signed by. Broadcast replaces Sign.
  • Timelocked: A recovery path has all its signatures, but its timelock has not expired for at least one coin. Liana offers Broadcast once it has.
  • Unsigned: Under the Signatures count, Liana lists the keys that can still sign after Requires 1 more signature from, or Requires 2 more signatures from. Repeat the export with the next signing device.
The draft labelled Paper wallet, To broadcast, with the Signatures 1 of 1 card, Signed by My Coldcard, and its Broadcast button.
Once the spending path has its signatures, the draft turns to To broadcast and Broadcast replaces Sign.

A recovery transaction follows the same procedures. Its draft carries a Recovery pill next to the transaction's label.

Collect signatures from cosigners

The keys can sign in any order. For example, I sign with a connected device first, then export the PSBT for an air-gapped one.

Using Liana Connect?

With Liana Connect, every member of the wallet sees the saved draft under Drafts & approvals, with no file to pass.

A cosigner who runs Liana with the same wallet on another computer signs from the file:

Send the exported file to the cosigner

Export the PSBT as above and send the file to the cosigner. Use a channel you both consider private, because a PSBT reveals your wallet's policy.

The cosigner imports the file as a draft

On the cosigner's computer, open Drafts & approvals with no draft open, and select Import. Liana adds the transaction to the cosigner's drafts.

Liana's Drafts & approvals list with the Import and New buttons at the top right, above a saved draft of 0.1 BTC labelled Paper wallet, at 0/1 and Unsigned.
With no draft open, Drafts & approvals offers Import at the top right.

The cosigner signs and exports

The cosigner signs with Sign, or on an air-gapped device as above. The cosigner then selects Export and sends the file back to you.

Import the cosigner's file into your draft

Open your draft under Drafts & approvals, select Import, and select the cosigner's file.

Fix a failed import

Liana showsCause and fix
ImportExport: fail to parse PSBTThe file holds text that is not a base64 PSBT. Select the file that the signing device wrote, such as psbt-part.psbt.
An error that starts with ImportExport Io ErrorThe file is not text, for example a binary PSBT. Sign the file that Liana exported, which is base64 text.
The imported PSBT txid doesn't match this PSBTThe file holds another transaction than the open draft. Export the open draft, and sign that file.
The Psbt is not saneThe PSBT is malformed, or its inputs do not match each other, for example some are signed and others are not. Export the open draft again, and sign that file.
Import failed. The PSBT either doesn't belong to the wallet or has already been spent.The PSBT, imported with no draft open, spends coins that this wallet does not know. Open the wallet that the PSBT comes from, or ask for a new draft.
The draft stays Unsigned after the importThe path may need more signatures, as the Signatures count shows. Otherwise, the file adds no signature that the path needs. Check that the device holds a key of that path. If Bitcoin Core finalized the PSBT, Liana finds no signature in it: sign it again with finalize set to false in walletprocesspsbt.

Next steps