Skip to content

Instantly share code, notes, and snippets.

@odudex
Last active March 11, 2025 14:28
Show Gist options
  • Save odudex/7c50d8bb95066a738e88cc9843735cff to your computer and use it in GitHub Desktop.
Save odudex/7c50d8bb95066a738e88cc9843735cff to your computer and use it in GitHub Desktop.
A Taproot Simple Inheritance example with Krux and Liana

Liana Simple Inheritance Taproot Miniscript Wallet with Krux

Overview

This guide details how to set up a Taproot miniscript wallet using:

  • Krux: For key creation, backup, and transaction signing.
  • Liana Wallet: For creating a “Simple Inheritance” wallet that uses the keys generated on Krux.

The process involves key management, backups, and data exchange via an SD card.

Step-by-Step Guide

1. Prerequisites & Preparation

  • Required Items:
    • Krux with firmware v25.03.0
    • Liana Wallet v9
    • An SD card
    • A text editor (for transferring data between the SD card and Liana)

2. Key Creation & Backup on Krux

  • Create a key on Krux.
  • Back up the key and record its fingerprint.
  • Reset Krux and test your backup by reloading the key.
  • Customization during Loading:
    • Press “Customize” to change the policy type to miniscript.
    • Choose Taproot as the script type.
  • Post-Loading Adjustments:
    • Its also possible to Change wallet attributes later in “Wallet -> Customize” and to set defaults in “Settings -> Default Wallet” immediately after boot.

2.1 Exporting the Main XPUB

  • With the wallet loaded and configured:
    • Insert an SD card.
    • Navigate to "Extended Public Key" → "XPUB - Text" → "Save to SD card".
  • This exports your primary key, which can sign transactions whenever needed on this setup.

3. Creating an Heir Key via BIP85

  • Deriving a BIP85 Child Key:
    • Go to "Wallet" → "BIP85" and press "Yes".
    • Choose "BIP39 Mnemonic" (select between 12 or 24 words).
    • Choose an Index (using 0 is suggested).
    • Record and back up the heir's key and fingerprint, then press "Yes" to load it.
    • After loading child key, you can use other Krux backup formats.

3.1 Export the Heir's XPUB:

  • Once loaded, export the heir’s XPUB via "Extended Public Key" → "XPUB - Text" → "Save to SD card".

Note: To use BIP85 for heir's key is just a suggestion for a quick setup, heir's key can be generated with its own entropy instead of being deterministically derived.

4. Setting Up the Wallet in Liana

  • Open Extended Public Keys on PC:

    • Insert your SD Card on computer and load Extended Public Keys on a text editor.
  • Creating a New Wallet:

    • Open Liana and select "Create a new Liana wallet" → "Simple inheritance".
    • Read the briefing and click "Next".
  • Configuring Keys:

    • In the "Set keys" window, click "Advanced setting" and change the "Descriptor type" to "Taproot".
    • Primary Key:
      • Click "Set" and choose "Enter an extended public key".
      • Copy the primary XPUB from your text editor and paste it into Liana.
      • Assign a recognizable name to the primary key.
    • Heir's Key:
      • Set the time period after which the heir’s key can recover funds. For testing purposes, set a short expiration time (e.g., a few hours) to quickly simulate expiration and validate the recovery procedure.
      • Paste the heir’s XPUB into Liana.
  • Wallet Descriptor Backup:

    • Liana will generate a wallet descriptor.
    • Copy the descriptor to a text editor and save it as a .txt file on your PC.
    • Save an additional copy on the SD card for verification on Krux.

5. Final Steps & Transaction Signing

  • Liana Connect Setup:
    • After backing up the descriptor, click "Next".
    • Choose "Use Liana Connect" for testing purposes.
    • Provide your email and authenticate with the token sent to you.
  • Wallet Operation:
    • Once the wallet is loaded, you can check your balance, generate receiving addresses, and manage settings.
    • Creating & Signing Transactions for Primary Key:
      • Create a PSBT (Partially Signed Bitcoin Transaction) in Liana.
      • Copy the PSBT to a text editor, save it on the SD card, and sign it using Krux.
      • Load the signed PSBT back into the text editor, then copy it into Liana to finalize and broadcast the transaction.
    • Creating & Signing Transactions for Recovery Key:
      • After a utxo has expired, Create a PSBT via Settings —> Recovery, then follow the same process as above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment