From 1fd36345d937533f789b0498065e566ae5e37f62 Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Fri, 21 Nov 2025 13:46:13 +0100 Subject: [PATCH] Update WIF_SCRIPT_TYPES to make p2wpkh default The change swaps the values of p2wpkh and p2pkh in WIF_SCRIPT_TYPES to reflect that p2wpkh (bech32) is now the default script type for Palladium. This maintains backward compatibility while aligning with current protocol standards. --- electrum/bitcoin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/electrum/bitcoin.py b/electrum/bitcoin.py index 562b53ee4..81b640cd2 100644 --- a/electrum/bitcoin.py +++ b/electrum/bitcoin.py @@ -602,9 +602,10 @@ def DecodeBase58Check(psz: Union[bytes, str]) -> bytes: # backwards compat # extended WIF for segwit (used in 3.0.x; but still used internally) # the keys in this dict should be a superset of what Imported Wallets can import +# Note: p2wpkh (bech32) is default (0) for Palladium WIF_SCRIPT_TYPES = { - 'p2pkh': 0, - 'p2wpkh': 1, + 'p2wpkh': 0, + 'p2pkh': 1, 'p2wpkh-p2sh': 2, 'p2sh': 5, 'p2wsh': 6,