30 / 691BIP32

HD Wallet

محفظة HD

محفظة HD تعيد إنشاء شجرة مفاتيح من master extended key واحد. يقلل BIP32 تحديثات النسخ الاحتياطي ويتيح فروع watch-only، لكنه لا يحدد mnemonic أو scripts أو accounts أو سياسة recovery كاملة.

يربط BIP32 كل key بـ chain code من 256 bit، ويشتق children عبر HMAC-SHA512 وpath مرقم. يستطيع xpub اشتقاق normal public descendants، أما hardened فيحتاج private material؛ وهذه الحدود تحدد التفويض وأثر التسرب.

كتب Pieter Wuille معيار BIP32 وأُسند في 11-02-2012. تسمح الشجرة بتفويض account أو receive branch دون غيره. ليس consensus ولا يحدد mnemonic أو passphrase أو script أو discovery؛ هذه طبقات BIP39 وpaths وdescriptors. [BIP 32 — Hierarchical deterministic wallets] [BIP 39 — Mnemonic code for deterministic keys] [Bitcoin Developer Guide — Wallets]

Extended private key هو scalar secp256k1 k مع chain code c من 32 byte، والعام K=point(k). ينتج HMAC-SHA512 بمفتاح ‘Bitcoin seed’ قيمة IL كمرشح master وIR كـchain code. إذا IL=0 أو IL≥n فالseed غير صالح. [BIP 32 — Hierarchical deterministic wallets]

يضيف CKDpriv قيمة parse256(IL) إلى parent scalar modulo n ويجعل IR child code. normal يستخدم serP(Kpar)||ser32(i)، وhardened يستخدم 0x00||ser256(kpar)||ser32(i) مع i≥2^31. CKDpub للnormal public فقط. [BIP 32 — Hierarchical deterministic wallets]

يولد xpub كل normal public descendants. لكن parent xpub مع child private key غير hardened مسرب يكشف parent private key وsiblings. hardened يمنع هذا الحساب المحدد، لا سرقة seed أو randomness ضعيف أو transaction وافق عليها المستخدم خطأ. [BIP 32 — Hierarchical deterministic wallets]

serialization بطول 78 byte: version وdepth و4-byte fingerprint وchild number وchain code وkey data ثم Base58Check. xprv/xpub mainnet غالباً 111 حرفاً. fingerprint ليس توثيقاً قوياً، ودعم ypub/zpub من SLIP132 غير موحد. [BIP 32 — Hierarchical deterministic wallets] [SLIP 132 — Registered HD version bytes]

BIP43 يخصص purpose'. BIP44 يستخدم m/44'/coin_type'/account'/change/index و0/1 وgap limit 20؛ BIP48 للmultisig وBIP84 للSegWit وBIP86 للTaproot. هذه wallet conventions وليست seed data أو node rules؛ ' تعني +2^31. [BIP 43 — Purpose field for deterministic wallets] [BIP 44 — Multi-account hierarchy] [BIP 48 — Multi-script hierarchy for multisig wallets] [BIP 84 — Native SegWit derivation] [BIP 86 — Single-key Taproot derivation]

scoped xpub يتيح watch-only دون توقيع، لكن تسربه يربط العناوين الماضية والمستقبلية والأرصدة والتوقيت. host مخترق قد يبدل address؛ تحقق من الاستلام المهم على شاشة signer موثوق. [BIP 32 — Hierarchical deterministic wallets] [Bitcoin Developer Guide — Wallets] [Trezor Learn — Hierarchical deterministic wallets]

xpub لا يحدد script. يضيف descriptor origin [fingerprint/path] وwpkh() وmultisig threshold/cosigners وwildcards وchecksum. seed واحد في multisig لا يعيد xpubs الأخرى أو ترتيبها أو threshold؛ احفظ descriptor مختبراً. [BIP 380 — Output script descriptors] [BIP 389 — Multipath descriptor key expressions] [Bitcoin Core — Output descriptors] [Bitcoin Optech — Output script descriptors]

root seed يلغي backup لكل key، لكن recovery يحتاج passphrase وformat وnetwork وpurpose/script وcoin type وaccounts وreceive/change وgap policy وmultisig descriptor. zero balance قد يعني شجرة خاطئة؛ اختبر UTXO والتوقيع. [BIP 44 — Multi-account hierarchy] [BIP 380 — Output script descriptors] [Bitcoin Core — Output descriptors] [BIP 39 — Mnemonic code for deterministic keys]

حالات IL≥n أو zero scalar أو infinity point النادرة تنتقل إلى index التالي. الأشهر: origin مفقود أو discovery مختلف أو ypub/zpub أو change منسي أو Taproot غير مدعوم أو depth خاطئ. xprv سلطة إنفاق، xpub metadata مالية، descriptor خريطة policy. [BIP 32 — Hierarchical deterministic wallets] [BIP 380 — Output script descriptors] [SLIP 132 — Registered HD version bytes] [Bitcoin Core — Output descriptors]

للحصول على صورة أوضح، اقرأ هذا المدخل مع محفظة, Seed Phrase, Extended Public Key (xpub), Derivation Path, Gap Limit, Bitcoin. تشير إلى هذا المدخل أيضًا عنوان بيتكوين, BIP 39, Cold Storage, Watch-only Wallet.

DOC · 001BIP 32 — Hierarchical deterministic walletsمواصفة ↗DOC · 002BIP 43 — Purpose field for deterministic walletsمواصفة ↗DOC · 003BIP 44 — Multi-account hierarchyمواصفة ↗DOC · 004BIP 48 — Multi-script hierarchy for multisig walletsمواصفة ↗DOC · 005BIP 84 — Native SegWit derivationمواصفة ↗DOC · 006BIP 86 — Single-key Taproot derivationمواصفة ↗DOC · 007BIP 380 — Output script descriptorsمواصفة ↗DOC · 008BIP 389 — Multipath descriptor key expressionsمواصفة ↗DOC · 009SLIP 132 — Registered HD version bytesمواصفة ↗DOC · 010Bitcoin Core — Output descriptorsتوثيق ↗DOC · 011BIP 39 — Mnemonic code for deterministic keysمواصفة ↗DOC · 012Bitcoin Developer Guide — Walletsتوثيق ↗DOC · 013Bitcoin Optech — Output script descriptorsتوثيق ↗DOC · 014Trezor Learn — Hierarchical deterministic walletsتوثيق ↗
تمت المراجعة في 1 أغسطس 2026المصادر أولًا · ليست نصيحة استثمارية