Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
832 commits
Select commit Hold shift + click to select a range
0735b09
tests: Make sure device is found when enumerating
achow101 Oct 24, 2021
8c6763b
Merge bitcoin-core/HWI#536: test: Fix label tests
achow101 Oct 25, 2021
3fde13e
deps: Allow older versions
achow101 Oct 24, 2021
8719bfe
deps: regenerate poetry.lock
achow101 Oct 24, 2021
8f6b7e9
deps: regenerate setup.py
achow101 Oct 24, 2021
a8f955a
tests: Remove extraneous debug line
achow101 Oct 25, 2021
8c1b50a
Merge bitcoin-core/HWI#538: Allow some older dependencies and regener…
achow101 Oct 26, 2021
2fa0c94
keepkey, trezor: Handle if ButtonRequest is sent during sendpin
achow101 Nov 9, 2021
6fbb2a2
tests: Test sendpin with passphrase
achow101 Nov 9, 2021
4edf4f6
Merge bitcoin-core/HWI#542: keepkey, trezor: Handle if ButtonRequest …
achow101 Nov 10, 2021
d1055df
Bump PyEnv version to 3.9.7
Sjors Apr 26, 2021
a109bcd
Merge bitcoin-core/HWI#494: Bump Pyenv's Python to 3.9
achow101 Nov 19, 2021
44d556e
Add support for the Blockstream Jade hww
Feb 17, 2021
db17fed
Add tests for Jade hww using qemu emulator
Apr 23, 2021
fa5986a
Merge bitcoin-core/HWI#475: Add support for the Blockstream Jade hww
achow101 Nov 24, 2021
76ad4dd
psbt: Check for duplicate keys by tracking set of read keys
achow101 Nov 16, 2021
92d64e7
psbt: Remove extra newlines
achow101 Nov 16, 2021
bc7efb9
psbt: Make sighash Optional
achow101 Nov 16, 2021
6b59c75
psbt: Use static members for field numbers
achow101 Dec 6, 2021
fe85a31
psbt: Use static member field numbers for serialization
achow101 Dec 6, 2021
19d2e0a
psbt: Implement Taproot fields
achow101 Nov 16, 2021
c5fba03
tests: Add Taproot field test vectors
achow101 Nov 16, 2021
7e283f6
ci: run install_script before installing sims
achow101 Dec 9, 2021
f8c79e6
Merge bitcoin-core/HWI#546: psbt: implement BIP 371 Taproot PSBT fields
achow101 Dec 10, 2021
7d811cb
ci: do git clean before setting up keepkey
achow101 Dec 10, 2021
63fa38a
Merge bitcoin-core/HWI#553: ci: run install_script before installing …
achow101 Dec 13, 2021
f1949af
Merge bitcoin-core/HWI#555: ci: do git clean before setting up keepkey
achow101 Dec 13, 2021
48618bd
descriptors: Explicitly list allowed contexts for functions
achow101 Aug 30, 2021
d131006
descriptor: Allow multiple subdescriptors
achow101 Aug 30, 2021
c464931
descriptors: Add TRDescriptor, parsing, and tests
achow101 Aug 30, 2021
d2d360c
descriptors: Add PKDescriptor and parsing
achow101 Aug 30, 2021
e0a6c5c
Merge bitcoin-core/HWI#545: Add tr() descriptors for Taproot output s…
achow101 Dec 15, 2021
15f691f
Implement bech32m
achow101 Jun 21, 2021
19aedce
Add AddressType.TAP
achow101 Jun 21, 2021
08ab51b
Add a derivation path for AddressType.TAP
achow101 Jun 21, 2021
4c438cc
Handle AddressType.TAP for getkeypool and getdescriptors
achow101 Jun 21, 2021
1312817
Handle tr() descriptors in displayaddress
achow101 Jun 21, 2021
8928c12
Cleanup Ledger displayaddress address type handling
achow101 Jun 21, 2021
a7528b8
Have getdescriptors fetch for all address types
achow101 Jun 21, 2021
b47b7c8
tests: check tr() descriptors from getkeypool
achow101 Nov 17, 2021
054ce4d
displayaddress: Check against xonly pubkey too
achow101 Nov 16, 2021
7950173
hwwclient: Add a function to check whether the device supports Taproot
achow101 Nov 22, 2021
3f74cc7
Do not show Taproot things for devices without Taproot support
achow101 Nov 22, 2021
84842b5
Merge bitcoin-core/HWI#547: Add AddressType.TAP and be able to fetch …
achow101 Dec 20, 2021
051b9c1
trezor: Update Trezorlib
achow101 Dec 10, 2021
292be0a
trezor: trezorlib modifications
achow101 Dec 10, 2021
aac439a
keepkey: Update messages to new message definition
achow101 Nov 16, 2021
fa97e3b
trezor, keepkey: Update to work with new trezorlib
achow101 Dec 10, 2021
b912fbe
trezorlib: Document modifications
achow101 Dec 10, 2021
25c36c9
trezorlib: add dataclasses as a dependency for python 3.6
achow101 Dec 14, 2021
8d2ae5e
trezor, keepkey: Passthrough model and _init_device in TrezorClientDe…
achow101 Dec 21, 2021
6871946
Merge bitcoin-core/HWI#554: trezor: Update trezorlib Dec 2021
achow101 Dec 22, 2021
b6fbc54
jade: Add device-ids for new Blockstream Jade serial chips
Nov 30, 2021
2fbe50b
jade: Log when Jade may not be able to identify multisig change output
Dec 1, 2021
d104efb
jade: Support 'sortedmulti' with Jade, and add a firmware version check
Nov 24, 2021
ce861ea
jade: have Jade skip automatic change validation when in 'expert' mode
Dec 1, 2021
230bdd8
tests: Update jade emulator build flags to reduce jade test times
Jan 5, 2022
f168058
trezor: Implement can_sign_taproot
achow101 Nov 22, 2021
9fe19f4
trezor: Allow taproot addresses for displayaddress
achow101 Nov 16, 2021
6ae50be
trezor: Sign Taproot inputs
achow101 Nov 17, 2021
ab189db
tests: Add Trezor to SUPPORTS_TAPROOT
achow101 Nov 24, 2021
c37acd4
tests: Taproot signing tests
achow101 Nov 25, 2021
b9093d1
trezor: Disallow external inputs when signing with tr
achow101 Jan 26, 2022
2669bce
tests: each device explicitly lists signtx cases
achow101 Jan 26, 2022
985ec97
Merge bitcoin-core/HWI#544: trezor: Implement Taproot support
achow101 Feb 1, 2022
3d9ebd3
Merge bitcoin-core/HWI#559: Jade support sorted multi
achow101 Feb 1, 2022
ed87c3a
psbt: Implement PSBTv2 fields
achow101 Nov 18, 2021
ec981a8
psbt: Use PSBTv2 fields with PSBTv0
achow101 Nov 18, 2021
39d8cff
psbt: Add get_txout function to PSBTOutput
achow101 Nov 18, 2021
5d8a5de
psbt: Add compute_lock_time() function
achow101 Nov 18, 2021
82923e3
bitbox02: Use PSBTv2 fields
achow101 Nov 18, 2021
4817d83
psbt: add get_unsigned_tx
achow101 Nov 18, 2021
47c8180
bitbox01: avoid using psbt.tx directly
achow101 Nov 18, 2021
5dbcb3e
ledger: avoid using psbt.tx
achow101 Nov 18, 2021
f38bd7f
trezor: do not use psbt.tx
achow101 Nov 18, 2021
e03d309
tx: Change CTransaction.hash to be non-reversed bytes
achow101 Nov 22, 2021
b47bee0
psbt: Add version conversion function
achow101 Nov 23, 2021
521b30d
psbt: key type is a compact sized uint
achow101 Nov 23, 2021
e24c963
ci: Include psbt2 in bitcoind patch
achow101 Feb 2, 2022
0c4052b
coldcard: Convert PSBT to v0 before sending to Coldcard
achow101 Feb 2, 2022
b11d0c3
jade: Do not use psbt.tx
achow101 Feb 3, 2022
0d846a6
Merge bitcoin-core/HWI#549: psbt: Implement BIP 370 PSBTv2
achow101 Feb 3, 2022
d2214ab
Update release-process for macos
gruve-p Feb 4, 2022
b24d18b
Add details for building Blockstream Jade emulator to test/README.md
Feb 9, 2022
7ff8596
Fix typos
rex4539 Feb 3, 2022
4572620
Merge bitcoin-core/HWI#563: Fix typos
achow101 Feb 9, 2022
a2d1245
Merge bitcoin-core/HWI#564: Update release-process for macos
achow101 Feb 9, 2022
7284664
Merge bitcoin-core/HWI#573: Add details for building Blockstream Jade…
achow101 Feb 10, 2022
019efbb
tests: Use per-test ColdcardSimulator
achow101 Feb 4, 2022
c6b767a
tests: Use per-test BitBox01Emulator
achow101 Feb 4, 2022
f719fd0
tests: Move device specific tests out of jade_test_suite
achow101 Feb 4, 2022
649bd9a
test, jade: Use emulator per-test
achow101 Feb 4, 2022
5c2e843
tests: Move device specific tests out of ledger_test_suite
achow101 Feb 4, 2022
530ed9f
tests, ledger: use emulator per-test
achow101 Feb 4, 2022
c86222f
tests: Always run superclass start and stop functions
achow101 Feb 4, 2022
ed16b8e
tests: Allow DeviceTestcase.parameterize to take arbitrary parameters
achow101 Feb 4, 2022
9926382
tests: Pass in detection type explicitly to TestDeviceConnect
achow101 Feb 4, 2022
12d7b59
tests: Make signtx_cases a required argument for TestSignTx only
achow101 Feb 4, 2022
0ec28f4
tests: Move device params into emulator object
achow101 Feb 4, 2022
9e1ee3f
test: remove full_type
achow101 Feb 4, 2022
63a9334
tests: Reduce Jade simulator output
achow101 Feb 5, 2022
57c2c20
tests: Add -Wno-array-parameter to BitBox01 build
achow101 Feb 7, 2022
1226752
tests: use Bitcoind class to manage bitcoind
achow101 Feb 8, 2022
2166793
tests: Use random port for bitcoind
achow101 Feb 8, 2022
8299b08
test: Refactor _make_multisigs to make just one multisig
achow101 Feb 10, 2022
44314c2
tests: Add strict_bip48
achow101 Feb 10, 2022
2c59ad3
tests: Explicitly specify multisig types
achow101 Feb 10, 2022
51bf12a
Merge bitcoin-core/HWI#565: tests: Put device specific parameters in …
achow101 Feb 19, 2022
e34f6fd
Add ledger_bitcoin library
achow101 Dec 6, 2021
b709028
ledger_bitcoin: Fix sign_psbt for our implementation of PSBTv2
achow101 Dec 13, 2021
88235d6
Include ledgercomm library
achow101 Dec 6, 2021
15e5427
ledgercomm: Use relative imports of itself
achow101 Dec 6, 2021
57d5c2f
ledgercomm: Add the option to pass in HID path
achow101 Dec 6, 2021
26a1ccc
ledger_bitcoin: Optionally allow HID path in TransportClient
achow101 Dec 6, 2021
5aad268
key: Add helpers for determing addrtype and standard paths
achow101 Nov 22, 2021
50e2d01
hwwclient: Add Chain as a parameter to constructor
achow101 Dec 13, 2021
23baff5
ledger_bitcoin: Modifications to get_wallet_address for our legacy usage
achow101 Dec 13, 2021
b645164
ledger_bitcoin: Change LegacyClient.sign_psbt to return pubkeys too
achow101 Feb 10, 2022
c154cf7
ledger: Use ledger_bitcoin rather than btchip
achow101 Dec 6, 2021
8536786
ledger: Remove btchip
achow101 Dec 13, 2021
3b0680d
tests: Test Taproot on Ledger
achow101 Nov 24, 2021
30b42e4
ci: Test ledger legacy api
achow101 Feb 7, 2022
cb6b352
tests: Use --chain test more consistently
achow101 Feb 7, 2022
3953000
tests: Don't rely on coin selection for signtx tests
achow101 Feb 8, 2022
ef1cf9d
docs: Document Taproot signing
achow101 Feb 10, 2022
ae2adb5
key: Add from_bytes to ExtendedKey
achow101 Feb 10, 2022
dffd014
ledger: Support multisigs
achow101 Feb 10, 2022
ac66cbc
tests: additional speculos automation things
achow101 Feb 10, 2022
f3f20e0
tests, ledger: Test multisigs
achow101 Feb 10, 2022
4f223a5
test: Include xpubs in psbt
achow101 Feb 11, 2022
6b8381e
tests: Use external keys for some multisigs
achow101 Feb 11, 2022
edbb7c0
ledger: document multisig limitation
achow101 Feb 12, 2022
6df9c1b
ledger: Detect when a ledger is not in a Bitcoin app
achow101 Feb 19, 2022
711e6ba
ledger: P2WSH display is also not supported
achow101 Feb 19, 2022
daeec1d
ledger: Try legacy protocol when unable to sign multisigs
achow101 Feb 21, 2022
3fe369d
Merge bitcoin-core/HWI#550: ledger: Support Bitcoin App 2.0
achow101 Feb 28, 2022
a51ba9d
bitbox01: Limit each signing attempt to 15 sigs
achow101 Feb 24, 2022
1f3f188
tests: Change test_big_tx to use our inputs
achow101 Feb 23, 2022
7b0eced
trezor: Disallow external inputs for future firmware versions
achow101 Feb 23, 2022
f519d9f
bitbox02: update to v6.0.0, enable sending to Taproot addresses
benma Mar 2, 2022
63a4afd
Merge bitcoin-core/HWI#581: trezor: Remove support for external inputs
achow101 Mar 15, 2022
aa0288c
Merge bitcoin-core/HWI#584: bitbox02: update to v6.0.0, enable sendin…
achow101 Mar 15, 2022
f002150
Bump to 2.1.0-rc.1 and regenerate setup.py
achow101 Mar 15, 2022
a7e8ea7
Fix support matrix table
achow101 Apr 11, 2022
db5a0bb
Fix docs warning about end strings
achow101 Apr 11, 2022
5af70ba
Merge bitcoin-core/HWI#594: Fix support matrix table
achow101 Apr 12, 2022
2c757c8
Bump to 2.1.0 and regenerate setup.py
achow101 Apr 15, 2022
9573008
tests: Update bitcoind patches
achow101 May 3, 2022
a922b2a
tests: Remove libngu patch
achow101 May 3, 2022
36d356b
ci: Install swig in docker container
achow101 May 3, 2022
7a5156b
tests: Patch coldcard ffilib
achow101 May 3, 2022
72f108d
Merge bitcoin-core/HWI#603: tests: Update bitcoind and coldcard patches
achow101 May 5, 2022
1db8d0c
trezor: Search for Taproot change specifically
achow101 May 3, 2022
ed62dda
Merge bitcoin-core/HWI#602: trezor: Look for change keys based on out…
achow101 May 5, 2022
0bc75a4
jade: pass -Wno-array-parameter to simulator build
Apr 4, 2022
90a12a4
jade: Pass utxo satoshi value to Jade on signing
Apr 4, 2022
8ab80eb
Merge bitcoin-core/HWI#592: jade: pass -Wno-array-parameter to simula…
achow101 May 6, 2022
01c1f55
Merge bitcoin-core/HWI#593: jade: Pass utxo satoshi value to Jade on …
achow101 May 6, 2022
8c91d84
add model id for ledger nano s plus
Leibniz137 May 14, 2022
8874f3a
update udev rules to include ledger nano s+
Leibniz137 May 18, 2022
b2e6e11
Merge bitcoin-core/HWI#604: add support for ledger nano s plus
achow101 May 18, 2022
680a9ea
descriptor: allow setting custom hardened char
achow101 May 21, 2022
b947b7e
ledger: Use ' as hardened char
achow101 May 21, 2022
a633731
tests: Update bitcoind patches
achow101 May 21, 2022
50d3b85
Merge bitcoin-core/HWI#606: Ledger: Use ' instead of h for hardened c…
achow101 May 23, 2022
a025af3
Bump to 2.1.1 and regenerate setup.py
achow101 May 24, 2022
5c58fe9
ci: Build ledger app
achow101 May 26, 2022
90a1c23
bitbox02: add taproot support to display_singlesig_address
Beerosagos Jun 8, 2022
5eb4477
Merge bitcoin-core/HWI#611: bitbox02: add taproot support to display_…
achow101 Jun 14, 2022
2e887cf
Merge bitcoin-core/HWI#610: ci: Use Ledger app build rather than spec…
achow101 Jun 14, 2022
8d43c79
Fix output of CTxOut.__repl__
bigspider Jun 15, 2022
0e6934e
Merge bitcoin-core/HWI#614: Fix output of CTxOut.__repl__
achow101 Jun 15, 2022
e769e49
ci: Remove coldcard ffilib patch
achow101 Jun 29, 2022
2720633
ci: Remove bitcoind patches
achow101 Jun 29, 2022
d6bebd2
Merge bitcoin-core/HWI#617: ci: Remove unnecesary patches
achow101 Jul 18, 2022
36aca3b
trezor: Set p2sh multisig output script type correctly
achow101 Jul 29, 2022
59379b3
devices/bitbox02: add taproot keypath spending support for bitbox02
Beerosagos Jun 14, 2022
2b8d341
Merge bitcoin-core/HWI#627: devices/bitbox02: add taproot keypath spe…
achow101 Aug 23, 2022
e731395
Merge bitcoin-core/HWI#625: trezor: Set p2sh multisig output script t…
achow101 Aug 23, 2022
023092c
tests: correct git fetch of jade qemu and esp-idf branches
Sep 15, 2022
b9a3285
jade: update Jade api to 0.1.38
Sep 15, 2022
9a0f0ee
ci: Remove python 3.6
achow101 Oct 18, 2022
2e06d7e
Bump minimum Python to 3.7
achow101 Oct 18, 2022
6aabe84
bitbox: Update minimum to 6.1.0
achow101 Oct 18, 2022
edc4ee9
build: Bump pyinstaller minimum to 5.3
achow101 Oct 18, 2022
56aa6b1
deps: Automatic update
achow101 Oct 18, 2022
8d134df
Merge bitcoin-core/HWI#638: Oct 2022 Dependency Update
achow101 Oct 28, 2022
eacce27
Merge bitcoin-core/HWI#629: Update Jade api to 0.1.38, fix CI, fix #630
achow101 Oct 28, 2022
b498a34
Remove unnecessary "type: ignore"
achow101 Oct 29, 2022
c4ae425
ci, trezor: Use nightly rust
achow101 Nov 2, 2022
bfb4af5
ci, coldcard: Update patches
achow101 Nov 2, 2022
90b7f2e
ci, keepkey: Use updated protoc
achow101 Nov 2, 2022
566914f
ci, trezor: Make sure protobuf is upgraded for Trezor 1
achow101 Nov 2, 2022
89cdd22
tests, ledger: Include wallet policy things in automation
achow101 Nov 3, 2022
021c7de
trezor: optimize signing speed by not serializing transaction in trezor
prusnak Nov 7, 2022
b6fda26
jade: fix CI cached python env issue
Nov 10, 2022
f767987
Merge bitcoin-core/HWI#643: jade: fix CI cached python env issue
achow101 Nov 10, 2022
44f26a8
Merge bitcoin-core/HWI#642: ci: Various Fixes Nov 2022
achow101 Nov 10, 2022
099252e
Add "Bitcoin Legacy" and "Bitcoin Test Legacy" to recognized app name…
bigspider Oct 3, 2022
fc817d9
Switch to new protocol from version 2.1.*
bigspider Oct 4, 2022
276183a
Remove mentions of limitations that were addressed before version 2.1…
bigspider Oct 4, 2022
0cf2df1
Clarify comment about derivation path limitation
bigspider Oct 4, 2022
486cef5
Never retry legacy protocol for versions >= 2.1.*
bigspider Oct 4, 2022
8627ca7
Add support for message signing with the new protocol; kept old code …
bigspider Oct 4, 2022
961f9b5
Cold-who?
bigspider Oct 4, 2022
7e3e2e6
Merge bitcoin-core/HWI#640: trezor: optimize signing speed by not ser…
achow101 Nov 10, 2022
1a0c8fa
Add implementation of display_multisig_address to ledger.py
bigspider Oct 5, 2022
6f148a0
Make sure to run speculos with the correct app version number to use …
bigspider Oct 5, 2022
fb6fb63
Remove unused imports
bigspider Oct 5, 2022
0030b63
Update docs in can_sign_taproot
bigspider Oct 6, 2022
4c293a4
Removed redundant check:
bigspider Oct 6, 2022
fbcbaee
Convert hardened character "h" with "'" in signmessage
bigspider Oct 14, 2022
fa3c059
Add comment on disabled multisig tests; multiple keys in multisig are…
bigspider Oct 14, 2022
de6c9db
Merge bitcoin-core/HWI#637: Improve support for the coming Ledger app…
achow101 Nov 15, 2022
10f81db
jade: update jade simulator port in line with current jade master branch
Nov 11, 2022
e94864b
Merge bitcoin-core/HWI#645: jade: update jade simulator port in line …
achow101 Nov 16, 2022
fbb34a3
Improve gui
giacomocaironi Nov 16, 2022
d4cf550
Change passphrase (password) to Optional
achow101 Nov 14, 2022
d74fcbc
test: Handle Optional emulator password
achow101 Nov 14, 2022
0c4df0c
trezor, test: Test enumerate with empty passphrase
achow101 Nov 14, 2022
857e935
Merge bitcoin-core/HWI#634: Improve gui
achow101 Nov 17, 2022
9ed9dbe
trezor: Default to empty string passphrase
achow101 Nov 18, 2022
5191d21
jade: clean all jade build artifacts when building jade simulator
Nov 22, 2022
e7af45d
Merge bitcoin-core/HWI#644: Use Optional for passphrase
achow101 Dec 8, 2022
36ccaf7
Merge bitcoin-core/HWI#649: Fix Jade CI build pollution
achow101 Dec 8, 2022
f7e6126
Pass '--expert' and '--chain' cmd-line arguments to enumerate() funct…
Dec 1, 2022
56e541f
`contrib/build_bin.sh` and `contrib/build_bin.sh` now accepts `--with…
kiminuo Dec 9, 2022
f6d246a
Typo
kiminuo Dec 9, 2022
b194a27
Merge bitcoin-core/HWI#651: Pass '--expert' and '--chain' cmd-line ar…
achow101 Jan 3, 2023
4f3ca2f
Merge bitcoin-core/HWI#655: `--without-gui` for building without GUI …
achow101 Jan 3, 2023
14f5134
Bump to 2.2.0-rc.1 and regenerate setup.py
achow101 Jan 3, 2023
203c844
trezor: Add missing NoPasswordError import
achow101 Jan 11, 2023
c3f490f
test, trezor: Check for warnings rather than needs_passphrase_sent
achow101 Jan 11, 2023
b8a379c
test, trezor: Properly pass empty string passphrase
achow101 Jan 11, 2023
60226d0
Merge bitcoin-core/HWI#658: trezor: Add missing import and minor test…
achow101 Jan 12, 2023
5f300d3
Bump to 2.2.0 final and regenerate setup.py
achow101 Jan 12, 2023
a1045bc
descriptor.py: fix PubkeyProvider.get_pubkey_bytes for ranged desc
SomberNight Feb 13, 2023
092cc1c
Merge bitcoin-core/HWI#664: descriptor.py: fix PubkeyProvider.get_pub…
achow101 Feb 13, 2023
7a6fd0e
trezor: Set multisig change as PAYTOMULTISIG for non-segwit only
achow101 Feb 13, 2023
ea7fe48
Merge bitcoin-core/HWI#665: trezor: Set multisig change as PAYTOMULTI…
achow101 Feb 14, 2023
bda4e57
bump typing-extensions dependency
Feb 15, 2023
d3cee84
poetry lock
Feb 15, 2023
08b5d93
trezor: Fix is_p2sh call
achow101 Feb 21, 2023
ad29646
ci: Bump protoc version
achow101 Feb 21, 2023
f5a9b29
Merge bitcoin-core/HWI#666: bump typing-extensions dependency
achow101 Feb 21, 2023
43cc81d
Bump version to 2.2.1 and regenerate setup.py
achow101 Feb 24, 2023
87b1cc8
ledger-syscoin
osiastedian Jun 1, 2023
87a4183
update docs
osiastedian Jun 1, 2023
ac1ce4c
update Derivation Path BIP Compliance
osiastedian Jun 1, 2023
8bc04aa
update with mainnet example
osiastedian Jun 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
327 changes: 327 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,327 @@
container:
dockerfile: ci/cirrus.Dockerfile

env:
EMAIL: cirrus@cirrus-ci.org

device_matrix_template: &DEVICE_MATRIX_TEMPLATE
- env:
DEVICE: --trezor-1
depends_on:
- Trezor 1 Sim Builder
- dist_builder
- bitcoind_builder
fetch_sim_script:
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Trezor 1 Sim Builder/sim/trezor-firmware.tar.gz"
- tar -xvf "trezor-firmware.tar.gz"
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
- tar -xvf "bitcoin.tar.gz"
- env:
DEVICE: --trezor-t
depends_on:
- Trezor T Sim Builder
- dist_builder
- bitcoind_builder
fetch_sim_script:
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Trezor T Sim Builder/sim/trezor-firmware.tar.gz"
- tar -xvf "trezor-firmware.tar.gz"
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
- tar -xvf "bitcoin.tar.gz"
- env:
DEVICE: --coldcard
depends_on:
- Coldcard Sim Builder
- dist_builder
- bitcoind_builder
fetch_sim_script:
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Coldcard Sim Builder/sim/coldcard-mpy.tar.gz"
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
- tar -xvf "bitcoin.tar.gz"
sim_install_script:
- pushd test/work; git clone --recursive https://github.com/Coldcard/firmware.git; popd
- tar -xvf "coldcard-mpy.tar.gz"
- pushd test/work/firmware; git am ../../data/coldcard-multisig.patch; popd
- poetry run pip install -r test/work/firmware/requirements.txt
- pip install -r test/work/firmware/requirements.txt
- env:
DEVICE: --bitbox01
depends_on:
- Bitbox01 Sim Builder
- dist_builder
- bitcoind_builder
fetch_sim_script:
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Bitbox01 Sim Builder/sim/mcu.tar.gz"
- tar -xvf "mcu.tar.gz"
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
- tar -xvf "bitcoin.tar.gz"
- env:
DEVICE: --jade
depends_on:
- Jade Sim Builder
- dist_builder
- bitcoind_builder
fetch_sim_script:
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Jade Sim Builder/sim/jade.tar.gz"
- tar -xvf "jade.tar.gz"
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
- tar -xvf "bitcoin.tar.gz"
- env:
DEVICE: --ledger
depends_on:
- Ledger Sim Builder
- Ledger App Builder
- dist_builder
- bitcoind_builder
fetch_sim_script:
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Ledger Sim Builder/sim/speculos.tar.gz"
- tar -xvf "speculos.tar.gz"
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
- tar -xvf "bitcoin.tar.gz"
fetch_ledger_app_script:
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Ledger App Builder/built_ledger_app/app-bitcoin-new/bin/app.elf"
- mv app.elf test/work/speculos/apps/btc-test.elf
sim_install_script:
- poetry run pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests
- pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests
- env:
DEVICE: --ledger-legacy
depends_on:
- Ledger Sim Builder
- dist_builder
- bitcoind_builder
fetch_sim_script:
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Ledger Sim Builder/sim/speculos.tar.gz"
- tar -xvf "speculos.tar.gz"
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
- tar -xvf "bitcoin.tar.gz"
sim_install_script:
- poetry run pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests
- pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests
- env:
DEVICE: --keepkey
depends_on:
- Keepkey Sim Builder
- dist_builder
- bitcoind_builder
fetch_sim_script:
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Keepkey Sim Builder/sim/keepkey-firmware.tar.gz"
- tar -xvf "keepkey-firmware.tar.gz"
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
- tar -xvf "bitcoin.tar.gz"

lint_task:
test_script:
- flake8

task:
install_script:
- poetry install
matrix:
- name: Type Check
type_check_script: >
poetry run
mypy
hwi.py
hwilib/_base58.py
hwilib/_bech32.py
hwilib/_cli.py
hwilib/commands.py
hwilib/common.py
hwilib/descriptor.py
hwilib/devices/bitbox02.py
hwilib/devices/coldcard.py
hwilib/devices/digitalbitbox.py
hwilib/devices/jade.py
hwilib/devices/__init__.py
hwilib/devices/keepkey.py
hwilib/devices/ledger.py
hwilib/devices/trezor.py
hwilib/errors.py
hwilib/_script.py
hwilib/_serialize.py
hwilib/tx.py
hwilib/hwwclient.py
hwilib/__init__.py
hwilib/key.py
hwilib/udevinstaller.py
- name: Non-Device Tests
test_script: cd test; poetry run ./run_tests.py; cd ..

wine_builder_task:
container:
dockerfile: contrib/build.Dockerfile
build_script:
- contrib/build_wine.sh
- find dist -type f -exec sha256sum {} \;

bitcoind_builder_task:
bitcoind_cache:
folder: test/work/bitcoin
ccache_cache:
folder: /root/.ccache
env:
BUILD_BITCOIND: 1
build_script:
- cd test; ./setup_environment.sh --bitcoind; cd ..
- tar -czf bitcoin.tar.gz test/work/bitcoin
bitcoin_artifacts:
path: "bitcoin.tar.gz"

task:
env:
DEVICE: --trezor-1
name: Trezor 1 Sim Builder
sim_work_cache:
folder: test/work/trezor-firmware
build_script:
- cd test; ./setup_environment.sh $DEVICE; cd ..
- tar -czf trezor-firmware.tar.gz test/work/trezor-firmware
sim_artifacts:
path: "trezor-firmware.tar.gz"

task:
env:
DEVICE: --trezor-t
name: Trezor T Sim Builder
sim_work_cache:
folder: test/work/trezor-firmware
build_script:
- cd test; ./setup_environment.sh $DEVICE; cd ..
- tar -czf trezor-firmware.tar.gz test/work/trezor-firmware
sim_artifacts:
path: "trezor-firmware.tar.gz"

task:
env:
DEVICE: --coldcard
name: Coldcard Sim Builder
sim_work_cache:
folder: test/work/firmware
build_script:
- cd test; ./setup_environment.sh $DEVICE; cd ..
- tar -czf coldcard-mpy.tar.gz test/work/firmware/external/micropython/ports/unix/coldcard-mpy test/work/firmware/unix/coldcard-mpy test/work/firmware/unix/l-mpy test/work/firmware/unix/l-port
sim_artifacts:
path: "coldcard-mpy.tar.gz"

task:
env:
DEVICE: --bitbox01
name: Bitbox01 Sim Builder
sim_work_cache:
folder: test/work/mcu
build_script:
- cd test; ./setup_environment.sh $DEVICE; cd ..
- tar -czf mcu.tar.gz test/work/mcu
sim_artifacts:
path: "mcu.tar.gz"

task:
env:
DEVICE: --jade
name: Jade Sim Builder
sim_work_cache:
folder: test/work/jade
build_script:
- cd test; ./setup_environment.sh $DEVICE; cd ..
- tar -czf jade.tar.gz test/work/jade/simulator
sim_artifacts:
path: "jade.tar.gz"

task:
env:
DEVICE: --ledger
name: Ledger Sim Builder
sim_work_cache:
folder: test/work/speculos
build_script:
- cd test; ./setup_environment.sh $DEVICE; cd ..
- tar -czf speculos.tar.gz test/work/speculos
sim_artifacts:
path: "speculos.tar.gz"

task:
env:
DEVICE: --keepkey
name: Keepkey Sim Builder
sim_work_cache:
folder: test/work/keepkey-firmware
build_script:
- cd test; ./setup_environment.sh $DEVICE; cd ..
- tar -czf keepkey-firmware.tar.gz test/work/keepkey-firmware/bin
sim_artifacts:
path: "keepkey-firmware.tar.gz"


dist_builder_task:
container:
dockerfile: contrib/build.Dockerfile
build_script:
- contrib/build_bin.sh
- contrib/build_dist.sh
- find dist -type f -exec sha256sum {} \;
built_dist_artifacts:
path: "dist/*"

ledger_app_builder_task:
name: Ledger App Builder
container:
dockerfile: ci/ledger-app-builder.Dockerfile
build_script:
- git clone https://github.com/LedgerHQ/app-bitcoin-new.git
- cd app-bitcoin-new
- make DEBUG=1
built_ledger_app_artifacts:
path: app-bitcoin-new/bin/app.elf

task:
matrix:
<< : *DEVICE_MATRIX_TEMPLATE
fetch_dist_script:
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/dist_builder/built_dist.zip"
- unzip built_dist.zip
matrix:
- name: $DEVICE Wheel
install_script: pip install dist/*.whl
test_script: cd test; ./run_tests.py $DEVICE --interface=cli --device-only; cd ..
- name: $DEVICE Sdist
install_script: pip install $(find dist -name "*.tar.gz" -a -not -name "*amd64*")
test_script: cd test; ./run_tests.py $DEVICE --interface=cli --device-only; cd ..
- name: $DEVICE Bindist
install_script: poetry install
untar_bindist_script: cd dist; tar -xvf hwi*linux*.tar.gz; cd ..
test_script: cd test; poetry run ./run_tests.py $DEVICE --interface=bindist --device-only; cd ..
on_failure:
failed_script: tail -v -n +1 test/*.std*

task:
matrix:
- container:
dockerfile: ci/cirrus.Dockerfile
env:
PYTHON: 3.7
- container:
dockerfile: ci/py38.Dockerfile
env:
PYTHON: 3.8
- container:
dockerfile: ci/py39.Dockerfile
env:
PYTHON: 3.9
- container:
dockerfile: ci/py310.Dockerfile
env:
PYTHON: 3.10
install_script: poetry install
matrix:
<< : *DEVICE_MATRIX_TEMPLATE
matrix:
- env:
INTERFACE: library
- env:
INTERFACE: cli
- env:
INTERFACE: stdin
name: Python $PYTHON $DEVICE $INTERFACE
test_script: cd test; poetry run ./run_tests.py $DEVICE --interface=$INTERFACE --device-only; cd ..
on_failure:
failed_script: tail -v -n +1 test/*.std*
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
exclude = *.pyc,__pycache__,hwilib/devices/btchip/,hwilib/devices/ckcc/,hwilib/devices/trezorlib/,test/work/
exclude = *.pyc,__pycache__,hwilib/devices/ledger_bitcoin/,hwilib/devices/btchip,hwilib/devices/ckcc/,hwilib/devices/jadepy/,hwilib/devices/trezorlib/,test/work/,hwilib/ui
ignore = E261,E302,E305,E501,E722,W5
per-file-ignores = setup.py:E122
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,21 @@ test/emulator.img
test/work
pip-wheel-metadata
.mypy_cache/

# Qt stuff
hwiqt.pyproject.user
hwilib/ui/ui_*.py

*.stderr
*.stdout

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

.vscode
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.6.8
3.9.7
5 changes: 5 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 2

python:
install:
- requirements: docs/requirements.txt
Loading