Skip to content

Test walletdisplayaddress#539

Open
Abeeujah wants to merge 1 commit intorust-bitcoin:masterfrom
Abeeujah:test-walletdisplayaddress
Open

Test walletdisplayaddress#539
Abeeujah wants to merge 1 commit intorust-bitcoin:masterfrom
Abeeujah:test-walletdisplayaddress

Conversation

@Abeeujah
Copy link
Copy Markdown
Contributor

@Abeeujah Abeeujah commented Apr 2, 2026

signer__wallet_display_address tests walletdisplayaddress RPC call mocking an external signer.

The test mocks a Hardware Wallet (HWW) interaction by:

  1. Creating a temporary shell script that acts as an external signer.
  2. Handling the 'enumerate', 'getdescriptors', and 'displayaddress' commands expected by Bitcoin Core.
  3. Spawning a node with the -signer argument pointing to this mock.
  4. Creating a descriptor-based wallet with external_signer enabled.
  5. Asserting that calling wallet_display_address returns the expected address from the mock signer.

Heavily Inspired by wallet_signer.py

Add an integration test `signer__wallet_display_address` to verify
the functionality of the `walletdisplayaddress` RPC call when using an
external signer.

The test mocks a Hardware Wallet (HWW) interaction by:
1. Creating a temporary shell script that acts as an external signer.
2. Handling the 'enumerate', 'getdescriptors', and 'displayaddress'
   commands expected by Bitcoin Core.
3. Spawning a node with the `-signer` argument pointing to this mock.
4. Creating a descriptor-based wallet with `external_signer` enabled.
5. Asserting that calling `wallet_display_address` returns the expected
   address from the mock signer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant