DevicesKrux

Maix Amigo

Set up Krux on a Maix Amigo, then register the descriptor, verify an address and sign for Liana over a microSD card.

A Sipeed Maix Amigo at an angle: a touchscreen in a grey case, with three buttons on its edge.

You will need

  • Card: A microSD card, formatted as the Krux page says. The Amigo has a microSD slot, not a full-size SD slot.
  • Cable: A USB-C cable, to flash Krux and to charge the battery.

Prepare the Maix Amigo

Touch and the three buttons do the same things on the Amigo. Each step gives the touch gesture, and the table gives the buttons for it. The buttons sit at the top of the right edge, marked with an up arrow, a down arrow and a dot. Krux calls them PREVIOUS, PAGE and ENTER, in that order.

TouchButtons
Tap a menu entry.Press PAGE or PREVIOUS to move the highlight, then press ENTER.
Swipe up or down to see the rest of a long menu.Press PAGE past the last entry.
Tap the screen to go to the next screen of a review.Press any button.
Tap Yes, on the right, or No, on the left, to answer a question such as Load?Press PAGE or PREVIOUS to switch, then press ENTER.
Tap < Back, the last entry, to leave a menu.Highlight < Back, then press ENTER.

When you switch from touch to the buttons, the first press in a menu or on a question only shows the highlight. On a question, the highlight starts on Yes. Read the question before you press ENTER.

Flash Krux through the bottom USB-C port

The Amigo has two USB-C ports. Use the one at the bottom of the device, not the one on the left side. Turn the Amigo off before you plug it in, because a computer's USB-C port may not recognize an Amigo that is already on.

Follow Krux's installation guide, which also shows how to verify the download. The Amigo creates two serial ports on the computer. If ktool picks the wrong one and flashing fails, pass the port with -p, as the pre-built release page shows. When the Amigo shows the Krux logo, unplug the cable.

Turn on the Amigo

Press the power button. From Krux 26.09.0, the first start of each release shows a disclaimer. Tap the screen to go past its text, then tap I understand.

Maix Amigo screen reading Use it at your own risk. above I understand, highlighted, and Shutdown.
Tap I understand. Krux asks again only after you install another release.

Krux then opens on its start menu.

Maix Amigo start menu with Load Mnemonic highlighted, then New Mnemonic, Settings, Tools, About and Shutdown.
Krux starts on this menu, with no seed phrase loaded.

Load the seed phrase

Tap Load Mnemonic, or New Mnemonic to create one. Krux's own pages cover loading and creating a seed phrase. The Amigo then shows the wallet's attributes and its fingerprint above Load Wallet, Passphrase and Customize. Write down the fingerprint.

Maix Amigo screen showing the fingerprint 73c5da0a, Mainnet, Single-sig, the path m/84h/0h/0h and No Passphrase, above Load Wallet, Passphrase and Customize.
Write down the fingerprint at the top. Before you customize it, the wallet is Single-sig.

For a new seed phrase, Krux 26.08.0 and later shows Continue and Wallet Options instead. Customize is under Wallet Options.

Set the policy type to Miniscript

Tap Customize, then Policy Type, then Miniscript (Experimental). Tap Native Segwit - P2WSH, or Taproot - P2TR for a Taproot wallet. The derivation path at the top changes to m/48h/0h/0h/2h, the path Liana uses.

Maix Amigo Customize screen showing Mainnet, Miniscript, P2WSH and the path m/48h/0h/0h/2h, above Network, Policy Type, Script Type and Derivation Path.
After Native Segwit - P2WSH, the path at the top reads m/48h/0h/0h/2h.

Check the network, then load the wallet

Under Network, keep Mainnet for real bitcoin, or tap Testnet for a test network. Tap < Back, then Load Wallet, or Continue for a new seed phrase.

Maix Amigo screen showing the fingerprint 73c5da0a, Mainnet, Miniscript, the path m/48h/0h/0h/2h and No Passphrase, with Load Wallet highlighted.
Check the network, Miniscript and the path before you tap Load Wallet.

Each time you turn the Amigo on, load the seed phrase, then the descriptor, before you sign, as the Krux page explains.

Connect to Liana

The microSD card carries every file between Liana and the Amigo:

FileWritten byRead by
XPUB.pub (TPUB.pub on a test network)The AmigoLiana, when you create the wallet
liana-<checksum>.txtLianaThe Amigo, to load the descriptor
psbt.psbtLianaThe Amigo, to sign
psbt-signed.psbtThe AmigoLiana, to add the signature

Keep every file at the top level of the card.

Insert the microSD card

Insert the card while the Amigo is on. Krux detects it.

Save the key to the card

On the Amigo, tap Extended Public Key, then XPUB - Text. The Amigo shows the fingerprint, the derivation path and the xpub. Tap Save to SD card, tap Yes at Save to SD card?, keep the file name XPUB, and tap Go. The Amigo shows Saved to SD card: above XPUB.pub.

Maix Amigo screen showing the fingerprint 73c5da0a, the path m/48h/0h/0h/2h and a full xpub, above a Save to SD card entry.
The Amigo shows the fingerprint, the derivation path and the xpub above Save to SD card.

Import the key in Liana

Move the card to the computer. In the installer, on the Set keys screen, select Set next to the key. In Select key source, select Other options, then Import extended public key file (xpub), and select XPUB.pub on the card.

Name the key

Enter a name of 24 characters at most in Key name (alias):, then select Apply. Liana reads the fingerprint and the derivation path from the file.

Register the descriptor

