KomodoPlatform / komodo-defi-framework

This is the official Komodo DeFi Framework repository
https://komodoplatform.com/en/docs/komodo-defi-framework/
103 stars 93 forks source link

Handle BIP49 purpose to support P2WPKH addresses with Trezor #1507

Closed sergeyboyko0791 closed 1 year ago

sergeyboyko0791 commented 1 year ago

Currently, BIP44 purpose is hardcoded at the Bip44DerivationPath. Perhaps it's worth to add a type like

type BipDerivationPath = Bip32Child<BipPurposeValue, // `purpose`
    Bip32Child<HardenedValue, // `coin_type`
    Bip32Child<HardenedValue, // `account_id`
    Bip32Child<Bip44ChainValue, // `chain`
    Bip32Child<NonHardenedValue, // `address_id`
    Bip44Tail>>>>>;

where the BipPurposeValue is either 44 or 49 etc.

Ref: https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki

shamardy commented 1 year ago

This was fixed as part of this PR https://github.com/KomodoPlatform/komodo-defi-framework/pull/1512