Verify a Bitcoin receive address on an external signer
A receive address copied through a host clipboard can be altered before it reaches an invoice. A compatible external signer provides a second display for comparison.
Display the generated address
Use an external-signer wallet named device with its supported signer connected. Generate a fresh address from that wallet and pass the same string back to its wallet-specific display RPC.
addr=$(bitcoin-cli -rpcwallet=device getnewaddress invoice)
bitcoin-cli -rpcwallet=device walletdisplayaddress "$addr"
Compare the complete strings
Compare the address on the device with the complete destination in the invoice that will be delivered. Checking only the prefix confirms little, since many addresses on the same network share it. If the device cannot display this address, inspect wallet selection, derivation support and signer connectivity before using the invoice.
bitcoincore.org walletdisplayaddress · bitcoincore.org getnewaddress