Liana cannot register the descriptor on a Krux. Its installer skips the Register descriptor step when no key comes from a connected device. Load the descriptor on the Amigo once the wallet exists, and again after each restart. Krux describes its Wallet Descriptor menu in Navigating the main menu.

Export the descriptor from Liana

Go to Settings > Import/export. Under Other formats, select Descriptor only - plain-text, and save the file to the top level of the card. Liana suggests the name liana-<checksum>.txt. The Amigo needs this file to load the descriptor. 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 Amigo, under Other formats.

Open the descriptor on the Amigo

Insert the card in the Amigo. Tap Wallet, then Wallet Descriptor. The Amigo shows Wallet output descriptor not found. Tap Yes at Load?, then Load from SD card. Tap the liana- file, then Yes at Load? under the file details.

Maix Amigo screen showing the file liana-v86zu0e3.txt with its size and dates, above the Load? question with No and Yes.
The file details show the name Liana gave the descriptor. Tap Yes to read it.

Accept the policy change

If the Amigo shows Wallet mismatch: with Policy Type:, Script Type: or Network:, tap Yes at Change wallet?. The Amigo switches to the wallet's attributes and keeps your seed phrase.

Maix Amigo screen Wallet mismatch: with Policy Type: Single-sig > Miniscript and Script Type: P2WPKH > P2WSH, above the Change wallet? question.
The Amigo lists each attribute it changes to match the descriptor.

Check the keys and the policy

The Amigo lists each key as A:, B: with its fingerprint, derivation path and the start and end of its xpub. Your own key is in color. Below the keys, or on the next screen, the Amigo shows the policy with the letters in place of the keys. For example, older(52596) is a recovery path after 52,596 blocks (about 1 year). Compare the fingerprints with the keys of the wallet in Liana.

Maix Amigo screen titled Miniscript listing key A, in color, and key B with fingerprint, path and shortened xpub, then the policy or_d(pk(A), and_v(v:pkh(B), older(52596))) above the Load? question.
Compare the fingerprints of A and B with the keys in Liana, and check older(52596).

Load the descriptor

Tap Yes at Load?. The Amigo shows Wallet output descriptor loaded!

Maix Amigo screen showing Wallet output descriptor loaded! in green.
The descriptor stays loaded until the Amigo turns off.

Verify an address

The Amigo checks an address by scanning the QR code Liana shows, as the Krux page explains.

Show the address as a QR code

In Liana, select Receive, then Generate address. Enter a label, then select Generate. In the Address window, select Show QR code.

Scan it with the Amigo

With the descriptor loaded, tap Address, then Scan Address, then Receive. Hold the Amigo with its back to the screen, because Krux reads QR codes with the rear camera. The Amigo shows the address it read.

Maix Amigo screen showing the scanned QR code above the address bc1qyqwq52v8eh2vrpjfu66rhj39jytht68anz60k4lgu2esym5c5scqgg4hr4, split into groups of four characters.
The Amigo shows the address it read. It has not checked it against the wallet yet.

Check that the address belongs to the wallet

Tap Yes at Check that address belongs to this wallet?. The Amigo searches the first 50 receive addresses. It shows the index, the address and is a valid address!. If it shows Checked 50 addresses with no matches., tap Yes at Try more? to search the next 50. Never use an address the Amigo does not find.

Maix Amigo screen showing index 0, a bc1q address split into groups of four characters in alternating colors, and is a valid address!
The Amigo shows the index and the address it found in the wallet, then is a valid address!

Sign a transaction

Export the PSBT from Liana

On the draft, select Save, then Save in Save this transaction. In the Signatures card, select Export and save psbt.psbt to the top level of the SD card. Sign air-gapped covers the Liana side in detail.

Open the PSBT on the Amigo

Tap Sign, then PSBT. If the Amigo warns Wallet output descriptor not found., tap No at Proceed?, load the descriptor, then tap Sign and PSBT again. Tap Load from SD card, then psbt.psbt, then Yes at Load?.

Maix Amigo screen showing the file psbt.psbt with its size and dates, above the Load? question with No and Yes.
Check that the file is the psbt.psbt you exported from Liana, then tap Yes.

Check the transaction

The first screen shows the totals under Inputs, Spend, Self-transfer or Change and Fee:. The Amigo shows the fee with its percentage of the outputs, change included. Compare it with the fee Liana showed. Tap the screen to see each address and amount. Compare every Spend: address and amount with the payment you intended. With a fee of 10% or more of the outputs, the Amigo warns High fees! and asks Proceed? before this screen.

Maix Amigo review screen with Inputs (1) 0.5 BTC, Spend (1) 0.1 BTC, Self-transfer or Change (1) 0.3999785 BTC and Fee: 0.0000215 BTC (0.1%).
The first screen totals the inputs, the payment, the change and the fee, with the fee as a percentage.

Sign to the card

Tap Sign to SD card, not Sign to QR code. Keep the file name psbt-signed and tap Go. The Amigo shows Saved to SD card: above psbt-signed.psbt.

Maix Amigo menu with Review Again, Sign to QR code, and Sign to SD card highlighted, above Back.
Tap Sign to SD card. Liana cannot read the QR code of Sign to QR code.

Import the signed PSBT

Move the card to the computer. In Liana, open the draft under Drafts & approvals. In the Signatures card, select Import, then psbt-signed.psbt. Liana shows Import successful.

Sign with a recovery path

Build the transaction as Recover in Liana describes. Liana marks the draft with a Recovery pill next to the transaction's label. Sign it as above, with the same descriptor loaded. The Amigo can sign only if it holds a key of the recovery path.

Fix common problems