a0abcbd382doc: Mention multipath specifier (Ava Chow)0019f61fc5tests: Test importing of multipath descriptors (Ava Chow)f97d5c137dwallet, rpc: Allow importdescriptors to import multipath descriptors (Ava Chow)32dcbca3fbrpc: Allow importmulti to import multipath descriptors correctly (Ava Chow)64dfe3ce4bwallet: Move internal to be per key when importing (Ava Chow)1692245525tests: Multipath descriptors for scantxoutset and deriveaddresses (Ava Chow)cddc0ba9a9rpc: Have deriveaddresses derive receiving and change (Ava Chow)360456cd22tests: Multipath descriptors for getdescriptorinfo (Ava Chow)a90eee444ctests: Add unit tests for multipath descriptors (Ava Chow)1bbf46e2dadescriptors: Change Parse to return vector of descriptors (Ava Chow)0d640c6f02descriptors: Have ParseKeypath handle multipath specifiers (Ava Chow)a5f39b1034descriptors: Change ParseScript to return vector of descriptors (Ava Chow)0d55deae15descriptors: Add DescriptorImpl::Clone (Ava Chow)7e86541f72descriptors: Add PubkeyProvider::Clone (Ava Chow) Pull request description: It is convenient to have a descriptor which specifies both receiving and change addresses in a single string. However, as discussed in https://github.com/bitcoin/bitcoin/issues/17190#issuecomment-895515768, it is not feasible to use a generic multipath specification like BIP 88 due to combinatorial blow up and that it would result in unexpected descriptors. To resolve that problem, this PR proposes a targeted solution which allows only a single pair of 2 derivation indexes to be inserted in the place of a single derivation index. So instead of two descriptor `wpkh(xpub.../0/0/*)` and `wpkh(xpub.../0/1/*)` to represent receive and change addresses, this could be written as `wpkh(xpub.../0/<0;1>/*)`. The multipath specifier is of the form `<NUM;NUM>`. Each `NUM` can have its own hardened specifier, e.g. `<0;1h>` is valid. The multipath specifier can also only appear in one path index in the derivation path. This results in the parser returning two descriptors. The first descriptor uses the first `NUM` in all pairs present, and the second uses the second `NUM`. In our implementation, if a multipath descriptor is not provided, a pair is still returned, but the second element is just `nullptr`. The wallet will not output the multipath descriptors (yet). Furthermore, when a multipath descriptor is imported, it is expanded to the two descriptors and each imported on its own, with the second descriptor being implicitly for internal (change) addresses. There is no change to how the wallet stores or outputs descriptors (yet). Note that the path specifier is different from what was proposed. It uses angle brackets and the semicolon because these are unused characters available in the character set and I wanted to avoid conflicts with characters already in use in descriptors. Closes #17190 ACKs for top commit: darosior: re-ACKa0abcbd382mjdietzx: reACKa0abcbd382pythcoiner: reACKa0abcbdfurszy: Code review ACKa0abcbdglozow: light code review ACKa0abcbd382Tree-SHA512: 84ea40b3fd1b762194acd021cae018c2f09b98e595f5e87de5c832c265cfe8a6d0bc4dae25785392fa90db0f6301ddf9aea787980a29c74f81d04b711ac446c2
This directory contains the source code for the Bitcoin Core graphical user interface (GUI). It uses the Qt cross-platform framework.
The current precise version for Qt 5 is specified in qt.mk.
Compile and run
See build instructions: Unix, macOS, Windows, FreeBSD, NetBSD, OpenBSD
When following your systems build instructions, make sure to install the Qt dependencies.
To run:
./src/qt/bitcoin-qt
Files and Directories
forms/
- A directory that contains Designer UI files. These files specify the characteristics of form elements in XML. Qt UI files can be edited with Qt Creator or using any text editor.
locale/
- Contains translations. They are periodically updated and an effort is made to support as many languages as possible. The process of contributing translations is described in doc/translation_process.md.
res/
- Contains graphical resources used to enhance the UI experience.
test/
- Functional tests used to ensure proper functionality of the GUI. Significant changes to the GUI code normally require new or updated tests.
bitcoingui.(h/cpp)
- Represents the main window of the Bitcoin UI.
*model.(h/cpp)
- The model. When it has a corresponding controller, it generally inherits from QAbstractTableModel. Models that are used by controllers as helpers inherit from other Qt classes like QValidator.
- ClientModel is used by the main application
bitcoinguiand several models likepeertablemodel.
*page.(h/cpp)
- A controller.
:NAMEpage.cppgenerally includes:NAMEmodel.handforms/:NAME.page.uiwith a similar:NAME.
*dialog.(h/cpp)
- Various dialogs, e.g. to open a URL. Inherit from QDialog.
paymentserver.(h/cpp)
- (Deprecated) Used to process BIP21 payment URI requests. Also handles URI-based application switching (e.g. when following a bitcoin:... link from a browser).
walletview.(h/cpp)
- Represents the view to a single wallet.
Other .h/cpp files
- UI elements like BitcoinAmountField, which inherit from QWidget.
bitcoinstrings.cpp: automatically generatedbitcoinunits.(h/cpp): BTC / mBTC / etc. handlingcallback.hguiconstants.h: UI colors, app name, etc.guiutil.h: several helper functionsmacdockiconhandler.(h/mm): macOS dock icon handlermacnotificationhandler.(h/mm): display notifications in macOS
Contribute
See CONTRIBUTING.md for general guidelines.
Note: Do not change local/bitcoin_en.ts. It is updated automatically.
Using Qt Creator as an IDE
Qt Creator is a powerful tool which packages a UI designer tool (Qt Designer) and a C++ IDE into one application. This is especially useful if you want to change the UI layout.
Download Qt Creator
On Unix and macOS, Qt Creator can be installed through your package manager. Alternatively, you can download a binary from the Qt Website.
Note: If installing from a binary grabbed from the Qt Website: During the installation process, uncheck everything except for Qt Creator.
macOS
brew install qt-creator
Ubuntu & Debian
sudo apt-get install qtcreator
Setup Qt Creator
- Make sure you've installed all dependencies specified in your systems build instructions
- Follow the compile instructions for your system, run
./configurewith the--enable-debugflag - Start Qt Creator. At the start page, do:
New->Import Project->Import Existing Project - Enter
bitcoin-qtas the Project Name and enter the absolute path tosrc/qtas Location - Check over the file selection, you may need to select the
formsdirectory (necessary if you intend to edit *.ui files) - Confirm the
Summarypage - In the
Projectstab, selectManage Kits...
macOS
- Under
Kits: select the default "Desktop" kit - Under
Compilers: select"Clang (x86 64bit in /usr/bin)" - Under
Debuggers: select"LLDB"as debugger (you might need to set the path to your LLDB installation)
Ubuntu & Debian
Note: Some of these options may already be set
- Under
Kits: select the default "Desktop" kit - Under
Compilers: select"GCC (x86 64bit in /usr/bin)" - Under
Debuggers: select"GDB"as debugger
- While in the
Projectstab, ensure that you have thebitcoin-qtexecutable specified underRun
- If the executable is not specified: click
"Choose...", navigate tosrc/qt, and selectbitcoin-qt
- You're all set! Start developing, building, and debugging the Bitcoin Core GUI