What changed, and why it matters
This commit is a simple cleanup rename from 'SLIP-32' to 'SLIP-132' plus a typo fix. SLIP-32 was a mistaken label; the actual Bitcoin standard for versioned extended keys is SLIP-132. No behavior changed, and no security issue is present.
No action needed; the change is cosmetic/corrective documentation and naming only.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch renames the function slip32_deserialize to slip132_deserialize in shared/chains.py and updates all call sites in shared/export.py, shared/teleport.py, and shared/utils.py. It also removes a stale comment link to the non-existent slip-0032.md and fixes two unrelated typos (‘is is’ and ‘reverse enginerring’). The function body and its callers are otherwise unchanged, so this is a non-functional refactor.
Changed components
shared/chains.pyshared/export.pyshared/teleport.pyshared/utils.pydocs/generic-wallet-export.mdInspect captured patch +6 / −8
diff --git a/docs/generic-wallet-export.md b/docs/generic-wallet-export.md
index f982311..0a50320 100644
--- a/docs/generic-wallet-export.md
+++ b/docs/generic-wallet-export.md
@@ -57,7 +57,7 @@ to be the first (non-change) receive address for the wallet.
segregate funds into sub-wallets. Don't assume it's zero.
3. When making your PSBT files to spend these amounts, remember that the XFP of the master
-(`0F056943` in this example) is is the root of the subkey paths found in the file, and
+(`0F056943` in this example) is the root of the subkey paths found in the file, and
you must include the full derivation path from master. So based on this example,
to spend a UTXO on `tb1qc58ys2dphtphg6yuugdf3d0kufmk0tye044g3l`, the input section
of your PSBT would need to specify `(m=0F056943)/84'/1'/123'/0/0`.
diff --git a/shared/chains.py b/shared/chains.py
index c1b921a..ef8c134 100644
--- a/shared/chains.py
+++ b/shared/chains.py
@@ -22,8 +22,6 @@ Slip132Version = namedtuple('Slip132Version', ('pub', 'priv', 'hint'))
# See also:
# - <https://github.com/satoshilabs/slips/blob/master/slip-0132.md>
# - defines ypub/zpub/Xprc variants
-# - <https://github.com/satoshilabs/slips/blob/master/slip-0032.md>
-# - nice bech32 encoded scheme for going forward
# - <https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-September/014907.html>
# - mailing list post proposed ypub, etc.
# - from <https://github.com/Bit-Wasp/bitcoin-php/issues/576>
@@ -386,7 +384,7 @@ def current_chain():
# Overbuilt: will only be testnet and mainchain.
AllChains = [BitcoinMain, BitcoinTestnet, BitcoinRegtest]
-def slip32_deserialize(xp):
+def slip132_deserialize(xp):
# .. and classify chain and addr-type, as implied by prefix
node = ngu.hdnode.HDNode()
version = node.deserialize(xp)
diff --git a/shared/export.py b/shared/export.py
index 518a439..1957905 100644
--- a/shared/export.py
+++ b/shared/export.py
@@ -423,14 +423,14 @@ def generate_generic_export(account_num=0):
def generate_electrum_wallet(addr_type, account_num):
# Generate line-by-line JSON details about wallet.
#
- # Much reverse enginerring of Electrum here. It's a complex
+ # Much reverse engineering of Electrum here. It's a complex
# legacy file format.
chain = chains.current_chain()
xfp = settings.get('xfp')
- # Must get the derivation path, and the SLIP32 version bytes right!
+ # Must get the derivation path, and the SLIP132 version bytes right!
mode = chains.af_to_bip44_purpose(addr_type)
OWNERSHIP.note_wallet_used(addr_type, account_num)
diff --git a/shared/teleport.py b/shared/teleport.py
index cb51b6b..b470e55 100644
--- a/shared/teleport.py
+++ b/shared/teleport.py
@@ -321,7 +321,7 @@ async def kt_accept_values(dtype, raw):
# it's an XPRV, but in binary.. some extra data we throw away here; sigh
# XXX no way to send this .. but was thinking of address explorer
txt = ngu.codecs.b58_encode(raw)
- node, ch, _, _ = chains.slip32_deserialize(txt)
+ node, ch, _, _ = chains.slip132_deserialize(txt)
assert ch.name == chains.current_chain().name, 'wrong chain'
enc = SecretStash.encode(xprv=node)
diff --git a/shared/utils.py b/shared/utils.py
index 7a24632..487aa49 100644
--- a/shared/utils.py
+++ b/shared/utils.py
@@ -544,7 +544,7 @@ def parse_extended_key(ln, private=False):
found = pat.search(ln)
# serialize, and note version code
try:
- node, chain, addr_fmt, is_private = chains.slip32_deserialize(found.group(0))
+ node, chain, addr_fmt, is_private = chains.slip132_deserialize(found.group(0))
except:
pass
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.